Repository navigation
fix(desktop): keep the conversation visible in a narrow window - #548
Merged
Merged
Conversation
`body { min-width: 1024px }` laid the shell out at 1024px inside a narrower
window. With `overflow: hidden` that silently clipped the conversation area: at
a 900px window the center pane ended at x=1024 (measured), so its right edge -
including the composer's send button - was 124px off-screen.
- Drop the CSS width floor; the layout follows the actual viewport.
- The side panels now yield to the conversation instead of squeezing it: below
the three-column floors (608px / 992px) the left rail folds into its hover
overlay and the right context panel stays closed. The user's own
collapsed/expanded choice is preserved and comes back with the window.
- The composer toolbar wraps to a second row (model / thinking / send
right-aligned) instead of overflowing. At the 1024px minimum with the context
panel open the center is exactly its 384px floor, where the row needed ~383px
and the controls previously overlapped the send button.
Verified by rendering the real AppShell in a browser against a stubbed Tauri IPC
at 1440/1200/1024/992/900/700/600/500px, with and without the context panel:
every width now reports zero elements escaping the viewport and a composer whose
right edge fits, where the pre-fix build reported body=1024 inside a 900px
window, 25 escaping elements, and the composer 92px off-screen.
huichen
enabled auto-merge (squash)
September 10, 2026 13:46
huichen
added a commit
that referenced
this pull request
Oct 26, 2026
Below the three-column floors (992px) the right panel used to vanish together with its own toggle, and the panel shortcut went inert with it: `hideRightPanel` folded `!canShowRightPanel(...)` into the view-based hides, so a narrow window had no way to reach Files / Runs / Review at all, and nothing was rendered to open even if it had. The panel now yields to the conversation without disappearing. Below the floor it opens as an overlay anchored to the window's right edge, at full height and out of the row's flow, so the conversation keeps its width floor instead of being squeezed or clipped (the reason the column was folded in the first place, #548). The header toggle and `mod+shift+b` drive the drawer there; a drawer opened in a narrow window is promoted to the column when the window grows rather than closing under the reader; a column that no longer fits still folds, and shrinking never pops a drawer over the conversation uninvited. A remote conversation's files panel gets the same treatment, since it shares that corner and that state. Verified by measuring the real shell in the screenshot harness at 900px (scenario `context-panel-narrow`): the toggle sits at 852..884 of 900, the opened panel spans 516..900 at full 860px height while `main` stays 644px wide (unchanged by opening), nothing overflows the window, the panel is hit-tested above the conversation, and close/reopen returns the toggle. Column mode at 1280px is unchanged (`review-file-hover`). tsc, eslint and vitest (5381 desktop tests) pass.
huichen
added a commit
that referenced
this pull request
Oct 26, 2026
) Below the three-column floors (992px) the right panel used to vanish together with its own toggle, and the panel shortcut went inert with it: `hideRightPanel` folded `!canShowRightPanel(...)` into the view-based hides, so a narrow window had no way to reach Files / Runs / Review at all, and nothing was rendered to open even if it had. The panel now yields to the conversation without disappearing. Below the floor it opens as an overlay anchored to the window's right edge, at full height and out of the row's flow, so the conversation keeps its width floor instead of being squeezed or clipped (the reason the column was folded in the first place, #548). The header toggle and `mod+shift+b` drive the drawer there; a drawer opened in a narrow window is promoted to the column when the window grows rather than closing under the reader; a column that no longer fits still folds, and shrinking never pops a drawer over the conversation uninvited. A remote conversation's files panel gets the same treatment, since it shares that corner and that state. Verified by measuring the real shell in the screenshot harness at 900px (scenario `context-panel-narrow`): the toggle sits at 852..884 of 900, the opened panel spans 516..900 at full 860px height while `main` stays 644px wide (unchanged by opening), nothing overflows the window, the panel is hit-tested above the conversation, and close/reopen returns the toggle. Column mode at 1280px is unchanged (`review-file-hover`). tsc, eslint and vitest (5381 desktop tests) pass.
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.
Problem
With a narrow window the conversation area was not fully visible:
body { min-width: 1024px }laid the shell out at 1024px inside a narrower window, and sincebodykeepsoverflow: hiddenthere was no way to scroll to the clipped part. Measured on a 900px viewport:body=1024,mainright edge at 1024, and the composer (including its send button) 92px past the right edge. Independently, at the 1024px minimum with the context panel open the center pane is exactly its 384px floor — narrower than the composer toolbar needs, so the toolbar's controls ran past the card and overlapped the send button.Change
desktop/src/styles/globals.css). The shell now follows the actual viewport.panelGeometry.ts,useWindowWidth.ts,AppShell.tsx): below the three-column floors (608px / 992px) the left rail folds into its existing hover overlay and the right context panel stays closed, instead of squeezing the center past its floor. The user's own collapsed/expanded choice is kept in state, so a panel comes back when the window grows; the rail toggle is a no-op while there is no room, so a click can't silently persist "collapsed".Composer.tsx): the model / thinking / send group drops to a second row (ms-auto, right-aligned) withmin-w-0on the triggers so long labels truncate — no overflow or overlap at the 384px floor.Verification
Rendered the real
AppShellin Chrome against a stubbed Tauri IPC (temporary harness, not committed) as sized iframes at 1440 / 1200 / 1024 / 992 / 900 / 700 / 600 / 500px, in both the default and context-panel-open states, and measured the DOM rather than eyeballing screenshots.body=1024, 25 elements escaping the viewport, composer right edge 92px off-screen, send button not visiblebody=900, 0 escaping,mainright edge = viewport, composer fitsScreenshots of the 1024px three-column window (context panel open, wrapped composer) and the narrow widths confirmed no clipped or overlapping controls.
npx tsc --noEmit,npx eslint "src/**/*.{ts,tsx}",npx stylelint "src/**/*.css",npx vitest run(91 files / 842 tests, including the newpanelGeometry.test.ts) all pass.Note:
tauri.conf.jsonstill declaresminWidth: 1024— this PR makes anything narrower work (Windows snap, zoomed/scaled displays) but doesn't change what the user can drag to. Lowering that minimum is a product decision, so it is left alone.