Skip to content

improve(ui): standardize dialog, sheet, toast and banner surfaces - #189640

Merged
vyctorbrzezowski merged 3 commits into
mainfrom
brzezowski/dialog-sheet-toast-surfaces
Oct 31, 2026
Merged

vyctorbrzezowski merged 3 commits into
mainfrom
brzezowski/dialog-sheet-toast-surfaces

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

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-radius now matches the composer: --radius-xl times 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:

  • Details mobile sheet: untouched, because improve(ui): quiet the mobile Details sheet rows and groups #189549 is open on it. Its 26 px radius is not theme-aware yet, so that belongs in a follow-up.
  • Exec approval queue: keeps its own cards, since severity is a semantic border and the stack has several cards. The approval card attached to the mobile composer also stays as it is.
  • Image lightbox and drawers: edge to edge, so no radius or ring.
  • Usage limit, model setup success and device pairing: keep their centered hero padding and larger titles.
  • File preview reader: keeps its document title size.
  • Composer notices and chat failures: untouched, they follow the composer radius and are not styled as messages.
  • Toast controls under 640 px: keep the existing 44 px size.

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 in components.css.

Absolutely dark

Before After
Confirm
Input
Keyboard shortcuts
Channel detail
Connect provider
Command palette
Toast
Error banner
Filter sheet, 390 px
Confirm, 390 px

Absolutely light

Before After
Confirm
Input
Keyboard shortcuts
Channel detail
Connect provider
Command palette
Toast
Error banner
Filter sheet, 390 px
Confirm, 390 px

CRT stays square

Before After
Confirm
Channel detail
Toast
Filter sheet, 390 px

Beacon keeps its contrast

Before After
Confirm
Channel detail
Toast
Filter sheet, 390 px

Forced colors and reduced transparency

After only, with the media features emulated in Chromium.

Forced colors Forced colors Reduced transparency

Checks

  • oxfmt --check, lint:ui:styles, oxlint: pass.
  • UI tests for styles, toast, modal, exec approval and command palette: 144 pass. Browser tests for toast, modal and corner shape: 59 pass.
  • ui/src/lib/toast.browser.test.ts encoded 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.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR unifies dialog, sheet, toast, and banner styling through shared theme tokens.

Example: Open the session Delete confirmation in the CRT theme.

  • Before: The dialog retains rounded corners.
  • After: The dialog follows CRT’s nearly square theme geometry.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, scoped visual consolidation with credible screenshots, held by one introduced modal interaction defect.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected screenshots show real Control UI triggers in the session-design mock producing the changed confirmation, input, toast, banner, and mobile surfaces, including CRT, Beacon, and forced colors; the author explicitly records consumers without visual coverage.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Dialogs and notifications use inconsistent corners, surfaces, spacing, and controls across themes.
Reason: The maintainer-authored direction extends the author’s prior merged surface work and consolidates styling in existing owners without adding configuration or runtime machinery.

Regression provenance

Possible 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
Reviewed head: 4559c2429b87e30ee5b086994183ff1763cca82e

Before merge

Findings

  • [P2] Preserve transient-menu interaction outside the dialog’s clipped panel — ui/src/components/solid/modal-dialog.css:18

Tests

  • Missing end-to-end proof: The app screenshots do not exercise a link-menu action inside a modal; the existing browser integration scenario covers that boundary and currently fails.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8947d99e7656.

Provenance checked

  • Native modal surface and clipping changes intended behavior with a stated reason (b68c44c: The native overlay migration preserved caller interaction, focus, cancellation, and appearance, including transient UI inside dialogs.)
  • Theme radii and shared menu elevation keeps the original intent (improve(control-ui): continuous corner curvature with a radius scale #124129: Theme-aware corner geometry derives from a shared scale while preserving deliberately rounded shapes; later menu work established the surface and shadow tokens reused here.)
  • Toast geometry changes intended behavior with a stated reason (improve(ui): make toast feedback compact and recovery readable #151575: The approved compact notification design retained readable recovery text, reachable actions, and full-size phone targets; this PR retains the mobile control size while reducing desktop controls.)
  • Consumer panel decorations changes intended behavior with a stated reason (feat(ui): add machine details and worker stop confirmation #176445: Consumer features supplied their own panel treatment; placement, agent creation, pairing, previews, and setup history likewise show feature-owned decoration that this PR explicitly transfers to the shared native shell.)
  • Lazy stylesheet ownership keeps the original intent (perf(ui): defer optional styles from cold routes #183678: Optional component styles were moved to existing lazy owners to reduce cold-route CSS without changing loading boundaries.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/components/transient-container.browser.test.ts src/components/modal-dialog.browser.test.ts src/lib/toast.browser.test.ts --project browser
  • OPENCLAW_UI_WEBKIT=1 pnpm --dir ui test src/components/transient-container.browser.test.ts src/components/modal-dialog.browser.test.ts src/lib/toast.browser.test.ts --project webkit
  • pnpm lint:ui:styles
  • git diff --check
  • Verify a link-menu action remains clickable inside a rendered modal while the shared corner treatment remains visible.

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 07fae10 adds ui/src/styles/base.css:380 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 07fae10c385a; files: ui/src/styles/base.css)

PR surface

Source -72, Tests 0. Total -72 across 24 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 23 105 177 -72
Tests 1 1 1 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 24 106 178 -72

Labels

Label changes:

  • add P2: The visual improvement introduces a bounded interaction regression for link-menu actions inside native dialogs.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The visual improvement introduces a bounded interaction regression for link-menu actions inside native dialogs.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 31, 2026, 2:37 PM ET / 18:37 UTC.

@vyctorbrzezowski
vyctorbrzezowski enabled auto-merge (squash) October 31, 2026 21:24
@vyctorbrzezowski
vyctorbrzezowski merged commit 7eb8696 into main Oct 31, 2026
81 of 85 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/dialog-sheet-toast-surfaces branch October 31, 2026 22:06
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant