Skip to content

fix(desktop): keep the context panel reachable in a narrow window - #1376

Merged
huichen merged 2 commits into
mainfrom
pr/huichen
Oct 26, 2026
Merged

huichen merged 2 commits into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

The bug

Below the three-column floors (992px) the right panel disappeared together with its own toggle, and the panel shortcut went inert with it:

const hideRightPanel = … || !canShowRightPanel(windowWidth);   // < 992px

hideRightPanel folded a view decision into a availability one, so ContextPanel never rendered — not even the collapsed state's floating button — and mod+shift+b had nothing to act on. A narrow window had no way to reach Files / Runs / Review at all.

The fix

The panel 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 — which is the reason the column was folded in the first place (#548), and why "just squeeze it" was not an option.

  • The header toggle and mod+shift+b drive the drawer in the narrow layout.
  • A drawer opened narrow is promoted to the column when the window grows, rather than closing under the reader; a column that no longer fits still folds (the user's standing collapsed/expanded choice is preserved), and shrinking never pops a drawer over the conversation uninvited. rightDrawerOpen is deliberately not folded into rightExpanded — the column is a standing preference, the drawer is a narrow-layout request, and conflating them would make a resize do something the user did not ask for.
  • A remote conversation's files panel gets the same treatment, since it shares that corner and that state.

This is the shape the left rail already had. ActivityRail has carried floating + an absolutely-positioned leftOverlayOpen wrapper for exactly this case; the right panel was the asymmetric one. So the change makes the two sides consistent rather than inventing a third behaviour.

Verification

Measured in the screenshot harness against the real AppShell (new scenario context-panel-narrow, 900px):

toggle           852..884 of 900
opened panel     516..900, height 860 (full window)
main             644 before and after opening   ← unchanged
horizontal overflow  none
hit test         panel is above the conversation
close/reopen     panel gone, toggle back, reopens

Column mode at 1280px is unchanged (review-file-hover passes). tsc, eslint, and the desktop suite (5381 cases) pass locally; CI re-runs them. PRODUCT.md §5.1 gains the narrow-window convention so the next reader knows the drawer is intended rather than incidental.

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
huichen enabled auto-merge (squash) October 26, 2026 12:59
@huichen
huichen merged commit 8238d78 into main Oct 26, 2026
10 checks passed
@huichen
huichen deleted the pr/huichen branch October 26, 2026 13:16
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.

1 participant