Skip to content

improve(ui): align transient menu chrome with design-system geometry - #122109

Merged
steipete merged 4 commits into
mainfrom
steipete/context-menu-design-system-91aa10
Aug 11, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/context-menu-design-system-91aa10

Conversation

@steipete

@steipete steipete commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Control UI transient menus—context menus and dropdowns—used a heavy, extra-round panel recipe (14px panel radius, 10px item pills, 6px padding, and --shadow-lg) copy-pasted across roughly 14 surfaces. Two strays also hardcoded their own values. The look had drifted from the carapace design system, and menus could not be tuned consistently from one place.

Why This Change Was Made

This introduces three semantic tokens in base.css: --menu-radius, --menu-item-radius, and --menu-padding. They encode a concentric geometry contract—6px item radius plus 4px padding equals a 10px panel radius—while every menu panel now shares padding, border, radius, background, and --shadow-md. Menu items are 28px tall with flat --bg-hover, and fixed-position menus (excluding wa-dropdown) get a 140ms entrance-only menu-in animation.

The chat reply context menu, selection popup, terminal session picker, and board, cron, usage, and tool-card dropdowns are folded into the same recipe. This follows the openclaw/carapace menu-panel/model-menu design expressed through existing OpenClaw tokens; it does not import --oc-* tokens.

User Impact

Every transient menu in the web UI now looks tighter and consistent. There is no behavior change.

Evidence

Surface Before After
Session context menu Session context menu before Session context menu after
Customize dropdown Customize dropdown before Customize dropdown after
  • node scripts/check-changed.mjs passed for the coreTests and ui lanes. Remote providers were unavailable, so the documented local fallback was used.
  • Focused menu-surface.test.ts: 5 passed.
  • Focused theme-contrast.test.ts: 2 passed.
  • Targeted stylelint and oxfmt checks passed.
  • Codex autoreview was clean on the exact diff.
  • An unrelated CI flake was root-caused and fixed here: the ACP exact-empty stderr assertion raced the load-dependent SQLite slow-transaction-hold diagnostic. Focused acp-cli-exit.process.test.ts: 5 passed.
  • ClawSweeper P2 accepted and fixed: --menu-item-height stays 28px normally and flips to 44px under pointer: coarse, with Chromium browser coverage for the computed row height.

Production code is net +37 lines. The growth is the semantic token block, the shared entrance keyframe, and owned panel recipes for two dropdowns that previously relied on library defaults.

Release-note context for squash: user-visible UI refinement; no contributor credit (maintainer work).

Use one shared transient-menu recipe across Control UI panels and items.

Match the carapace reference: 6px item radius plus 4px inset yields a 10px panel radius, with restrained motion for fixed menus.
@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 11, 2026 15:30
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 11, 2026
@steipete steipete closed this Aug 11, 2026
@steipete steipete reopened this Aug 11, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. 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 Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 11, 2026, 12:51 PM ET / 16:51 UTC.

ClawSweeper review

What this changes

This PR introduces shared Control UI menu geometry tokens, applies them across several menu surfaces, restores 44px coarse-pointer rows, and relaxes ACP stderr assertions for SQLite diagnostics.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open: the shared menu recipe misses the composer attachment/capability menu, and the unrelated ACP change suppresses all SQLite transaction warnings rather than only the known benign diagnostic.

Priority: P2
Reviewed head: 025acabc8fdb25974f37344687c6c3b7fc7e4488

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The visual refactor has direct evidence and a resolved prior finding, but two concrete P2 corrections remain before it is merge-ready.
Proof confidence 🌊 off-meta tidepool Not applicable: This is maintainer-authored work, so the external-contributor proof gate does not apply; the supplied before/after screenshots remain useful supplemental evidence.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is maintainer-authored work, so the external-contributor proof gate does not apply; the supplied before/after screenshots remain useful supplemental evidence.
Evidence reviewed 5 items Composer menu remains outside the recipe: The current composer menu explicitly retains 5px padding, the previous border/shadow values, and 34px rows; the PR patch does not modify this rule, so the new root tokens cannot standardize that menu.
Shared-token change is incomplete: The supplied exact-head patch adds the menu token block but contains no corresponding composer-menu change, despite renderChatComposerPlusMenu producing the affected wa-dropdown.
ACP filter hides non-benign warnings: The SQLite transaction logger emits distinct slow-hold, slow-lock-wait, and lock-failure warnings through the same sqlite/transaction subsystem; filtering only by its prefix masks all of them.
Findings 2 actionable findings [P2] Apply the shared recipe to composer menus
[P2] Whitelist only the benign SQLite hold diagnostic
Security None None.

