feat(tui): add mouse-drag sidebar resize#23738
Draft
eggfriedrice24 wants to merge 1 commit into
Draft
Conversation
Co-Authored-By: Agusti F. <6601142+agustif@users.noreply.github.com>
|
ty for picking this back up hope this time gets merged! |
|
This feature seems useful, how is it going now? |
Author
|
Your design did the heavy lifting, appreciate the original work and the doc trail you left on #5917. Now we wait on maintainer review; happy to address anything they want changed. |
Author
|
Draft, waiting on maintainer design approval per CONTRIBUTING.md. Code is ready and verified locally, nothing pending on my side. |
|
@thdxr Hi Dax! Any chance this could get a peek? Would love this.. |
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.
Issue for this PR
Closes #6087
Type of change
What does this PR do?
Makes the TUI right sidebar resizable by dragging its left edge. The sidebar width was previously hard-coded to 42 columns in
sidebar.tsxand referenced again inroutes/session/index.tsx; there was no way to change it short of patching the binary.Behavior:
theme.warning(same yellow used by the permission prompt triangle, for visual consistency).[20, min(80, floor(terminal_width / 2))]- the dynamic upper bound prevents the sidebar from swallowing the chat on borderline-wide terminals (~120 cols).kv.signalundersidebar_width, survives restarts.This picks up the design from #5917 (mouse-drag, width-persist, 20–80 clamp, 1px handle) which @agustif got a thumbs-up for from the team before it auto-closed at 60 days stale. The codebase had drifted too much (kv.signal refactor, no-floating-promises rule, etc.) for a clean rebase, so this is a fresh implementation with the same UX. @agustif is credited via
Co-Authored-Byon the commit.Previous attempts:
Opening as draft per CONTRIBUTING.md's design-approval expectation on UI features - happy to flip to ready-for-review once approved, or close if you'd prefer to discuss the design more on #6087 first.
How did you verify your code works?
bun run typecheckpasses clean (tsgo, cache-bypassed full run)bunx oxlinton the changed files: 0 new warnings (19 baseline → 19 after)bun dev .- hovering the sidebar/chat boundary highlights the handle yellow, drag resizes, value persists across restarts. Tested at 120/160/200 terminal widths; dynamic clamp keeps chat readable.Screenshots / recordings
21.16.49_21-04-2026.mp4
Checklist