Skip to content

Comments

feature/sprint 3 1 wave3#23

Merged
randlee merged 15 commits intodevelopfrom
feature/sprint-3-1-wave3
Jan 28, 2026
Merged

feature/sprint 3 1 wave3#23
randlee merged 15 commits intodevelopfrom
feature/sprint-3-1-wave3

Conversation

@randlee
Copy link
Owner

@randlee randlee commented Jan 28, 2026

  • docs: add phase 3 sprint 1 design
  • feat(file-browser): implement Phase 3 Sprint 1 file browser foundation
  • docs: add worktree path to sprint 3.1 design
  • fix(file-browser): address ARCH-CODEX review findings
  • feat(file-browser): load filesystem entries

randlee and others added 15 commits January 27, 2026 20:10
Add FileBrowserPane component with:
- Per-workspace state management using HashMap
- Virtualized tree rendering with gpui::uniform_list
- Keyboard navigation (Up/Down/Left/Right/Enter/Space)
- Binary search utilities for O(log n) expand/collapse operations
- Context menu builder for file operations
- Entry rendering with git status indicator support

Workspace integration:
- FileBrowserPane integrated into WorkspaceView left pane
- OpenInTerminal event spawns terminal tab in selected directory
- Workspace switching updates file browser state

New modules:
- file_browser/pane.rs - Main component (519 lines)
- file_browser/state.rs - Tree state utilities (299 lines)
- file_browser/render.rs - Entry rendering (201 lines)
- file_browser/context_menu.rs - Menu builder (133 lines)
- file_browser/mod.rs - Module exports and actions (40 lines)

Tests: 31 file browser tests, 107 total (all passing)
Clippy: Zero warnings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Three bugs fixed in file browser pane:

1. Expand/collapse non-functional (pane.rs:156)
   - Added `all_entries` field to store complete tree
   - Added `rebuild_visible_entries()` method to filter based on expansion
   - Now called after toggling expand/collapse

2. Keyboard navigation off-by-one (pane.rs:188, 216)
   - Fixed `move_selection_down` to select index 0 when no selection
   - Fixed `move_selection_up` to select last entry when no selection
   - Changed from `unwrap_or(0)` to explicit match handling

3. Wrong parent selection (pane.rs:297)
   - Fixed `collapse_selected_entry` to scan backwards from current index
   - Previously scanned from end of list, finding wrong parent
   - Now uses `.take(current_index)` before `.rev()`

Added 5 new unit tests covering these fixes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address all clippy warnings in src/file_browser/pane.rs:
- Remove redundant clone on all_entries field initialization
- Replace vec! with array literals for static test data
- Refactor match expressions to use Option::map_or and map_or_else
- Apply cargo fmt for consistent code style

All CI gates now pass:
- clippy: no warnings
- tests: 112/112 passed
- fmt: formatting correct

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The x11 crate requires libx11-dev to build on Linux. Added to both
the test job and clippy job Linux dependency installation steps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@randlee randlee merged commit f13b1f9 into develop Jan 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant