Repository navigation
Feature/packages pane - #1
Merged
Merged
Conversation
Documents the complete design for adding a packages pane that displays installed development packages (Go, Python, Node.js, etc.) alongside the existing services pane. Includes: - Dynamic package discovery by parsing .devenv/profile/bin/ - Adaptive layout showing both panes when space allows (≥140 cols) - Toggle key 'p' to switch views on smaller terminals - Comprehensive testing strategy - Enhanced project type detection (service-based vs package-only) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Detailed task-by-task implementation plan with 18 tasks: - Package types and scanner (Tasks 1-5) - PackagesView component (Task 6) - Model integration (Tasks 7-11) - Adaptive layout rendering (Tasks 12-13) - Focus and mouse support (Tasks 15-16) - Testing and documentation (Tasks 14, 17-18) Each task follows TDD approach: - Write failing test - Implement minimal code - Verify test passes - Commit Ready for execution with superpowers:executing-plans or superpowers:subagent-driven-development. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add data structures for package discovery: - Package: name, version, type, binary path - PackageInfo: project path, packages list, scan timestamp Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Convert tests to table-driven format for better idiomatic Go - Add assertions for ALL fields in Package struct (Type, Binary) - Add assertions for ALL fields in PackageInfo struct (LastScanned) - Add test case for Python package to demonstrate flexibility - Add test case for multiple packages in PackageInfo - Add inline comments to PackageInfo fields for consistency Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Parse Nix store paths to extract: - Package name - Version (if present) - Store hash for grouping Handles various formats including versioned and unversioned packages. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Move regex compilation to package-level variable for performance - Improve regex pattern to handle hyphenated package names correctly - Add comprehensive test cases for edge cases (hyphenated names, invalid paths, empty strings) - Rename dashIdx to firstDashIndex for clarity - Remove redundant len(matches) > 3 check Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Categorize packages by name patterns: - Go (go, gopls, gofmt) - Python (python, pip, pytest) - Node.js (node, npm, yarn) - Rust (cargo, rustc) - C/C++ (gcc, clang) - Ruby, Java, and Other Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Key improvements: - Fix categorization logic to use exact matches instead of prefix/contains checks - Prevents false positives (golang, go-tools, google-chrome no longer match "go") - Add comprehensive edge case tests for case sensitivity and prefix matching - Add tests with real-world package names (python-dotenv, node-fetch, etc.) - Add explicit tests for regex fallback logic in parseNixStorePath - Improve documentation with detailed godoc examples and regex pattern explanation - Remove TestPackageStructure and TestPackageInfoStructure (no logic testing) - Expand toolchain recognition (add pip2/pip3, pnpm, rustfmt, cmake, mvn, etc.) All 72+ test cases pass successfully. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Scan .devenv/profile/bin/ to discover installed packages: - Walk bin directory - Resolve symlinks to Nix store paths - Parse package information from paths - Handle missing directories gracefully Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Group binaries from same Nix package: - Use hash+version as unique identifier - Merge multiple binaries into single Package entry - Prevents duplicates (go, gofmt, godoc → one 'go' package) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
New component to display package list: - Header with package count - Column headers: NAME, VERSION, TYPE - Package rows with truncation - Empty state message - Focus highlighting support Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add PackagesView to main Model: - Initialize in New() - Add test for initialization Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Determine when to show both Services and Packages panes: - Threshold: 140 columns - Below threshold: show single pane with toggle - At/above threshold: show both panes Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add state management for single-pane mode: - showPackages flag to track current pane - togglePackagesView() to switch between panes - Defaults to showing services pane Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Handle 'p' key press to toggle between Services and Packages: - Calls togglePackagesView() - Works in both narrow and wide terminals - Updates display immediately Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Trigger package scanning when project is switched: - Call packages.Scan() in switchToCurrentProject() - Update PackagesView with results - Handle errors gracefully (empty list on error) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update View() to show Services and Packages together: - Split vertical space when width >= 140 - Services pane on top - Packages pane in middle - Logs pane on bottom - All three visible simultaneously - Add PanePackages to focus cycle - Update cycleFocus() to conditionally include packages Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Show which pane is hidden on narrow terminals: - '[p:packages]' when showing services - '[p:services]' when showing packages - Appears in header for visibility - Add SetTitleSuffix() to PackagesView - Update renderServices() and renderPackages() Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comprehensive test covering full workflow: - Project with test packages - Package scanning on selection - Wide terminal layout (both panes) - Narrow terminal toggle behavior - Indicator display Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update mouse motion handling: - Detect mouse position in packages region - Update focus to PanePackages when hovering - Handle both wide and narrow terminal layouts - Calculate correct pane boundaries Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
All tests passing: - 85+ test cases - Coverage: 43.1% - Binary builds successfully - No flaky tests (3 consecutive runs) Feature complete: - Package scanning from Nix store - Adaptive layout (140 column threshold) - Toggle with 'p' key - Focus cycling and mouse support - Comprehensive test coverage Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update help text with 'p' key: - Toggle between packages and services view - Shows in navigation section - Applies to narrow terminals Add comprehensive user documentation: - Features and layout modes - Package information displayed - Keyboard shortcuts - Project type detection - Technical details and examples - Supported package types Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.