Skip to content

improve(ui): unify transient surface elevation - #125065

Merged
vyctorbrzezowski merged 9 commits into
mainfrom
ui/overlay-tokens
Aug 19, 2026
Merged

vyctorbrzezowski merged 9 commits into
mainfrom
ui/overlay-tokens

Conversation

@vyctorbrzezowski

Copy link
Copy Markdown
Member

Related: #123655

What Problem This Solves

Menus, popovers, dropdowns, and listboxes currently use competing border and shadow treatments across the Control UI, which makes equivalent transient surfaces appear to sit at different elevations.

This is a standalone extraction of the popover-token thesis from the closed sidebar PR chain. The source work was #123655; no original issue was identified for this thesis.

Why This Change Was Made

This change defines shared transient-surface border and shadow tokens, including theme-family overrides, and applies them across the existing menu, popover, dropdown, listbox, and terminal-menu surfaces. It intentionally excludes tooltip behavior, menu geometry, destructive states, and other theses that were coupled to #123655.

User Impact

Menus, popovers, dropdowns, and listboxes now present a consistent edge and elevation hierarchy across light and dark themes without changing their content or interaction behavior.

Evidence

  • Added mocked-Gateway browser coverage that compares the rendered session-menu and settings-listbox border/shadow contract across Claw, Knot, and Dash in light and dark modes.
  • git diff --check passed.
  • Test execution, screenshots, semantic review, and CI monitoring are intentionally deferred to the external review and proof loop for this standalone extraction.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 17, 2026 05:06
@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 17, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 17, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 19, 2026, 10:31 AM ET / 14:31 UTC.

ClawSweeper review

What this changes

This PR centralizes Control UI border and shadow tokens for transient menus, popovers, dropdowns, listboxes, and terminal menus.

Merge readiness

⛔ Blocked by patch quality or review findings - 4 items remain

Keep open: the prior scope blocker remains. The new global overlay tokens also restyle existing tooltips, although this PR explicitly excludes tooltip behavior, and the new E2E test does not cover that effect.

Priority: P3
Reviewed head: befc14cfe6a5871203587c74cbe76405a12cf9cc

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Rendered menu proof is useful, but the remaining scope regression blocks merge readiness.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the inspected screenshot directly shows the after-change session menu but not tooltip behavior.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the inspected screenshot directly shows the after-change session menu but not tooltip behavior.
Evidence reviewed 5 items Changed token definitions: The PR adds global overlay border and shadow tokens, which are inherited by any existing consumer.
Tooltip fallback consumes the new tokens: The existing tooltip component falls back to overlay border and shadow tokens, so the new definitions change its visible treatment.
New E2E coverage omits tooltip behavior: The test opens a session menu and a settings listbox, then compares their computed styles; it never opens or asserts a tooltip.
Findings 1 actionable finding [P2] Keep shared tokens from restyling tooltips
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/sidebar-transient-surfaces.e2e.test.ts

Result: FAIL (failed) — step 1 run node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/sidebar-transient-surfaces.e2e.test.ts: terminal command did not produce output within 20 seconds: "node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/sidebar-transient-surfaces.e2e.test.ts"

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/sidebar-transient-surfaces.e2e.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-125065-NxfaIV/target$ node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoad
er runner ui/src/e2e/sidebar-transient-surfaces.e2e.test.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-125065-NxfaIV/target

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/sidebar-transient-surfaces.e2e.test.ts












































Assertions:

  • FAIL expect_output: uses one transient surface contract

How this fits together

Control UI theme tokens feed both custom CSS surfaces and Web Awesome shadow-DOM controls. Opening a menu, popover, select, or tooltip resolves these tokens into the visible border and elevation treatment.

flowchart LR
A[Theme selection] --> B[Shared overlay tokens]
B --> C[Custom surface styles]
B --> D[Web Awesome controls]
C --> E[Menus and popovers]
D --> F[Dropdowns, selects, tooltips]
E --> G[Control UI users]
F --> G
Loading

Before merge

  • Keep shared tokens from restyling tooltips (P2) - These definitions feed the existing tooltip fallbacks in ui/src/components/tooltip.ts:249-262, so this PR changes tooltip border and shadow despite excluding tooltip behavior. Preserve the prior tooltip fallback or explicitly include and prove that additional visual change.
  • Resolve merge risk (P1) - Merging changes tooltip border and shadow treatment outside the PR's stated scope, with no tooltip browser coverage.
  • Improve patch quality - Restore tooltip independence or explicitly broaden and prove tooltip styling.
  • Improve patch quality - Run the focused Control UI E2E test on the repaired exact head.

Findings

  • [P2] Keep shared tokens from restyling tooltips — ui/src/styles/base.css:214-215
Agent review details

Security

None.

PR surface

Source +18, Tests +117. Total +135 across 16 files.

View PR surface stats
Area Files Added Removed Net
Source 15 78 60 +18
Tests 1 117 0 +117
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 195 60 +135

Review metrics

Metric Value Why it matters
Production versus test LOC production +78/-60 (net +18); tests +117/-0 The shared CSS expansion is justified by a cross-surface visual contract, but its global reach must exclude or explicitly cover tooltips.

Stored data model

