Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
183310f
Add packages pane feature design document
infktd Jan 21, 2026
563da0b
Add packages pane implementation plan
infktd Jan 21, 2026
6d3eff5
feat(packages): add Package and PackageInfo types
infktd Jan 21, 2026
b11b849
test(packages): improve test coverage for Package types
infktd Jan 21, 2026
6e0c3e2
feat(packages): add Nix store path parser
infktd Jan 21, 2026
384fa62
refactor(packages): improve Nix store path parser robustness
infktd Jan 21, 2026
d672440
feat(packages): add package type categorization
infktd Jan 21, 2026
60e42da
refactor(packages): improve categorization robustness and test coverage
infktd Jan 21, 2026
945d0d1
feat(packages): add binary discovery scanner
infktd Jan 21, 2026
680925d
feat(packages): add package grouping logic
infktd Jan 21, 2026
b840a93
feat(ui): add PackagesView component
infktd Jan 21, 2026
de7e388
feat(ui): integrate PackagesView into Model
infktd Jan 21, 2026
15f2403
feat(ui): add adaptive layout threshold logic
infktd Jan 21, 2026
e87cb56
feat(ui): add packages view toggle state
infktd Jan 21, 2026
2547e1d
feat(ui): add 'p' key binding to toggle panes
infktd Jan 21, 2026
6b3f871
feat(ui): scan packages on project selection
infktd Jan 21, 2026
1da899f
feat(ui): render both panes on wide terminals
infktd Jan 21, 2026
386a444
feat(ui): add pane indicators for narrow terminals
infktd Jan 21, 2026
28a72a7
test(ui): add packages pane integration test
infktd Jan 21, 2026
25d8a6b
feat(ui): add mouse hover support for packages pane
infktd Jan 21, 2026
29fe1be
chore: final cleanup and testing for packages pane
infktd Jan 21, 2026
fbe93d1
docs: add packages pane documentation
infktd Jan 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions docs/PACKAGES_PANE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Packages Pane

devdash displays installed development packages (Go, Python, Node.js, etc.) alongside services.

## Features

- **Automatic Discovery**: Scans `.devenv/profile/bin/` to find all installed packages
- **Version Information**: Shows package versions from Nix store paths
- **Adaptive Layout**: Automatically adjusts based on terminal size
- **Toggle View**: Press `p` to switch between services and packages on narrow terminals

## Layout Modes

### Wide Terminals (≥140 columns)

Both Services and Packages panes are visible simultaneously:
- Services pane in top quarter
- Packages pane in second quarter
- Logs pane in bottom half
- Full information always visible

### Narrow Terminals (<140 columns)

One pane at a time with toggle:
- Default: Services pane with `[p:packages]` indicator
- Press `p`: Packages pane with `[p:services]` indicator
- Press `p` again: Back to Services pane

## Package Information

Each package shows:
- **NAME**: Package binary name (e.g., "go", "python3")
- **VERSION**: Version extracted from Nix store path
- **TYPE**: Categorized type (Go, Python, Node.js, Rust, etc.)

## Keyboard Shortcuts

- `p`: Toggle between Services and Packages view (narrow terminals)
- `Tab`: Cycle focus through panes (includes Packages when visible)
- Mouse hover: Move focus to pane under cursor

## Project Types

- **Service-based projects**: Have both services and packages
- **Package-only projects**: Development environments without long-running services
- Example: CLI tools, libraries, static sites
- Only use `devenv shell`, never run `devenv up`
- Still show useful package information

## Technical Details

Package discovery:
1. Scans `.devenv/profile/bin/` directory
2. Resolves symlinks to Nix store paths
3. Parses package name and version from path format: `/nix/store/<hash>-<name>-<version>/...`
4. Groups multiple binaries from same package (e.g., go, gofmt, godoc)
5. Categorizes by detected language/tool type

## Supported Package Types

The packages pane automatically categorizes packages into the following types:

- **Go**: go, gopls, gofmt, godoc, goimports
- **Python**: python, python3, pip, pytest, poetry
- **Node.js**: node, nodejs, npm, npx, yarn
- **Rust**: cargo, rustc, rustup
- **C/C++**: gcc, g++, clang, clang++
- **Ruby**: ruby, gem, bundle
- **Java**: java, javac, maven, gradle
- **Other**: Any unrecognized packages

## Examples

### Wide Terminal (150 columns)

```
┌─ SERVICES [myproject] ─────────────────┐
│ NAME STATUS CPU MEM │
│ postgres running 2% 45MB │
│ redis running 1% 12MB │
└────────────────────────────────────────┘

┌─ PACKAGES (5) ─────────────────────────┐
│ NAME VERSION TYPE │
│ go 1.21.5 Go │
│ python3 3.11.7 Python │
│ node 20.10.0 Node.js │
│ cargo 1.75.0 Rust │
│ gcc 13.2.0 C/C++ │
└────────────────────────────────────────┘

┌─ LOGS ─────────────────────────────────┐
│ [postgres] Server started │
│ [redis] Ready to accept connections │
└────────────────────────────────────────┘
```

### Narrow Terminal (100 columns)

Showing services:
```
┌─ SERVICES [myproject] [p:packages] ───┐
│ NAME STATUS CPU MEM │
│ postgres running 2% 45MB │
└───────────────────────────────────────┘

┌─ LOGS ────────────────────────────────┐
│ [postgres] Server started │
└───────────────────────────────────────┘
```

After pressing `p`:
```
┌─ PACKAGES (5) [p:services] ───────────┐
│ NAME VERSION TYPE │
│ go 1.21.5 Go │
│ python3 3.11.7 Python │
└───────────────────────────────────────┘

┌─ LOGS ────────────────────────────────┐
│ [postgres] Server started │
└───────────────────────────────────────┘
```

## Why Packages Pane?

The packages pane serves several purposes:

1. **Environment Verification**: Quickly verify which tools are available in your devenv
2. **Version Tracking**: See exact versions without running multiple `--version` commands
3. **Debugging**: Identify version conflicts or missing tools
4. **Documentation**: Know what's installed without checking configuration files
5. **Package-Only Projects**: Useful for projects that don't run services but still use devenv for environment management
Loading
Loading