Skip to content

fix: keep mobile composer buttons consistently sized - #180362

Open
roboclaw-bot wants to merge 4 commits into
mainfrom
openclaw/lucky-shell
Open

roboclaw-bot wants to merge 4 commits into
mainfrom
openclaw/lucky-shell

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: chat composer buttons look inconsistently sized on mobile, including a smaller Stop button when the primary action switches from Send.

User Impact

Mobile and narrow-pane icon buttons share 36×36px targets and ordinary 20px glyphs. Send and Stop no longer change outer size; the smaller 18px Stop square remains intentional. Desktop primary targets stay 32×32px. Sending, stopping, and draft switching are unchanged; no migration or user action is required.

Why This Change Was Made

Reuse the existing compact composer size tokens and remove conflicting per-control overrides. Very narrow panes reserve separate model, effort, and microphone targets instead of allowing overlap.

Production CSS is 26 lines smaller; browser tests add 89 net lines to protect rendered size equality, alignment, containment, reachability, and adjacent target separation. No new dependency, CI job, or CI step is introduced.

Evidence

  • After integrating main 22aecb4f4dfd3b0d765aa4825af562265c1194cb, both affected browser suites passed: 11/11 tests. Covered 320px, 393px, 560px, 1280px, and a 1100px desktop viewport narrowed by the Files panel.
  • Browser measurements: mobile Send/Stop 36/32px before → 36/36px after; desktop 32/32px unchanged.
  • Focused browser-test typecheck, type-aware lint, formatting, and CSS lint passed. Independent AutoReview found no actionable P0–P2 findings.
  • The complete two-file browser run took 31.01s locally, including its build. The new regression case took 2.30s in that run; CI overhead has not been measured separately.
  • Screenshots compare that main revision with the patch in the real Control UI with a mocked Gateway, synthetic content, the same 393px viewport, and the same scale. Each image stacks Send above Stop; they are two states, not simultaneous buttons. No live deployment or mobile Safari test is claimed.

The initial current-main browser build stopped before tests because the checkout still had an older Solid dependency; the normal frozen install resolved it. The capture fixture was updated to focus the compact toolbar before waiting for its controls.

Before

Before: Send 36px, Stop 32px; Send above Stop

After

After: both targets 36px; Send above Stop

Contributor credit

Requested and co-authored by @hxy91819.

Work sessions

Worked on by

roboclaw-bot and others added 2 commits October 22, 2026 06:11
Use shared compact targets and glyph sizes without changing Send/Stop switching. Preserve disjoint picker targets in narrow panes and assert rendered action geometry in the existing browser suite.

Co-authored-by: hxy91819 <[email protected]>
Worked on by:
- @hxy91819

Co-authored-by: hxy91819 <[email protected]>
OpenClaw-Publication: a1d859ff-d814-4684-89e2-a48b3cd3f9cb
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

roboclaw-bot and others added 2 commits October 22, 2026 06:16
Merge main while retaining the composer sizing fix, current workspace-panel fixtures, and existing interaction coverage.

Co-authored-by: hxy91819 <[email protected]>
Worked on by:
- @hxy91819

Co-authored-by: hxy91819 <[email protected]>
OpenClaw-Publication: c4ad0f6c-d76b-491f-9b0b-c50c75d03360
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 22, 2026 06:19
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR gives compact composer icon buttons consistent sizes while preserving separate picker targets.

Example: At a 393px viewport, an active conversation switches between a follow-up draft and an empty draft.

  • Before: Send measures 36×36px while Stop measures 32×32px.
  • After: Both actions measure 36×36px, with the intentional 18px Stop glyph preserved.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The visual behavior is convincingly demonstrated and the CSS repair is focused, but an affected sibling test remains incompatible and blocks CI.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots exercise the real Control UI composer with synthetic Gateway data at 393px and show Send/Stop changing from unequal to equal outer targets; browser tests additionally exercise compact and split-pane geometry.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: The mobile primary action visibly shrinks when Send switches to Stop.
