feat(file-browser): Phase 3 Sprint 1 - File Browser Foundation#22
Merged
feat(file-browser): Phase 3 Sprint 1 - File Browser Foundation#22
Conversation
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>
randlee
added a commit
that referenced
this pull request
Jan 28, 2026
- Phase 3 now In Progress - Sprint 3.1 PR #22 pending review - Added implementation status tracking for Wave 2 completion 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>
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.
Summary
Implements the file browser component foundation for Phase 3 Sprint 1, providing:
uniform_listfor efficient large directory handlingChanges
New Files
src/file_browser/mod.rs- Module exports and action definitionssrc/file_browser/pane.rs- FileBrowserPane component (519 lines)src/file_browser/state.rs- Tree state utilities with tests (299 lines)src/file_browser/render.rs- Entry rendering helpers (201 lines)src/file_browser/context_menu.rs- Context menu builder (133 lines)Modified Files
Cargo.toml- Added Zed crate dependencies (project, worktree, fs, git, file_icons, editor)src/main.rs- Added file_browser modulesrc/ui/workspace.rs- Integrated FileBrowserPane into left paneTest plan
cargo test- 107 tests passing (31 file browser specific)cargo clippy- Zero warningscargo build- Clean buildNotes
This is Wave 2 implementation with placeholder tree data. Wave 3 will integrate the Zed project crate for actual filesystem traversal and git status.
🤖 Generated with Claude Code