Persistent data-model change detected: serialized state: ui/src/e2e/sidebar-transient-surfaces.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Preserve tooltip independence (recommended)
    Keep tooltips on their prior fallback values and retain shared overlay tokens only for the transient surfaces named in this PR.
  2. Broaden the visual change intentionally
    Amend the scope to include tooltips and add focused browser proof for tooltip rendering in every affected theme family.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Restore the tooltip’s prior border and shadow fallback, retain the menu/listbox token test, and add a focused assertion that tooltip defaults remain independent.

Technical review

Best possible solution:

Either restore the tooltip-specific border and shadow fallbacks, or explicitly include tooltip restyling in scope and prove it in the browser.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: an existing tooltip resolves its fallback through the new global overlay tokens, while the added E2E covers only a menu and listbox.

Is this the best way to solve the issue?

No. The shared-token approach is suitable for the named surfaces, but it must preserve tooltip defaults or deliberately include and prove the tooltip change.

Full review comments:

  • [P2] Keep shared tokens from restyling tooltips — ui/src/styles/base.css:214-215
    These definitions feed the existing tooltip fallbacks in ui/src/components/tooltip.ts:249-262, so this PR changes tooltip border and shadow despite excluding tooltip behavior. Preserve the prior tooltip fallback or explicitly include and prove that additional visual change.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 16d1e486e015.

Labels

Label changes:

  • add merge-risk: 🚨 other: The global token definitions visibly alter existing tooltip styling outside the stated surface scope.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The author is a repository member, so the external-contributor proof gate does not apply; the inspected screenshot directly shows the after-change session menu but not tooltip behavior.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review merge-risk labels are merge-risk: 🚨 other.

Label justifications:

  • P3: This is a visual-consistency refinement without evidence of a user-facing availability or data-loss impact.
  • merge-risk: 🚨 other: The global token definitions visibly alter existing tooltip styling outside the stated surface scope.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the inspected screenshot directly shows the after-change session menu but not tooltip behavior.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The author is a repository member, so the external-contributor proof gate does not apply; the inspected screenshot directly shows the after-change session menu but not tooltip behavior.

Evidence

Acceptance criteria:

  • [P1] pnpm test ui/src/components/tooltip.test.ts.
  • [P1] node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/sidebar-transient-surfaces.e2e.test.ts.

What I checked:

  • Changed token definitions: The PR adds global overlay border and shadow tokens, which are inherited by any existing consumer. (ui/src/styles/base.css:214, befc14cfe6a5)
  • Tooltip fallback consumes the new tokens: The existing tooltip component falls back to overlay border and shadow tokens, so the new definitions change its visible treatment. (ui/src/components/tooltip.ts:251, befc14cfe6a5)
  • New E2E coverage omits tooltip behavior: The test opens a session menu and a settings listbox, then compares their computed styles; it never opens or asserts a tooltip. (ui/src/e2e/sidebar-transient-surfaces.e2e.test.ts:111, befc14cfe6a5)
  • Current PR surface: The current diff contains 15 production style files and one new UI E2E test; the earlier CI and protocol changes are no longer in the PR diff. (ui/src/styles/base.css:214, befc14cfe6a5)
  • Available visual proof: The prepared screenshot shows session menus in desktop/mobile light and dark modes from the initial style head, but it does not show a listbox or tooltip. (e60d244e76b9)

Likely related people:

  • Peter Steinberger: Recent history on the shared style and tooltip paths includes the focused presentation and token-layer refactors. (role: recent Control UI and tooltip maintainer; confidence: high; commits: 4af09d4961c9, 843017073cc2; files: ui/src/components/tooltip.ts, ui/src/styles/base.css)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-17T05:14:59.933Z sha e60d244 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-19T11:33:04.597Z sha c62c44d :: found issues before merge. :: [P2] Keep the shared tokens from restyling tooltips | [P2] Keep run-attempt-tools in its canonical shard

@clawsweeper

clawsweeper commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Visual UI proof

Rendered from exact head e60d244e76b9 with a focused mocked-Gateway transient-surface capture.

PR #125065 — desktop/mobile, light/dark

  • Desktop: 1440×900, light and dark
  • Mobile: 390×844, light and dark
  • Four capture cases passed after the real interaction sequence: hover the row, then open its menu.

Exact-head test note: all six checked-in sidebar-transient-surfaces.e2e.test.ts cases currently fail because they click the hover-revealed session-menu control before hovering; the row content intercepts the click. The screenshots above use the operator-visible hover-then-click flow; no source fix was applied.

@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Aug 19, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 19, 2026
# Conflicts:
#	packages/gateway-protocol/src/index.ts
@openclaw-barnacle openclaw-barnacle Bot removed the gateway Gateway runtime label Aug 19, 2026
@clawsweeper clawsweeper Bot removed the rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. label Aug 19, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 19, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit b24430f into main Aug 19, 2026
155 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the ui/overlay-tokens branch August 19, 2026 14:44
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
* refactor(ui): unify transient surface tokens

* test(ui): reveal transient session menu before click

* test(ui): scope transient menu surface to session row

* test(ui): target transient session menu by accessible owner

* test(ui): capture transient surface proof

* fix(ci): register Codex tool coverage

* fix(protocol): keep version exports compact
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 maintainer Maintainer-authored PR merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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.

2 participants