Skip to content

fix(ui): restore tree pane when a one-file review grows - #386

Merged
umputun merged 2 commits into
masterfrom
tree-pane-restore
Oct 8, 2026
Merged

umputun merged 2 commits into
masterfrom
tree-pane-restore

Conversation

@umputun

@umputun umputun commented Oct 8, 2026

Copy link
Copy Markdown
Owner

a one-file review collapses the tree pane, and nothing restored it when the file list grew later, for example after toggling untracked files with u. The pane kept zero width and the diff kept the full width until the next resize.

handleFilesLoaded now restores the tree width once the list holds more than one file. A pane hidden with t stays hidden.

the restore logic is taken from @codemageddon's prototype in #377.

a one-file review collapses the tree pane, and nothing brought it back when the file list grew later, for example after toggling untracked files with `u`. The pane kept zero width and the diff kept the full width until the next resize.

handleFilesLoaded now restores the tree width once the list holds more than one file, unless the pane was hidden with `t`.
the comment on contentWidth cited a one-file review growing to several files as a way to reach treeWidth 0 with the pane shown. That path now restores the width in `fitPanesToFileCount`, so the example no longer holds. The reason for keying on the resolved width stays.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 17:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@umputun
umputun merged commit b728497 into master Oct 8, 2026
7 checks passed
@umputun
umputun deleted the tree-pane-restore branch October 8, 2026 17:28
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.

2 participants