Repository navigation
improve(ui): standardize dialog, sheet, toast and banner surfaces - #189640
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR unifies dialog, sheet, toast, and banner styling through shared theme tokens. Example: Open the session Delete confirmation in the CRT theme.
Review scores
ProductKind: Preference · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: the maintainer-authored visual consolidation is useful, but the modal changes introduce a verified link-menu interaction regression. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI’s shared native dialog hosts content panels and a separate transient-overlay container; theme tokens determine their appearance while existing owners handle focus, dismissal, and actions. flowchart TD
A[User opens a surface] --> B[Existing UI component]
B --> C[Native dialog owner]
D[Shared theme tokens] --> C
C --> E[Scrollable content panel]
C --> F[Transient overlay container]
F --> G[Link menu actions]
Technical reviewBest possible solution: Keep shared surface styling while confining visual clipping to content that does not contain the modal’s transient overlays. Do we have a high-confidence way to reproduce the issue? No local reproduction was run; current-head Chromium and WebKit CI capture the failing modal-menu click, while a main Chromium run passes with matching baseline owners. Is this the best way to solve the issue? Reusing the existing modal owner and deleting panel overrides is appropriately small, but clipping the native shell must preserve the separately owned transient-overlay range. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8947d99e7656. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -72, Tests 0. Total -72 across 24 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 31, 2026, 2:37 PM ET / 18:37 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…enclaw#189640) * improve(ui): standardize dialog, sheet, toast and banner surfaces * improve(ui): match dialog radius to the composer * fix(ui): keep dialog transient menus outside content clipping
What Problem This Solves
Dialogs, sheets, toasts and banners had drifted apart. Dialog panels mixed radii from 10 to 26 px, several surface colors, gradients and hairlines, and close buttons from 24 to 32 px. Their own shadows never painted, because the dialog body clips them. CRT kept rounded dialog panels and sheets.
User Impact
These surfaces now read as one family with menus and selects: same corner, ring and depth, same surface, padding, title size, close button and action alignment, in every theme. No copy, flow, layout order or icon changes.
Why This Change Was Made
The dialog element owns the radius, surface and ring, built from the menu tokens. Its scrollable content body inherits the rounding and clips the content, while the separately owned transient-overlay container remains interactive. Per-panel surface overrides are deleted. New tokens:
--overlay-modal-surface,--overlay-modal-padding,--overlay-modal-title-size,--overlay-modal-close-size.--overlay-modal-radiusnow matches the composer:--radius-xltimes the corner scale, 25 px with the composer's corner shape where supported and 20 px elsewhere. That is the largest panel radius on main, so no dialog gets smaller, and CRT stays square because it pins the chain. Command palette rows use the menu item radius so they sit concentrically inside it. Toasts and floating notices use the menu surface, radius and shadow. Sheet backdrops use the modal backdrop.Surfaces left different on purpose:
Evidence
Real app through
pnpm dev:ui:mock --fixture session-design, with data at the fixture layer and no DOM insertion or hidden elements. Every state came from its real trigger: session context menu Delete, New group and Copy link; Cmd+/; Cmd+K; the channel row on Settings > Channels; Connect provider on Settings > Models; the sidebar Filter button at 390 px. The error banner is the real Automations page error, because the fixture does not simulate that call. Theme applied by loading the theme stylesheet and setting the root theme attributes. Toast and banner images are cropped to the surface. Screenshots were taken just before the final rebase on main; among the changed files, that rebase only brought in session-row badge color rules incomponents.css.Absolutely dark
Absolutely light
CRT stays square
Beacon keeps its contrast
Forced colors and reduced transparency
After only, with the media features emulated in Chromium.
Checks
oxfmt --check,lint:ui:styles,oxlint: pass.ui/src/lib/toast.browser.test.tsencoded the old 32 px dismiss size and now expects 28 px.ui:check-performance:base: pass. Total CSS against base is -252 B gzip and -1492 B raw; startup CSS is +23 B. Main is already over the fixed total ceilings and remains over them after this reduction.Gaps
Not verified, because the fixture does not reach them: session worker stop, session move (Move to cloud is disabled), agent create, secrets store, plugin credential editor, plugin consent and tool preview, file preview, image lightbox, camera capture, usage limit, exec approval, device pairing, memory import, update confirmation, browser sign-in recovery, secret reveal, channel pairing, model setup success, memory wiki preview, sidebar issues sheet, error toast,
.oc-banner, template notice. They use the same tokens, but no screenshot covers them.Landing validation
The existing native-link menu test failed in Chromium and WebKit with clipping on the dialog root and passes with clipping owned by its body. Focused modal, overlay and toast checks: 140 passed; two local WebKit bottom-edge assertions also fail identically on untouched base
cdee3a194f96(896.34375px versus896px). They were left unchanged. No new tests or approved visual values were added or changed in this repair.