Repository navigation
Add --no-tree to start with the file tree pane hidden - #308
Merged
Merged
Conversation
the pane could only be toggled at runtime with t, so there was no way to open revdiff without it. The flag follows the existing toggle pattern, so the ini key and REVDIFF_NO_TREE env var come with it. hiding the tree also moves initial focus to the diff pane, mirroring what the t toggle does. Leaving focus on the tree would point the cursor keys at a pane that is not on screen. Related to #305
There was a problem hiding this comment.
Pull request overview
Adds a startup-time way to hide the file tree pane in revdiff, wiring a new --no-tree CLI/config/env option through the composition root into the Bubble Tea model’s initial layout state (including initial focus), with accompanying tests and user/plugin documentation updates.
Changes:
- Add
--no-tree(REVDIFF_NO_TREE,no-treein config) and wire it intoui.ModelConfig.NoTree. - Initialize
layout.treeHiddenfrom config and adjust initial focus to the diff pane when the tree is hidden. - Add parsing tests and model layout/resize/toggle tests; document the new flag in README/site/plugin reference docs.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
app/config.go |
Adds NoTree option with CLI/INI/env wiring (--no-tree, REVDIFF_NO_TREE). |
app/config_test.go |
Tests flag/env/config parsing for NoTree. |
app/main.go |
Passes opts.NoTree into ui.ModelConfig.NoTree. |
app/ui/model.go |
Adds ModelConfig.NoTree; initializes layout.treeHidden and sets initial focus to diff when hidden. |
app/ui/model_test.go |
Adds coverage for initial hidden-tree behavior, resize geometry, and toggle round-trip. |
README.md |
Documents --no-tree in the options table. |
site/docs.html |
Documents --no-tree in the website options table. |
.claude-plugin/skills/revdiff/references/config.md |
Documents --no-tree for the Claude plugin reference. |
plugins/codex/skills/revdiff/references/config.md |
Documents --no-tree for the Codex skill reference. |
plugins/pi/skills/revdiff/SKILL.md |
Adds --no-tree to pi skill examples and recommended commands. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | `--no-confirm-discard` | `REVDIFF_NO_CONFIRM_DISCARD` | Skip confirmation when discarding annotations with Q | `false` | | ||
| | `--no-confirm-reload` | `REVDIFF_NO_CONFIRM_RELOAD` | Skip confirmation when dropping annotations on reload with R | `false` | | ||
| | `--no-mouse` | `REVDIFF_NO_MOUSE` | Disable mouse support (scroll wheel, click) | `false` | | ||
| | `--no-tree` | `REVDIFF_NO_TREE` | Hide the file tree pane | `false` | |
p4elkin
pushed a commit
to p4elkin/revdiff
that referenced
this pull request
Aug 5, 2026
Upstream independently shipped --no-tree (PR umputun#308, related to umputun#305) while this fork was building the same flag. Resolved by dropping our duplicate implementation in favor of theirs: - app/config.go, app/main.go, app/ui/model.go: removed our NoTree field/wiring, kept upstream's (which also moves initial focus to the diff pane when the tree starts hidden — a behavior ours was missing) - app/config_test.go, app/ui/model_test.go: removed our now-redundant inline assertions and TestModel_NoTreeFromConfig; upstream's TestParseArgs_NoTree/TestNewModel_NoTree already cover it, more thoroughly - README.md, site/docs.html, both config.md references: removed our duplicate --no-tree row, kept upstream's
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.
the file tree pane could only be toggled at runtime with
t, so there was no way to open revdiff with it already hidden. From discussion #305.What changed
--no-treeon theoptionsstruct, following the--no-mouseshape, sono-treein the config file andREVDIFF_NO_TREEcome with it.main.gopasses it intoModelConfig.NoTreeandNewModelsetslayout.treeHiddenfrom it.The layout math is untouched:
handleResizeand the file-load switch already branch ontreeHidden, so the flag reuses those paths rather than adding a second way to compute pane widths.tstill toggles the pane back on, and a single markdown file's TOC follows the same flag, matching whattdoes today.The one piece that is not just wiring is initial focus. Starting with the tree hidden moves focus to the diff pane, the same thing
toggleTreePanedoes when it hides the pane; without it the cursor keys would drive a pane that is not on screen.Tests
Flag, env var and config-file parsing, plus four model cases: default, hidden, full-width geometry after a resize, and the toggle round-trip.
Related to #305