Skip to content

improve(ui): clarify picker selection and keyboard focus - #132018

Merged
steipete merged 2 commits into
mainfrom
improve/picker-selection-contrast
Aug 28, 2026
Merged

steipete merged 2 commits into
mainfrom
improve/picker-selection-contrast

Conversation

@steipete

@steipete steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #131995

What Problem This Solves

Shared pickers make the roving keyboard option the prominent state, while the committed selection can lose its highlight as focus moves. Typography also looks louder than neighboring Appearance controls. The original muted-on-accent subtext bug is already fixed by #131402; this is the maintainer-approved refinement on top of it.

The real screenshot flow also exposed a connected bug: Escape from a font option exits Settings instead of only dismissing the popup.

Why This Change Was Made

Use one shared picker treatment: a quiet theme-aware tint/inset border for selection, neutral hover/current fill, brighter secondary text, and a distinct text-backed keyboard outline. The checkmark remains legible with black/white custom accents. Keep all existing dimensions, spacing, typography, corners, menu collision bounds, and overlay elevation.

The shared Settings Escape owner now recognizes an open Web Awesome select host. Slotted options hide their listbox in shadow DOM, and the shell's earlier document listener otherwise consumes Escape first. No per-picker handlers or changes to closed-trigger behavior. Also correct one stale settings-design comment link.

Scope: no new config, APIs, dependencies, schemas, persistence behavior, or component. Native selects retain platform rendering. Shared font/model/channel/wizard/workboard picker consumers inherit the CSS fix.

Production LOC: +19/-19, net 0. Tests: +151/-20, net +131 (includes the CI sequencing repair below). Removed the inverse current-row ink override and redundant option-color rule. Existing theme/browser fixtures absorb the regression coverage.

User Impact

Selected choices remain recognizable while browsing other options with the keyboard. Picker labels and descriptions remain readable, and the visual treatment fits neighboring settings. Escape closes the open picker without losing the Settings page or changing its value.

Evidence

AI-assisted; source, dependency contracts, tests, and every attached screenshot were inspected.

Real before/after

Captured from a real, task-isolated loopback Gateway with Chromium on Blacksmith Testbox, lease tbx_01m14s1y28nwdvf9993bj77jfz (stopped). No operator Gateway/state, mocked transport, injected CSS, or generated mockups. Baseline CSS comes from f7c5bd30730c726cf586fdbfbbbaea7133f2d72b, already including #131402. Candidate UI was rebuilt before capture.

Before After
Before: saturated selected row in surrounding Appearance settings After: quieter selected row matching neighboring settings

The selected Atkinson option stays highlighted while Fraunces has keyboard focus

Behavioral proof

  • Before: the theme browser regression observed selected fill changing from rgb(217, 119, 87) to transparent on ArrowDown. The independent Escape regression observed /new instead of /settings/appearance.
  • After: 44 browser tests passed in one final run. Coverage: all 14 built-in theme/mode combinations plus black/white custom accents in both modes, rendered selected/current/hover text contrast, distinct focus, forced colors, wizard answer submission, font persistence, Settings Escape ownership, and neighboring Inbox behavior.
  • 29 local unit tests passed for shared picker and native shell/editor/modal siblings.
  • UI build/performance checks, UI typecheck, scoped oxlint/stylelint/format, git diff --check, and fresh Codex Autoreview passed. Autoreview reported no accepted/actionable findings.

Commands:

pnpm ui:build
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/theme-muted-contrast.e2e.test.ts ui/src/e2e/channel-wizard-option-contrast.e2e.test.ts ui/src/e2e/sidebar-settings.e2e.test.ts ui/src/e2e/theme-typography.e2e.test.ts
node scripts/run-vitest.mjs ui/src/app/app-host-native-shell.test.ts ui/src/components/select-picker.test.ts
node scripts/run-tsgo.mjs -p tsconfig.ui.json

Local environment limitation: the local UI build/browser attempt and full check:changed hit actual ENOSPC; the latter failed writing a core-test .tsbuildinfo, not a source diagnostic. Browser/build proof therefore ran on Testbox; the non-incremental UI typecheck and scoped lint/unit checks passed locally. Exact-head hosted CI remains the final merge gate.

Owner/dependency evidence

view-appearance.ts → renderPicker → select-picker.css; sibling adapters model-picker.ts, channel-picker.ts, wizard-step-controls.ts, and workboard-select.ts. Installed Web Awesome option/select source confirms separate selected/current states, the checked-icon part, reflected open attribute, and ArrowDown-versus-Enter behavior. Styling the committed :state(selected) is deliberate; [selected] is only the initial/default input.

The Escape guard was carried forward in #117103 (7bae24760b09, authored and merged by @steipete, 2026-07-31); that is guard provenance, not a claim that the refactor introduced the interaction defect. The fix stays at the shared shell boundary. A generic composed-path rewrite was considered but would also change closed shadow-input Escape behavior, which this PR intentionally preserves.

