Repository navigation
perf(workArea): contain each pane and the primary Chat column - #288
Merged
orbitingflea merged 1 commit intoNov 24, 2026
Merged
orbitingflea merged 1 commit into
orbitingflea merged 1 commit into
Conversation
Thread transfer impact
This comment will update automatically after the next completed run. |
orbitingflea
force-pushed
the
feat/fullscreen-panels-pane-containment
branch
from
November 24, 2026 15:55
fe6fc8a to
71881db
Compare
Give work-area panes and the primary Chat column `contain: size layout`, so a layout change inside one (a streaming Chat, a diff, a PDF) starts at that box instead of the document. Both boxes are sized by their style, so size containment changes no rect. The pane gets it as Tailwind classes, so it applies only with the classes that position and size the pane. On touch screens a pane holding the Files tree is left uncontained: the tree's touch drag preview is fixed at viewport coordinates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
orbitingflea
force-pushed
the
feat/fullscreen-panels-pane-containment
branch
from
November 24, 2026 16:33
71881db to
f3c2dba
Compare
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.
Why
Keep layout work inside whichever split pane changes, or the primary Chat column when it changes, during Chat streaming, a diff view, or PDF zoom. Popovers, tooltips, menus, dialogs, and drag overlays must stay unclipped and in place.
Behaviour change
Behaviour change: no
Users see the same pixels and interactions. Only browser layout scope changes.
What changed
WorkArea.tsxgives each pane Tailwind classescontain-size contain-layout any-pointer-coarse:has-[[data-file-browser-panel]]:contain-none(contain: size layout, except a Files tree pane on a touch screen).useWorkAreaChat.tsaddscontain-size contain-layouttoPANE_COLUMN_CLASSand to the hiddenAWAYplacement of the primary Chat column.WorkArea.browser.test.tsxadds two Chromium tests.Scope
Three fork-only files in
apps/web/src/fork/workArea/change. Upstream files are unchanged.Tradeoffs
On touch devices, a Files tree pane, including a file view with its explorer open, stays uncontained so its touch drag preview is not shifted. Other options lack isolation, clip overflow, or edit upstream files.
Blast Radius
Only work-area files change. Base UI popovers, tooltips, menus, dialogs, and toasts, plus the drop outline, dragged tab chip, and drag shield, already render in
document.bodyoutside panes.Verification
Chromium UI, nine-view, and trace checks pass. Existing work-area browser tests and changed-files format, lint, knip, typecheck, tests, and React compiler checks pass.
Details
Size and stacking
In Chromium,
contain: layoutneeds size containment for a relayout boundary. Panes and the primary Chat column getleft,top,width, andheightfrom split ratios, not content, socontain: size layoutchanges no box. Containment uses Tailwind classes so it applies only with the pane's position and size classes; tests rendered without the app stylesheet see no containment. The primary Chat column renders outside the pane DOM over the empty Chat slot, so it needs containment too. Its hiddenAWAYplacement is style-sized, so streaming stays contained. Each contained pane is a stacking context, soz-indexinside it orders only its content.Touch exemption and options
Layout containment makes a pane the containing block for
position: fixeddescendants. The@pierre/treesFiles tree draws its touch drag preview asposition: fixedin viewport coordinates, so containment shifts it by the pane origin. Mouse drag uses that node only as a browser drag image in its own coordinate space, so only@media (any-pointer: coarse)is exempt.contain: layout styleandcontain: contentmake no relayout boundary in Chromium.contain: strictadds paint containment, clips overflow, and gives no measurable extra benefit.overflow: clipavoidposition: fixed, need a resize observer, risk a one-frame stale size on resize, and clip visible overflow.Verification
position: fixednodes sit in a contained pane (Base UI focus guards while a popup is open, and the Diff view select input). Keyboard focus order and scrolling match. Screenshots match except anti-aliasing noise on one gradient button.