Repository navigation
fix(ui): keep chat Send and Stop responsive on mobile - #116104
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 8:47 PM ET / July 30, 2026, 00:47 UTC. ClawSweeper reviewWhat this changesThe PR prevents narrow Control UI chat actions from losing textarea focus during pointer activation, keeping Send, Stop, Queue, Steer, and Interrupt responsive on mobile-sized layouts. Merge readinessThe focused composer repair has credible after-fix browser proof and no concrete patch defect from the reviewed change, but this PR remains behind current Priority: P2 Review scores
Verification
How this fits togetherThe Control UI composer holds the chat draft and exposes Send plus active-run actions. Those controls dispatch a chat send or abort through the existing session path; this change prevents a focus-driven mobile layout shift from cancelling the pointer gesture first. flowchart LR
A[Chat draft or active run] --> B[Control UI composer]
B --> C[Primary Send and run actions]
C --> D[Pointer focus guard]
D --> E[Send or abort command]
E --> F[Gateway chat session]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +20, Tests +606. Total +626 across 4 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Mantis proof suggestionA short redacted web UI chat transcript on the final merge head would directly confirm the mobile Send/Stop behavior after the base refresh. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or refresh the branch onto current Do we have a high-confidence way to reproduce the issue? Yes in source and supplied proof: a focused textarea in the zero-inset narrow layout can lose focus on primary-action pointerdown, move the control before release, and cancel the click. The branch’s dedicated browser coverage records the required narrow touch and mouse paths, though this read-only review could not rerun it. Is this the best way to solve the issue? Yes. The guard is at the shared composer/action boundary and narrowly suppresses focus transfer only for the specific focused zero-inset state, avoiding responsive CSS, Gateway, session, or general keyboard-behavior changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against edbb1fca86c4. LabelsLabel 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
HistoryReview history (5 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
human note - I've reviewed the prod code "by hand" - arrived at it after a few iterations - the current version is the final version I am proposing. I've not reviewed the tests myself. |
|
Maintainer verification before landing: Root cause confirmed in source. On narrow/PWA layouts, Gates:
Landing; closes #113732. Thanks @Ram-G — the baseline-fails/candidate-passes E2E proof and the recorded pointer traces made this an easy review. |
|
Merged via squash.
|
|
Hello @steipete - of course. Just pinging back to say that I am overjoyed to be able to contribute - thank you for reviewing the PR. As a first time contributor - it means a ton to me. |
* fix(ui): keep chat actions responsive on mobile * test(ui): satisfy composer lint gates --------- Co-authored-by: Ram Gupta <[email protected]>
Closes #113732
What Problem This Solves
Fixes an issue where users tapping Send or Stop in the narrow/mobile Control UI could have the action silently cancelled when the focused composer changed its bottom inset during the pointer gesture. The same event sequence can affect a narrow desktop viewport, while stable wide layouts are unaffected.
Why This Change Was Made
The primary composer actions now preserve textarea focus only while the focused composer is in its zero-bottom-margin layout, preventing the control from moving between pointer down and release. Stable layouts and unrelated focus keep their existing behavior. Successful pointer submission also clears stale composition state so the next Enter submission is not suppressed.
The fix stays at the shared composer/action boundary and covers Send, Queue, Steer, Interrupt, and Stop. It does not change responsive CSS or Gateway/session behavior.
User Impact
Send and Stop respond on the first mobile/PWA tap without requiring a Workspace-panel toggle. Narrow mouse layouts get the same protection, while wide desktop mouse and keyboard activation remain unchanged.
Evidence
mainbaseline with the new regression test: 2 failed / 2 passed. In both Android-like touch and narrow desktop mouse scenarios, losing composer focus moved the action during pointer activation, cancelling the click and emitting nochat.send; the touch scenario measured a 48 px shift and retained the draft. Wide desktop/keyboard and drag-away controls passed.4bb4a1efb35afec4bdc7d596befe0918f57abfbf: extracted the pointer unit cases into a focused sibling test file and made the E2E Promise executor non-returning. Production files are unchanged from the recorded implementation head. Focused unit and E2E runs, file-scoped Oxlint/Stylelint/formatting, and fresh repository autoreview passed; autoreview reported no findings (0.98 confidence).Inspectable browser proof
The candidate captures below are from reviewed implementation head
d2d6533761cca678b9c2e319407649504e7696b9. Current head4bb4a1efb35afec4bdc7d596befe0918f57abfbfhas identical production files and differs only by the test-only lint repair described above; the focused unit and browser E2E scenarios were rerun on the current tree. The comparison capture is from current-mainbaseline97d374b357ebe2d389a9d512d70e689fd1af85cb. The complete immutable artifact set and diagnostic summary are inRam-G/pr-assets@37754ef.main, narrow touchchat.send=0; draft remainschat.send=1; Stop emitschat.abort=1; focused inset remains 0 pxchat.send=1; keyboard Stop emitschat.abort=1; keyboard Send increments tochat.send=2Baseline cancelled activation:
Exact-head narrow touch Send:
Exact-head narrow touch Stop:
Exact-head wide mouse and keyboard controls:
The memory-heavy core-test typecheck could not complete locally because the 8 GiB development VM plus the Go checker exhausted host headroom; the repository's Testbox delegation was unavailable because its selected Crabbox binary failed its own sanity check. Upstream CI remains authoritative for that lane.
Non-goals
AI Assistance
This change was developed and reviewed with OpenAI Codex. The final patch was independently checked by the repository's isolated Codex autoreview workflow; all behavior claims above are backed by deterministic tests or captured browser evidence.