Skip to content

fix(ui): stop composer mic hover shift and stray red hover - #125565

Merged
steipete merged 2 commits into
mainfrom
steipete/hover-shift-left-design-1d0eeb
Aug 18, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/hover-shift-left-design-1d0eeb

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The composer's talk (microphone) button shifted 20px left every time you hovered it, because the device-picker chevron next to it animated its own width from 0 to 20px on hover instead of just fading in. The mic button also picked up the send button's loud accent-red hover fill in dark and openknot themes instead of the quiet neutral hover it was actually styled for.

Why This Change Was Made

Peter flagged the hover-driven layout shift as confusing, then asked for alternatives to the split-pill shape morph and the red hover once the shift was fixed. Four options were mocked with the visualizer tool; option C ("detached chevron — no shape morph") was picked: the mic stays a plain circle in every state, and the device picker renders as its own small round ghost button beside it that only fades in on hover/focus, with its width always reserved so nothing in the right-aligned action cluster ever moves.

The red hover turned out to be a real specificity bug: :root[data-theme="dark"] .chat-send-btn:hover and the openknot equivalent outranked every button variant's own :hover rule (voice, stop), so dark-theme users always saw the send button's accent-red hover on the idle mic regardless of what the voice variant declared. Fixed by having those theme overrides set a --chat-send-hover-background variable instead of their own :hover rule, so each variant's hover styling can still win.

User Impact

  • Hovering the composer mic button no longer shifts it (or the send button next to it) sideways.
  • The device-picker chevron is a separate, always-circular control instead of morphing the mic into a split pill.
  • The idle mic button's hover is a quiet neutral tint in dark/openknot themes instead of the send button's accent-red fill; red stays reserved for actively recording/live voice states.
  • Active talk-session and touch-device layouts are unchanged (chevron stays visible there, as before).

Evidence

  • Real rendered before/after screenshots captured from the mocked Control UI dev server, confirming zero pixel shift on hover (idle x == hover x) and the corrected shape/hover treatment.
  • ui/src/e2e/chat-composer-redesign.e2e.test.ts updated to assert the new invariant: the picker reserves its 22px width at all times (only opacity changes), and the mic button's x-position is identical before and after hover. This assertion fails against the pre-fix stylesheet (verified locally) and passes with the fix.
  • node scripts/check-changed.mjs (stylelint + UI typecheck) green.
  • Codex autoreview (gpt-5.6-sol, high): clean, no accepted/actionable findings.

Added scripts/capture-composer-mic-hover-proof.mts, a small Playwright helper (same pattern as scripts/capture-workboard-ui-proof.mts) that screenshots the composer mic button idle/hover/chevron-hover/picker-open states and prints the measured hover x-shift, for future visual regression checks on this control.

@clawsweeper

clawsweeper Bot commented Aug 18, 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 scripts Repository scripts labels Aug 18, 2026
@steipete
steipete marked this pull request as ready for review August 18, 2026 03:47
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 18, 2026
The device-picker chevron collapsed to width 0 while idle and grew to
20px on hover, shoving the right-aligned mic button 20px left under
the cursor on every mouse-over. Detach the picker into its own
fixed-width ghost button beside the mic instead of morphing the mic's
shape into a split pill; hover only fades the picker's opacity, so the
reserved layout never shifts.

Also fixes the mic showing the send button's loud accent-red hover in
dark/openknot themes: those themes overrode .chat-send-btn:hover
directly, which outranked every variant's own hover rule (including
the intentional neutral mic hover and the stop button's danger hover).
Theme overrides now set a --chat-send-hover-background variable that
each variant's hover rule can still take precedence over.
Missing package.json entry made the deadcode full-tree scan flag the
new capture script as an unused file, same as the existing
ui:proof:workboard sibling.
@steipete
steipete force-pushed the steipete/hover-shift-left-design-1d0eeb branch from 9c4116a to a7e06e3 Compare August 18, 2026 03:53
@clawsweeper clawsweeper Bot added 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 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 11:59 PM ET / August 18, 2026, 03:59 UTC.

ClawSweeper review

What this changes

The PR keeps the composer microphone control stationary on hover, restores variant-specific hover colors in dark themes, and adds a local Playwright capture helper.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. This focused maintainer PR repairs a current Control UI hover/layout defect with the owning stylesheet change and a targeted geometry regression assertion; no blocking correctness or security finding was found.

Priority: P3
Reviewed head: a7e06e3c154aa14f973c53288935b0ebe518a1b4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused source-level repair with credible regression coverage; independent execution is limited by the read-only environment.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body reports mocked Control UI screenshots and measured geometry, though no media attachment was present in the supplied review context.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body reports mocked Control UI screenshots and measured geometry, though no media attachment was present in the supplied review context.
Evidence reviewed 7 items Current-main defect: Current main collapses the picker to width 0 while idle and expands it to 20px on fine-pointer hover, while the microphone and picker sit in the same flex control.
Owner-boundary repair: The PR reserves a 22px picker footprint and transitions only opacity; it also moves the theme send-hover choice into a custom property so voice and stop variants retain their own hover rules.
Renderer and caller inspected: The chat action renderer places the microphone button and microphone picker together, and the composer constructs that picker only when realtime talk is available.
Findings None None.
Security None None.