Reason: The maintainer-authored direction addresses a demonstrated visual inconsistency through existing styling owners.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: the visual fix is supported by screenshots, but an unchanged sibling test still asserts the retired Stop size and causes the required UI check to fail.

Priority: P3
Reviewed head: c99a1cc3ea0bdfcc2f9b76cc215fb9709be82097

Before merge

  • Update the sibling mobile geometry size expectation (P2) - The new 36px compact Stop target conflicts with the unchanged special case in mobile-shell-geometry.e2e.test.ts, which still expects 32px whenever Stop appears in a narrow viewport. The exact-head UI shard already fails five scenarios at this assertion, receiving [36,36] instead of [32,32], and consequently fails the required CI gate. Remove the retired Stop exception while retaining desktop sizing and the existing containment, picker, and hit-target assertions, then run the affected geometry suite alongside the two touched suites.

Findings

  • [P2] Update the sibling mobile geometry size expectation — ui/src/e2e/mobile-shell-geometry.e2e.test.ts:99-101

Tests

  • Missing end-to-end proof: A red-on-base run of the added action-geometry regression is not recorded.
Agent review details

How this fits together

The Control UI composer renders draft-dependent actions and model controls; shared CSS determines their visible geometry and browser hit targets.

flowchart LR
  A[Draft and run state] --> B[Composer renderer]
  B --> C[Send or Stop action]
  D[Shared composer CSS] --> C
  D --> E[Model and effort controls]
  C --> F[Browser layout and hit targets]
  E --> F
Loading

Technical review

Best possible solution:

Keep the shared CSS sizing fix and update the sibling mobile geometry expectations without weakening containment or reachability checks.

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

The base CSS assigns different Send and Stop sizes, and the inspected before screenshot shows the mismatch; no target code was executed during this review.

Is this the best way to solve the issue?

Reusing existing composer tokens and deleting conflicting overrides is a focused solution that preserves the earlier picker-separation contract.

Full review comments:

  • [P2] Update the sibling mobile geometry size expectation — ui/src/e2e/mobile-shell-geometry.e2e.test.ts:99-101
    The new 36px compact Stop target conflicts with the unchanged special case in mobile-shell-geometry.e2e.test.ts, which still expects 32px whenever Stop appears in a narrow viewport. The exact-head UI shard already fails five scenarios at this assertion, receiving [36,36] instead of [32,32], and consequently fails the required CI gate. Remove the retired Stop exception while retaining desktop sizing and the existing containment, picker, and hit-target assertions, then run the affected geometry suite alongside the two touched suites.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e8cde7518c55.

Provenance checked

  • Compact composer target and glyph hierarchy changes intended behavior with a stated reason (feat(ui): refine the mobile composer #130308: The earlier design deliberately emphasized primary controls and kept secondary indicators quiet; later style extraction carried those rules forward.)
  • Picker minimum width and context target changes intended behavior with a stated reason (fix(ui): model picker opens effort menu in narrow chat panes #153616: Reserve actual picker hit targets so shrinking wrappers cannot overlap adjacent controls; the later context-ring repair used a smaller context target to preserve separation.)
  • Mobile Stop sizing override changes intended behavior with a stated reason (50c7400: The mobile refinement used one action slot with role-specific sizing; this PR explicitly replaces inconsistent outer sizes while retaining the smaller Stop glyph.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/mobile-shell-geometry.e2e.test.ts ui/src/e2e/chat-composer-picker-layout.e2e.test.ts ui/src/e2e/chat-composer-redesign.e2e.test.ts
  • git diff --check

What I checked:

PR surface

Source -26, Tests +89. Total +63 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 46 72 -26
Tests 2 97 8 +89
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 143 80 +63

Review metrics

Metric Value Why it matters
Production versus test LOC Production CSS +46/-72; browser tests +97/-8. Production shrinks by removing competing size rules; test growth covers action switching and rendered geometry across compact and split-pane layouts.

Labels

Label changes:

  • add P3: This is a limited visual consistency repair with a focused test-expectation blocker.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is a limited visual consistency repair with a focused test-expectation blocker.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 22, 2026, 2:33 AM ET / 06:33 UTC.

This branch has not been deployed

No deployments
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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