Repository navigation
fix(ui): stop composer mic hover shift and stray red hover - #125565
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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.
9c4116a to
a7e06e3
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 11:59 PM ET / August 18, 2026, 03:59 UTC. ClawSweeper reviewWhat this changesThe 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 readinessKeep 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 Review scores
Verification
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1, Tests +13, Config +1, Other +105. Total +118 across 4 files. View PR surface stats
Review metrics
Mantis proof suggestionA 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: Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…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.
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
widthfrom 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:hoverand theopenknotequivalent outranked every button variant's own:hoverrule (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-backgroundvariable instead of their own:hoverrule, so each variant's hover styling can still win.User Impact
Evidence
ui/src/e2e/chat-composer-redesign.e2e.test.tsupdated 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.gpt-5.6-sol, high): clean, no accepted/actionable findings.Added
scripts/capture-composer-mic-hover-proof.mts, a small Playwright helper (same pattern asscripts/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.