Skip to content

feat(tree): control horizontal scrolling independently - #415

Closed
0OZ wants to merge 2 commits into
moritzwilksch:mainfrom
0OZ:feat/independent-tree-scroll
Closed

0OZ wants to merge 2 commits into
moritzwilksch:mainfrom
0OZ:feat/independent-tree-scroll

Conversation

@0OZ

@0OZ 0OZ commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Why

Long names can already scroll when diff line wrapping is off. This lets the tree scroll while diff lines still wrap (or truncate names while lines are unwrapped).

The tree follows line wrapping until the toolbar button is used; after that, the choice is saved across reloads. The toolbar wraps at narrow widths to keep both buttons reachable.

This revisits #352, which removed the earlier toggle because its meaning was unclear at a glance. The button has a pressed state and a tooltip, but it adds toolbar clutter; feedback on whether independent control is worth that trade-off is welcome.

Long filenames

With diff lines wrapped, filenames are truncated by default. Enable the tree toggle and scroll right to see their endings:

Truncated Scrolled right
Long filenames truncated Long filenames scrolled right
tree-scroll-video-after.webm

Testing

  • E2E: 89 passed with two workers, including both override directions, persistence and narrow-toolbar bounds. Screenshot baselines updated.
  • Node and Rust tests passed; client and release builds passed.
  • Format, lint, typecheck, clippy and quality gate passed. The full hook could not complete its Pixi-dependent checks because the installed Pixi is too old for the manifest.

0OZ added 2 commits October 28, 2026 09:00
The tree scrolls long names while lines are unwrapped and ellipsizes
them while lines wrap. The new header button overrides that either way,
and the choice is kept in local storage. Until it is clicked the tree
still follows line wrap.

The extra button no longer fit the toolbar at the narrowest pane and cut
off the un-view button, so the toolbar now wraps its buttons under the
scope switch there.
@pavelzw

pavelzw commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

can you add a before/after video?

@pavelzw

pavelzw commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

not sure i like this change, this just makes the tool more complicated.

i'd prefer to have less buttons on the top bar, not more...

@0OZ

0OZ commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

We could also make that an option on the Settings page instead. But don’t you find it annoying when you can’t scroll horizontally? That annoyed me for a long time in VS Code :D

@pavelzw

pavelzw commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

don’t you find it annoying when you can’t scroll horizontally

yes, that's why i have horizontal scrolling enabled everywhere :p

@pavelzw

pavelzw commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

also, this wrap is ugly

image

@0OZ 0OZ closed this Oct 28, 2026
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