Repository navigation
feat: add opt-in compact folders to the file tree - #698
Merged
Merged
Conversation
agavra
approved these changes
Sep 11, 2026
agavra
left a comment
Owner
There was a problem hiding this comment.
Reviewed leniently for blockers. The branch is updated with current main, the README feature bullet was removed, and the merged tree passes formatting, Clippy, and the full test suite.
1 task
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.
Deep package hierarchies consume file-tree rows and push filenames far to the right. This adds
compact_folders = trueto join single-child directory chains into one row, with existing behavior preserved by default.For a review containing
app/src/main/kotlin/EditorScreen.kt:Chains stop at directories containing direct review files or multiple child directories, using the active filtered file set. Each joined row expands or collapses as one unit. Full-path search, file identity, and diff navigation are preserved. Compact rows scroll by terminal columns, including wide and combining Unicode characters.
Addresses the compact-folder portion of #476. Flat mode, label ellipses, sidebar resizing, and runtime mode switching are outside this PR.
Validation
cargo test: 1,618 passed, 4 ignored.cargo build,cargo check, andcargo fmt --check: passed.cargo run -- -wagainst this diff. A live Kotlin fixture verified compact rendering, Enter collapse/reopen, and full-path search from a collapsed tree.cargo clippy --all-targets -- -D warningsreports a pre-existingclippy::useless_formatinsrc/forge/bitbucket/bkt.rs:1155, also present in base commit58eb8e1. With that lint suppressed, all-target Clippy passes. That file is unchanged.Related work
#370 proposes optional arrow navigation and scrolling changes; #556 changes file-tree scrolling and adds flat mode/resizing. Neither implements compact chains, but both touch related tree behavior and rendering.