CI repair / ClawSweeper rank-up follow-through

The failed UI E2E shard was traced to an existing board-mcp-app.e2e.test.ts ordering race, not the picker change. Its 7-second fixture lease renews 5 seconds before expiry; the 2211ms failure sampled the iframe between teardown and replacement.

Commit 38544d320f3ad3620dd33f797b35d36530c517ab moves the existing renewal wait before color sampling and requires the recorded mcp.app.view request for renewed-view, which the owner emits after removing the old frame. All existing color/request assertions remain; no production code, retries, or expanded overall wait budget. The four-case dashboard E2E file passes locally, UI typecheck/scoped lint pass, and a fresh Autoreview of this test-only repair is clean. Exact-head CI is running again.

This directly addresses the latest ClawSweeper rank-up request to resolve the failed shard. No re-review request is needed for a fresh review followed only by its requested CI repair.

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 28, 2026
@steipete
steipete marked this pull request as ready for review August 28, 2026 18:33
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 3:08 PM ET / 19:08 UTC.

ClawSweeper review

What this changes

The PR refines shared Control UI picker selection and keyboard-focus styling, makes Escape dismiss an open picker before leaving Settings, and stabilizes a related dashboard browser test.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this maintainer-owned, protected PR open for normal merge review. No actionable correctness defect was found in the introduced changes; exact-head CI is still incomplete.

Priority: P3
Reviewed head: 38544d320f3ad3620dd33f797b35d36530c517ab

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused owner-boundary patch and supplied browser evidence support a normal mergeable-quality rating, pending exact-head CI.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate, though its supplied isolated Chromium/Testbox captures and browser results directly target the changed shared picker and Settings Escape behavior. Attachment retrieval was unavailable in this reviewer environment.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate, though its supplied isolated Chromium/Testbox captures and browser results directly target the changed shared picker and Settings Escape behavior. Attachment retrieval was unavailable in this reviewer environment.
Evidence reviewed 8 items Shared picker owner and callers: The shared renderer emits Web Awesome select and option elements, marks the committed value selected, and is reused by model, channel, Appearance, and workboard picker callers.
Introduced Escape ownership repair: Both capture- and bubble-phase Settings Escape handlers defer to the shared guard; the introduced selector recognizes an open select host, preserving the control's own Escape handling.
Introduced persistent-selection styling: The shared stylesheet separates committed selected state from current keyboard state and adds a visible focus outline without changing picker values or configuration.
Findings None None.
Security None None.

How this fits together

The Control UI renders settings pickers with Web Awesome controls; shared CSS presents selected and keyboard-focused options while the shell owns Settings-level Escape navigation. Browser E2E tests drive those controls through an isolated mock Gateway and Chromium.

flowchart LR
  A[Settings page] --> B[Shared picker]
  B --> C[Web Awesome select]
  C --> D[Keyboard focus and Escape]
  D --> E[Settings navigation]
  B --> F[Shared picker styles]
  F --> G[Rendered selection feedback]
Loading

Before merge

  • Resolve merge risk (P1) - The exact PR head still has incomplete CI, so merge should wait for the relevant checks to finish successfully.
  • Resolve merge risk (P1) - The local checkout lacks installed Web Awesome source and DNS prevented attachment/package retrieval; the supplied isolated browser evidence remains available to maintainers, but this reviewer could not independently open those artifacts.
  • Complete next step (P2) - No repair lane is needed; await the incomplete exact-head CI before ordinary maintainer merge review.
Agent review details

Security

None.

PR surface

Source 0, Tests +131. Total +131 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 3 19 19 0
Tests 4 151 20 +131
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 170 39 +131

Review metrics

Metric Value Why it matters
Production versus test LOC production +19/-19 (net 0); tests +151/-20 (net +131) The shared UI behavior remains production-net-neutral while browser coverage expands across selection, focus, Escape, and the repaired test ordering.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #131995
Summary: This PR is the open implementation candidate for the approved shared picker refinement tracked by the linked issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the shared picker styling and shared shell-bound Escape repair after the remaining exact-head CI is green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the shared picker styling and shared shell-bound Escape repair after the remaining exact-head CI is green.

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

Yes. Current source shows the Settings Escape handler receives keyboard events before an open shadow-DOM picker can close, and the focused browser tests cover that route plus independent selected/current styling.

Is this the best way to solve the issue?

Yes. The change belongs in the shared picker stylesheet and common shell Escape guard, covering every existing picker consumer without adding per-page handlers or configuration.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: This is a focused visual polish and interaction refinement, not a blocked workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate, though its supplied isolated Chromium/Testbox captures and browser results directly target the changed shared picker and Settings Escape behavior. Attachment retrieval was unavailable in this reviewer environment.

Evidence

