Repository navigation
fix(ui): keep Review file previews within panel - #132800
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 5:20 PM ET / 21:20 UTC. ClawSweeper reviewWhat this changesThe PR lets the shared Control UI Review-panel wrapper shrink horizontally and adds a browser regression test so long file lines scroll within CodeMirror. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer review: current main still lacks this fix, and the small shared-wrapper repair has no concrete introduced defect in the reviewed diff. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI Review sidebar renders files, previews, and session diffs inside a flex panel. The shared wrapper must stay bounded so CodeMirror, rather than the outer panel, owns long-line overflow. flowchart LR
A[Workspace file] --> B[Review sidebar]
B --> C[Shared panel wrapper]
C --> D[File preview]
D --> E[CodeMirror editor]
E --> F[Horizontal scrolling]
Decision needed
Why: The PR is authored by a repository member and carries the protected maintainer label, so automated cleanup must leave the merge decision to maintainers. Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +31. Total +32 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the shared-wrapper constraint and focused browser regression so bounded Review panels consistently delegate long-line overflow to CodeMirror. Do we have a high-confidence way to reproduce the issue? Yes. A constrained Review panel containing a file with a long unwrapped line exercises the source-proven flex path; the added browser test encodes that scenario, though this read-only review did not execute it. Is this the best way to solve the issue? Yes. The missing horizontal shrink permission belongs on the common flex wrapper, while the existing CodeMirror scroller remains the established overflow owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d3c07b02e244. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
* fix(ui): keep Review file previews within panel * test(ui): exercise Review panel flex boundary
Closes #132797
What Problem This Solves
Fixes an issue where users opening a file with a long unwrapped line in the Control UI Review panel would see the file preview expand beyond the panel width on narrow screens. The outer panel clipped the excess, hiding path-bar actions and preventing the editor from owning horizontal navigation.
Why This Change Was Made
The shared full-height panel wrapper already owns the shrink-and-scroll boundary for Review content, but only released its vertical minimum size. Releasing its horizontal minimum size as well keeps the wrapper within the Review slot and lets the existing CodeMirror scroller handle long lines. Animation, focus, tab labels, panel geometry, and wrapping behavior are unchanged.
User Impact
Review file previews now stay within the available panel width. On narrow screens, the file path truncates as designed, all toolbar actions remain reachable, and long lines scroll horizontally inside the editor.
Shared wrapper consumers checked:
Scope gate:
ui/src/styles/chat/sidebar.css: fixes the shared fill-wrapper invariant with one production line.ui/src/pages/chat/components/chat-sidebar-file-view.browser.test.ts: protects the visible narrow-panel behavior and scroll ownership with a long-line browser regression.Production LOC: +1. Test LOC: +35/-4. No generated, dependency, config, protocol, or persistent-state changes.
Evidence
Deterministic mocked Control UI reproduction at 390×844 and 1440×900:
clientWidth=347,scrollWidth=542,overflow-x=auto).Mobile (390×844)
Desktop (1440×900)
The captures use the same harness data, selected file, and editor state within each viewport. The before condition applies the exact pre-fix
min-width: auto; the after condition uses the committed CSS. Each image was inspected before upload. This fix does not change motion, so video evidence is not applicable.The focused Chromium regression loads the production chat stylesheet and mounts the file panel under the real
.side-panel__panelflex boundary at 320 px. It fails without the production rule (fileView.clientWidth=7905, container width320) and passes withmin-width: 0; the complete file passes all 10 browser tests with the fix. No broader local suite was run.ClawSweeper Rank-up Moves
77a481303dbf427e35b16d559861da14259d56b8.