How this fits together

Control UI menus combine shared theme tokens with local CSS rules for each page or component. Those rules feed visible menus in chat, sidebar, terminal, cron, board, and usage views.

flowchart LR
  A[Theme tokens] --> B[Shared menu recipe]
  C[Local menu CSS] --> D[Rendered Control UI menus]
  B --> D
  E[Coarse pointer rule] --> B
  D --> F[Browser and E2E checks]
Loading

Before merge

  • Apply the shared recipe to composer menus (P2) - The new root tokens do not affect the explicit .agent-chat__attach-menu overrides, so the composer attachment/capability menu keeps 5px padding, --shadow-lg, and 34px interactive rows. Apply the same panel and row tokens here and extend focused browser coverage; otherwise this prominent transient menu remains outside the stated unified design.
  • Whitelist only the benign SQLite hold diagnostic (P2) - This prefix filter suppresses every [sqlite/transaction] warning, including slow lock waits and lock failures emitted by the same logger. Keep the clean-exit assertion meaningful by matching only the documented load-dependent slow-hold warning or by removing this unrelated test change.
  • Resolve merge risk (P1) - The composer attachment/capability menu will retain visibly different panel geometry and 34px rows while the rest of the UI adopts the shared recipe.
  • Resolve merge risk (P1) - The ACP process test can pass while a lock-wait or transaction-failure warning reaches stderr, weakening CI's clean-exit signal.

Findings

  • [P2] Apply the shared recipe to composer menus — ui/src/styles/base.css:169-175
  • [P2] Whitelist only the benign SQLite hold diagnostic — src/cli/acp-cli-exit.process.test.ts:70
Agent review details

Security

None.

PR surface

Source +45, Tests +30. Total +75 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 12 140 95 +45
Tests 2 56 26 +30
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 196 121 +75

Review metrics

Metric Value Why it matters
Production versus test delta production +140/-95 (net +45); tests +56/-26 (net +30) The shared-style rollout is a net production increase across UI owners, while the two test files add coverage and alter the ACP stderr contract.

Merge-risk options

Maintainer options:

  1. Complete the shared-menu rollout (recommended)
    Apply the token recipe to the composer attachment/capability dropdown and narrow the ACP allowance to the precise slow-hold message before merge.
  2. Drop the ACP assertion change
    Keep the UI-only refactor but remove the unrelated stderr filtering if its exact benign diagnostic cannot be distinguished safely.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Apply shared panel and row tokens to the composer attachment/capability menu, preserve its width constraints, narrow ACP stderr filtering to the exact slow-hold diagnostic, and add focused browser/regression coverage.

Technical review

Best possible solution:

Apply the shared panel and interactive-row tokens to the composer menu while retaining its width constraints, and whitelist only the exact load-dependent slow-hold diagnostic in the ACP assertion.

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

Yes, source-reproducible: opening the composer attachment/capability dropdown retains its local 5px/34px recipe rather than the new shared token values.

Is this the best way to solve the issue?

No: central tokens are the right owner boundary, but the composer menu must consume them and the ACP test must retain visibility into non-benign transaction warnings.