What I checked:

  • Shared picker owner and callers: The shared renderer emits Web Awesome select and option elements, marks the committed value selected, and is reused by model, channel, Appearance, and workboard picker callers. (ui/src/components/select-picker.ts:45, 38544d320f3a)
  • Introduced Escape ownership repair: Both capture- and bubble-phase Settings Escape handlers defer to the shared guard; the introduced selector recognizes an open select host, preserving the control's own Escape handling. (ui/src/app/app-shell-chrome.ts:521, 38544d320f3a)
  • Introduced persistent-selection styling: The shared stylesheet separates committed selected state from current keyboard state and adds a visible focus outline without changing picker values or configuration. (ui/src/styles/select-picker.css:40, 38544d320f3a)
  • Dependency signal: The route-local adapter directly imports Web Awesome select and option components; the changed state and part selectors therefore depend on that package's component contract. (ui/src/components/web-awesome-select.ts:2, 38544d320f3a)
  • Focused behavioral coverage: The introduced browser tests exercise keyboard focus, selected-value retention, wizard submission, and the two-step Escape behavior, while the dashboard test waits for the renewed frame request before sampling it. (ui/src/e2e/sidebar-settings.e2e.test.ts:15, 38544d320f3a)
  • Current-main comparison: The fetched current-main copy retains the earlier current-state styling and does not include the open-select Escape guard, so this PR's central behavior is not already implemented there. (ui/src/styles/select-picker.css:1, adf5c6738216)

Likely related people:

  • steipete: Current history attributes the preceding shared picker and Escape-guard work to Peter Steinberger, including the PR's introduced selector. (role: recent Control UI contributor and shared-shell owner; confidence: high; commits: 02f56eb6cee0, cc9bc43adfdd, 7bae24760b09; files: ui/src/app/app-shell-chrome.ts, ui/src/styles/select-picker.css)
  • Patrick-Erichsen: The merged picker subtext contrast fix is the directly adjacent prior styling change to this shared owner. (role: adjacent picker-style contributor; confidence: high; commits: 79a119ef3249; files: ui/src/styles/select-picker.css, ui/src/e2e/channel-wizard-option-contrast.e2e.test.ts)

Rank-up moves

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

  • Wait for the remaining exact-head CI checks to complete successfully.

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-28T18:42:52.533Z sha cc9bc43 :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready verification for 38544d3.

  • Shared selection/focus styling and the open-picker Escape guard are verified. Production remains +19/-19 (net 0); the final addition is test-only.
  • Inspected real Gateway before/after and keyboard screenshots are in the PR body. No generated mockup or mocked transport is used for those captures.
  • 44 focused browser tests, 29 local picker/shell unit tests, and 4 dashboard MCP App E2E tests passed. Fresh Autoreview is clean for both the visual patch and the CI sequencing repair.
  • Exact-head CI run 33201028633 succeeded; the required openclaw/ci-gate is successful from GitHub Actions app 15368 on this head.
  • ClawSweeper’s rank-up request is addressed: the failed dashboard test sampled during lease replacement. The repair waits for the recorded renewed binding before sampling, preserving the existing color/request assertions. No production retry or larger overall wait budget. The subsequent guard failures were GitHub HTTP 500 diff errors, not findings; reruns were requested after the diff endpoint recovered.

Commands verified:

pnpm ui:build
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/theme-muted-contrast.e2e.test.ts ui/src/e2e/channel-wizard-option-contrast.e2e.test.ts ui/src/e2e/sidebar-settings.e2e.test.ts ui/src/e2e/theme-typography.e2e.test.ts
node scripts/run-vitest.mjs ui/src/app/app-host-native-shell.test.ts ui/src/components/select-picker.test.ts
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/board-mcp-app.e2e.test.ts
node scripts/run-tsgo.mjs -p tsconfig.ui.json
node scripts/check-changed.mjs -- ui/src/app/app-shell-chrome.ts ui/src/e2e/channel-wizard-option-contrast.e2e.test.ts ui/src/e2e/sidebar-settings.e2e.test.ts ui/src/e2e/theme-muted-contrast.e2e.test.ts ui/src/styles/select-picker.css ui/src/styles/settings.css

UI build/browser proof used Blacksmith Testbox 33198096702, now stopped. After the local ENOSPC condition cleared, the complete local changed gate passed using a task-local Corepack shim for the repository-pinned pnpm; the dashboard test repair also passed scoped lint/typecheck. No remaining code/proof gap; proceeding only through native prepare/merge.

@steipete
steipete merged commit a010ffe into main Aug 28, 2026
168 of 171 checks passed
@steipete
steipete deleted the improve/picker-selection-contrast branch August 28, 2026 19:20
@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 29, 2026
…2018)

* improve(ui): clarify picker selection and keyboard focus

* test(ui): observe renewed dashboard frame before sampling colors
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve shared picker selection contrast and settings consistency

1 participant