Skip to content

improve(ui): align picker interaction feedback - #133650

Merged
vyctorbrzezowski merged 1 commit into
openclaw:mainfrom
vyctorbrzezowski:improve/picker-design-contract
Sep 3, 2026
Merged

vyctorbrzezowski merged 1 commit into
openclaw:mainfrom
vyctorbrzezowski:improve/picker-design-contract

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Closes #133642

Reported and repaired by @vyctorbrzezowski.

What Problem This Solves

Equivalent picker controls were giving different or missing hover, selected, keyboard-focus, surface, and opening-motion feedback. In particular, Web Awesome dropdown items do not expose a base part, so several ::part(base) rules never affected the visible rows; selected permission and microphone rows could therefore render without their intended wash.

Why This Change Was Made

This moves dropdown-item geometry and state styling to the public host contract, uses Web Awesome's hover and duration custom properties, and gives model/effort popups the same fast scale/fade family as dropdown menus. The repair follows the existing Web Awesome implementation instead of adding a custom picker abstraction or dependency.

Reduced motion is owned once for the Web Awesome menu family, and inline popup animation is explicitly disabled at the shadow part boundary. Selected rows share one global theme token. Light-theme field triggers keep their existing white pixel through --bg-elevated; this is tokenization, not a product color change.

User Impact

  • Selected permission, microphone, agent, and provider choices have a consistent neutral wash.
  • Web Awesome menu rows use the Control UI hover surface and intended geometry.
  • Model and effort popups animate from the edge they are actually placed against, using the same 75 ms fast token as Web Awesome dropdowns.
  • Operators who request reduced motion receive no dropdown/popover/select or inline-popup opening animation.
  • Search, selection, keyboard, responsive placement, and shared-sidebar behavior remain unchanged.

Production CSS: +64/-95 (net -31). Tests: +148/-0.

Evidence

Permission selected state

Before:

Permission picker before: selected row had no wash

After (final rebased build):

Permission picker after: selected Workspace row has the shared wash

Agent picker, light theme

Before:

Agent picker before

After:

Agent picker after with selected-row wash

Model Setup provider picker

Before:

Model Setup picker before

After:

Model Setup picker after with selected-row wash and retained trigger surface

Microphone picker unavailable state

Before:

Microphone picker before

After:

Microphone picker after with stable unavailable-state geometry

All attached images were captured from real mocked-Gateway browser flows and inspected before upload.

Regression and browser proof

  • Exact pre-fix parent: OPENCLAW_VITEST_MAX_WORKERS=2 pnpm test ui/src/e2e/chat-picker-interaction-contract.e2e.test.ts — failed 2/2 as intended: selected and unselected permission backgrounds were both transparent; inline popup animationName was none instead of chat-composer-picker-in.
  • Final head: the same command — passed 2/2. It covers selected permission wash, zero Web Awesome show/hide duration under reduced motion, normal inline-popup animation, top/bottom placement origins, and reduced-motion suppression for model and effort pickers.
  • OPENCLAW_VITEST_MAX_WORKERS=2 pnpm test ui/src/e2e/chat-flow.models-reasoning.e2e.test.ts — passed 13/13 before the final main refresh; the focused final-head contract test above re-proved the changed surface after the refresh.
  • New Session + Model Setup + Agent Select visual matrix — passed 4/4 focused cases; before/after artifacts retained.
  • Final rebased New Session permission visual flow — passed 1/1; screenshot above.
  • node --import ./scripts/tsx.mjs scripts/capture-composer-mic-hover-proof.mts — passed before and after, with 0 px hover shift.
  • pnpm dlx [email protected] --check --no-error-on-unmatched-pattern -- <8 changed files> — passed using the formatter version pinned by current main.
  • pnpm exec oxlint ui/src/e2e/chat-picker-interaction-contract.e2e.test.ts — passed.
  • node scripts/run-tsgo.mjs -p tsconfig.ui.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/ui.tsbuildinfo — passed.
  • git diff --check — passed.
  • Autoreview — scoped clean; no actionable P0/P1 findings; overall correctness 0.97.

pnpm check:changed was run serially as required. The first run passed every stage through lint and correctly caught that adding coverage to an already-large test file exceeded its line budget; the coverage was moved into its own focused file. After the final main refresh, the rerun reached formatting and stopped because this worktree's pre-existing dependency tree still exposes Oxfmt 0.60 while current main pins 0.65. Worktree policy forbids dependency reconciliation here, so the exact pinned 0.65 formatter, focused lint, UI typecheck, and final browser test were run separately. Exact-head CI uses a clean dependency install and is the authoritative full gate.

Landing notes

  1. Rebased the original change onto current main and its split ui/src/styles/chat/composer.css owner; the branch is now a single fresh commit.
  2. Added owner-level reduced-motion handling for Web Awesome dropdown/popover/select durations and the inline popup shadow part.
  3. Added one global --menu-selected token and consumed it from composer, Agent Select, and Model Setup.
  4. Replaced hardcoded light-theme white with behavior-equivalent --bg-elevated; no trigger color change.
  5. Removed the Desktop card hunk because that card is not itself an interactive picker.
  6. Swept every stale wa-dropdown-item::part(base) rule. Unique host behavior moved to hosts; duplicate policy now comes from the existing canonical host rules.
  7. Made transform origin follow data-current-placement and aligned duration to Web Awesome's fast token.
  8. Added focused regression coverage that fails on the exact pre-fix parent and passes on the final head.

Latest ClawSweeper rank-up move: applied. Popup animation is suppressed for reduced-motion users, and the focused real-browser test verifies the computed animation plus Web Awesome duration values. No X-ray adjustment was skipped.

Scope confirmed by the maintainer: the Desktop source-card hover and keyboard-focus behavior described in #133642 is accepted as out of scope for this repair, so the closing reference stands as written.

Risk and coverage

What else could break:

  • .agent-select__option is shared with the sidebar agent menu. Existing sidebar host rules still override its padding, hover, and active treatment; the light/dark Agent Select flows pass.
  • Model Setup checkbox-adjacent rows retain Web Awesome's intentional leading rail; desktop/mobile provider flows pass and were inspected.
  • Removing dead part rules could expose duplicate-policy assumptions. The queue, attach/capability, side-panel, and sidebar owners now use host rules or their existing canonical session-menu__item policy; no dropdown-item base selectors remain.
  • Motion could originate from the wrong edge after a popup flip. The final browser test forces both top and bottom placement and checks the untransformed origin.

What remains uncovered:

  • Static screenshots cannot show the 75 ms opening motion; computed-style and placement assertions cover it instead.
  • Hover custom-property behavior is visually exercised but not separately asserted for every shared consumer.
  • Exact-head CI is still required to close the full changed-files gate with main's clean Oxfmt 0.65 dependency tree.

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

clawsweeper Bot commented Aug 31, 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 31, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 3, 2026, 4:55 PM ET / 20:55 UTC.

ClawSweeper review

What this changes

The PR moves picker styling to Web Awesome component hosts, standardizes selected and hover feedback, disables motion for reduced-motion users, and adds focused browser regression coverage.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep this PR open: it is a coherent, source-backed Control UI repair and addresses the prior reduced-motion finding. Its closing link needs scope confirmation because the linked report also includes Desktop source-card feedback that this branch intentionally leaves unchanged.

Priority: P3
Reviewed head: d2797d5cb2cb48a1797d1dfe3549139543410637
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A normal good UI repair with focused rendered-component coverage; only the linked issue's remaining Desktop scope needs a maintainer disposition.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER PR is exempt from the external-contributor proof gate; its body nevertheless supplies focused mocked-Gateway browser evidence and a final-head browser-test claim for the changed picker paths. GitHub-hosted screenshots could not be independently retrieved because the review environment had no network route.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER PR is exempt from the external-contributor proof gate; its body nevertheless supplies focused mocked-Gateway browser evidence and a final-head browser-test claim for the changed picker paths. GitHub-hosted screenshots could not be independently retrieved because the review environment had no network route.
Evidence reviewed 8 items Verified target and exact PR head: The checkout remote identifies openclaw/openclaw and HEAD is the reviewed PR head.
Current-main baseline lacks the repair: The verified fetched-main commit is the direct parent of the PR head; its composer stylesheet still contained the ineffective dropdown-item base-part selectors replaced by this patch.
Picker ownership and repaired boundary: Chat permission rows are Web Awesome dropdown items, while the patch applies their selected state at the host and applies inline-popup animation to the exported popup part.
Findings None None.
Security None None.

How this fits together

The Control UI renders Chat, agent, and provider pickers with Web Awesome components. Shared CSS tokens and picker-specific host styles determine the selection, hover, and motion feedback an operator sees after opening those controls.

flowchart LR
  Operator[Operator opens a picker] --> Picker[Chat or setup picker]
  Picker --> Component[Web Awesome control]
  Preferences[Theme and motion preference] --> Styles[Shared and picker CSS]
  Styles --> Component
  Component --> Feedback[Selection, hover, and motion feedback]
Loading

Decision needed

Question Recommendation
Should this PR continue to close #133642 when it intentionally omits that issue's Desktop source-card feedback request? Split the Desktop remainder: Recommended: retain this Web Awesome picker repair, remove the closing reference, and keep or create a focused follow-up for Desktop source-card feedback.

Why: The linked issue names Desktop source choices as an expected interaction surface, while the PR deliberately excludes its Desktop card change; only maintainers can settle whether that behavior belongs in the same product contract.