Full review comments:

  • [P2] Apply the shared recipe to composer menus — ui/src/styles/base.css:169-175
    The new root tokens do not affect the explicit .agent-chat__attach-menu overrides, so the composer attachment/capability menu keeps 5px padding, --shadow-lg, and 34px interactive rows. Apply the same panel and row tokens here and extend focused browser coverage; otherwise this prominent transient menu remains outside the stated unified design.
    Confidence: 0.96
  • [P2] Whitelist only the benign SQLite hold diagnostic — src/cli/acp-cli-exit.process.test.ts:70
    This prefix filter suppresses every [sqlite/transaction] warning, including slow lock waits and lock failures emitted by the same logger. Keep the clean-exit assertion meaningful by matching only the documented load-dependent slow-hold warning or by removing this unrelated test change.
    Confidence: 0.95

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: The patch leaves a prominent active Control UI menu outside its stated shared styling and weakens a focused process regression assertion.
  • merge-risk: 🚨 automation: The ACP assertion can hide unexpected SQLite transaction warnings and allow a regression to pass CI.
  • merge-risk: 🚨 other: A partial shared-token rollout produces inconsistent geometry and touch-target behavior across existing menus.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This is maintainer-authored work, so the external-contributor proof gate does not apply; the supplied before/after screenshots remain useful supplemental evidence.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs ui/src/pages/chat/chat-responsive.browser.test.ts.
  • [P1] node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-composer-capability-menu.e2e.test.ts.
  • [P1] node scripts/run-vitest.mjs src/cli/acp-cli-exit.process.test.ts.

What I checked:

  • Composer menu remains outside the recipe: The current composer menu explicitly retains 5px padding, the previous border/shadow values, and 34px rows; the PR patch does not modify this rule, so the new root tokens cannot standardize that menu. (ui/src/styles/chat/layout.css:2705, fe4cff7a6b24)
  • Shared-token change is incomplete: The supplied exact-head patch adds the menu token block but contains no corresponding composer-menu change, despite renderChatComposerPlusMenu producing the affected wa-dropdown. (ui/src/styles/base.css:169, 025acabc8fdb)
  • ACP filter hides non-benign warnings: The SQLite transaction logger emits distinct slow-hold, slow-lock-wait, and lock-failure warnings through the same sqlite/transaction subsystem; filtering only by its prefix masks all of them. (src/infra/sqlite-transaction.ts:104, fe4cff7a6b24)
  • Previous touch-target finding was addressed: The previous reviewed SHA is an ancestor of the current head, and the only later UI source changes include the coarse-pointer follow-up; the supplied patch adds the 44px media override and browser assertion. (ui/src/styles/base.css:196, 025acabc8fdb)
  • Inspection limitation: GitHub and missing partial-clone blobs could not be fetched because DNS/network access failed; this review relies on the supplied exact-head patch context plus locally readable current-main sources.

Likely related people:

  • Yuval Dinodia: Current-menu baseline lines blame to this author in the locally available history; shallow provenance prevents stronger ownership attribution. (role: baseline style contributor; confidence: low; commits: 01d84e18a4f6; files: ui/src/styles/base.css, ui/src/styles/layout.css, ui/src/styles/chat/layout.css)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Apply the shared menu recipe to the composer attachment/capability dropdown and cover its desktop and coarse-pointer styles.
  • Narrow the ACP stderr allowance so unexpected SQLite transaction diagnostics still fail the process test.

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 (1 earlier review cycle)
  • reviewed 2026-08-11T15:52:58.484Z sha 36ba84c :: found issues before merge. :: [P2] Restore 44px touch targets for menu rows

@openclaw-barnacle openclaw-barnacle Bot added the cli CLI command changes label Aug 11, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Aug 11, 2026
@steipete
steipete merged commit 8fa897a into main Aug 11, 2026
199 of 202 checks passed
@steipete
steipete deleted the steipete/context-menu-design-system-91aa10 branch August 11, 2026 17:08
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 12, 2026
…penclaw#122109)

* improve(ui): align transient menu chrome with design-system geometry

Use one shared transient-menu recipe across Control UI panels and items.

Match the carapace reference: 6px item radius plus 4px inset yields a 10px panel radius, with restrained motion for fixed menus.

* test(ui): align gateway picker menu expectations

* test(cli): keep benign sqlite diagnostics out of ACP exit stderr assertions

* fix(ui): restore 44px menu touch targets on coarse pointers
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 cli CLI command changes maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. 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