How this fits together

The Control UI chat composer renders microphone, device-picker, and send controls from the chat composer component, then applies shared chat stylesheet rules. Those rules determine the controls’ hover appearance and their flex layout beside the message action.

flowchart LR
  A[Chat composer state] --> B[Composer action renderer]
  B --> C[Microphone and picker controls]
  C --> D[Chat layout styles]
  E[Selected theme] --> D
  D --> F[Stable action cluster]
  F --> G[Voice input and device menu]
Loading

Before merge

  • Resolve merge risk (P1) - This read-only sandbox could not independently run the E2E or inspect installed Playwright types because dependencies are absent and Corepack cannot create its cache; retain exact-head CI and the submitted visual proof as merge evidence.
  • Complete next step (P2) - This protected maintainer PR has no mechanical repair finding; a human should review its visual proof and exact-head checks rather than create a repair job.
Agent review details

Security

None.

PR surface

Source -1, Tests +13, Config +1, Other +105. Total +118 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 20 21 -1
Tests 1 19 6 +13
Docs 0 0 0 0
Config 1 1 0 +1
Generated 0 0 0 0
Other 1 105 0 +105
Total 4 145 27 +118

Review metrics

Metric Value Why it matters
Runtime CSS versus proof coverage runtime CSS −1; proof tooling +106; E2E test +13 The shipped stylesheet is net-negative; added lines are a local proof harness and focused visual-regression coverage.

Mantis proof suggestion

A redacted Control UI chat capture would directly show that hovering the composer mic no longer moves it and that the picker appears separately. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis web UI chat proof: verify the composer mic stays fixed while the microphone picker fades in, and capture redacted before/after evidence.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the fixed-width, opacity-only picker and custom-property theme override as the canonical behavior, protected by the geometry E2E assertion and captured mock-Control-UI proof.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the fixed-width, opacity-only picker and custom-property theme override as the canonical behavior, protected by the geometry E2E assertion and captured mock-Control-UI proof.

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

Yes—source reproducible: current main collapses then expands the picker inside the right-aligned flex control, and the updated E2E samples the microphone position before and after hover. It was not executed locally because dependencies are unavailable in the read-only review sandbox.

Is this the best way to solve the issue?

Yes. Reserving the picker’s footprint fixes the flex-layout cause, while the theme variable preserves the generic send default without overriding voice and stop variants.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a contained Control UI polish regression without data, security, availability, or delivery impact.
  • 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 maintainer-authored PR is exempt from the external-contributor proof gate; its body reports mocked Control UI screenshots and measured geometry, though no media attachment was present in the supplied review context.

Label justifications:

  • P3: This is a contained Control UI polish regression without data, security, availability, or delivery impact.
  • 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 maintainer-authored PR is exempt from the external-contributor proof gate; its body reports mocked Control UI screenshots and measured geometry, though no media attachment was present in the supplied review context.

Evidence

What I checked:

Likely related people:

  • steipete: Introduced the composer microphone picker, split the composer into its current owner boundary, and recently refactored the affected stylesheet surface. (role: feature owner and recent Control UI contributor; confidence: high; commits: e3ae52b792cd, 049a17860c5b, 843017073cc2; files: ui/src/pages/chat/components/chat-composer-controls.ts, ui/src/styles/chat/layout.css)
  • Vyctor H. Brzezowski: Authored the recent microphone-picker state repair and the current-main commit immediately preceding this PR’s base. (role: adjacent picker and Control UI contributor; confidence: medium; commits: 3f4564f56fb7, c75d4dc91142; files: ui/src/pages/chat/components/chat-composer-controls.ts, ui/src/styles/chat/layout.css)

Rank-up moves

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

  • Keep a redacted before/after capture or the proof script’s zero-shift JSON available for the final maintainer check.

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.

@steipete
steipete merged commit 90526f3 into main Aug 18, 2026
215 checks passed
@steipete
steipete deleted the steipete/hover-shift-left-design-1d0eeb branch August 18, 2026 04:09
@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 18, 2026
…125565)

* fix(ui): stop composer mic hover shift and stray red hover

The device-picker chevron collapsed to width 0 while idle and grew to
20px on hover, shoving the right-aligned mic button 20px left under
the cursor on every mouse-over. Detach the picker into its own
fixed-width ghost button beside the mic instead of morphing the mic's
shape into a split pill; hover only fades the picker's opacity, so the
reserved layout never shifts.

Also fixes the mic showing the send button's loud accent-red hover in
dark/openknot themes: those themes overrode .chat-send-btn:hover
directly, which outranked every variant's own hover rule (including
the intentional neutral mic hover and the stop button's danger hover).
Theme overrides now set a --chat-send-hover-background variable that
each variant's hover rule can still take precedence over.

* chore(scripts): register composer mic hover proof script

Missing package.json entry made the deadcode full-tree scan flag the
new capture script as an unused file, same as the existing
ui:proof:workboard sibling.
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S 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.

1 participant