Before merge

  • Resolve merge risk (P1) - Merging with the current closing reference could close [Bug]: Picker interactions use inconsistent visual feedback and motion #133642 although its stated Desktop source-card hover/focus behavior is intentionally not covered here.
  • Resolve merge risk (P1) - The precise upstream Web Awesome stylesheet contract could not be independently inspected from this checkout; pending exact-head UI CI is the remaining independent package-level confirmation.
  • Complete next step (P2) - Confirm the linked issue scope and either remove its closing reference or address/split the remaining Desktop source-card feedback before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source -31, Tests +148. Total +117 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 7 64 95 -31
Tests 1 148 0 +148
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 212 95 +117

Review metrics

Metric Value Why it matters
Production versus test delta production -31 net (+64/-95), tests +148 The repair reduces CSS while adding one focused browser contract suite for the changed interaction boundary.

Merge-risk options

Maintainer options:

  1. Split the remaining Desktop behavior (recommended)
    Recommended: preserve this picker repair but remove its closing link until Desktop source-card feedback is tracked or implemented separately.
  2. Finish the broader interaction report
    Extend the PR only if maintainers want Desktop source cards to share the linked interaction contract.

Technical review

Best possible solution:

Keep the host-level picker repair, and split or retain the remaining Desktop source-card behavior rather than closing the broader linked report unless maintainers confirm that Desktop is out of scope.

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

Yes — the added browser suite defines a concrete current-base mocked Control UI path for the selected-state and motion defects, though this read-only review did not execute it.

Is this the best way to solve the issue?

Unclear — the host-level repair is the narrowest solution for the Web Awesome picker subset, but it is not the complete solution to the linked issue unless its Desktop request is split or explicitly excluded.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add merge-risk: 🚨 other: The current closing reference could prematurely resolve a broader linked report whose Desktop portion remains unmodified.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER PR is exempt from the external-contributor proof gate; its body nevertheless supplies focused mocked-Gateway browser evidence and a final-head browser-test claim for the changed picker paths. GitHub-hosted screenshots could not be independently retrieved because the review environment had no network route.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review merge-risk labels are merge-risk: 🚨 other.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is a low-severity Control UI consistency and accessibility-feedback repair.
  • merge-risk: 🚨 other: The current closing reference could prematurely resolve a broader linked report whose Desktop portion remains unmodified.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER PR is exempt from the external-contributor proof gate; its body nevertheless supplies focused mocked-Gateway browser evidence and a final-head browser-test claim for the changed picker paths. GitHub-hosted screenshots could not be independently retrieved because the review environment had no network route.

Evidence

What I checked:

  • Verified target and exact PR head: The checkout remote identifies openclaw/openclaw and HEAD is the reviewed PR head. (d2797d5cb2cb)
  • Current-main baseline lacks the repair: The verified fetched-main commit is the direct parent of the PR head; its composer stylesheet still contained the ineffective dropdown-item base-part selectors replaced by this patch. (ui/src/styles/chat/composer.css:2938, 2640154bcf80)
  • Picker ownership and repaired boundary: Chat permission rows are Web Awesome dropdown items, while the patch applies their selected state at the host and applies inline-popup animation to the exported popup part. (ui/src/pages/chat/components/chat-permission-picker.ts:159, d2797d5cb2cb)
  • Existing component boundary evidence: The existing browser test reaches Web Awesome's popup shadow root through its exported popup part, matching the repaired animation boundary. (ui/src/components/menu-surface.browser.test.ts:141, d2797d5cb2cb)
  • Focused browser regression coverage: The added Control UI browser test checks selected versus unselected permission styling, reduced-motion durations, popup animation, and top/bottom placement origins through the rendered component boundary. (ui/src/e2e/chat-picker-interaction-contract.e2e.test.ts:12, d2797d5cb2cb)
  • Dependency signal and inspection limitation: The Control UI directly imports Web Awesome dropdowns and pins patched Web Awesome 3.12.0. The dependency source was not materialized in this read-only checkout and GitHub reads were unavailable, so its upstream stylesheet contract could not be independently re-read here. (ui/src/components/web-awesome.ts:3, d2797d5cb2cb)

Likely related people:

  • Patrick Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vyctorbrzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Confirm the linked issue scope and either remove its closing reference or address/split the Desktop source-card behavior.

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-31T00:19:07.192Z sha d3e115f64bf02771b8472360deb21145b6f8c602 :: found issues before merge. :: [P2] Disable the popup animation for reduced-motion users

@vyctorbrzezowski
vyctorbrzezowski force-pushed the improve/picker-design-contract branch from d3e115f to d2797d5 Compare September 3, 2026 20:44
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review September 3, 2026 20:45
@clawsweeper

clawsweeper Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 3, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit 9acf0d4 into openclaw:main Sep 3, 2026
156 of 157 checks passed
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

[Bug]: Picker interactions use inconsistent visual feedback and motion

1 participant