Skip to content

Fix mobile follow-up taps stopping active threads - #3456

Merged
ymichael merged 1 commit into
mainfrom
bb/fix-mobile-thread-stopping-thr_mdn8mycjz9
Sep 11, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/fix-mobile-thread-stopping-thr_mdn8mycjz9

Conversation

@ymichael

@ymichael ymichael commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Mobile submit runs on touch release. Clearing the composer during an active thread replaces Send with Stop before the browser dispatches the trailing click, so the same tap sends the follow-up and stops the thread. The existing voice-action fix guarded this replacement case for Voice, but Stop still accepted the click unconditionally.

What changed

Require pointer clicks on Stop to originate from a pointer-down on that same button, matching the existing voice-action guard. Keyboard and accessibility activation remain available. Add regression coverage for both an already-running thread and a newly started run, plus deliberate touch, mouse, and keyboard Stop actions.

Before / After

Current screenshots captured from the pnpm start:worktree build of final PR head 4573d1f75bfca1ba180d8d6ef85d1339bf0d9965, using synthetic fixture threads and Chromium mobile touch input (390 × 844). Both use the same initial task and follow-up. Before restores only the original Stop handler in the browser response to reproduce the bug; After uses the unmodified final build. The PR head is unchanged.

Before — trailing tap interrupts the run After — follow-up leaves the run active
Before: synthetic mobile fixture shows interrupted sleep, Stopped manually, and an idle composer After: synthetic mobile fixture shows the follow-up, running sleep, Working indicator, and Stop button

Before: the real server recorded one manual-stop interruption; its pending steer then completed, leaving the captured thread idle. After: one follow-up persisted while the thread stayed active, with zero interruptions. Both captures observed trusted pointer-down/up on Steer followed by the same tap's trusted click on Stop. No screenshot contents were edited. Capture provenance and exact baseline substitution.

How you verified

  • Both trailing-click regressions failed before the fix and pass afterward.
  • pnpm exec turbo run test --filter=@bb/app -- src/components/promptbox/PromptBoxInternal.test.tsx src/components/promptbox/PromptBoxInternal.ipados.test.tsx src/components/promptbox/FollowUpPromptBox.test.tsx: 169 tests passed.
  • pnpm exec turbo run typecheck --filter=@bb/app: passed.
  • Isolated source app with a real active thread and Chromium touch input at 390×844: observed trusted pointer-down/up on Steer followed by a trusted click targeting Stop. Exactly one follow-up persisted, and the thread remained active. A subsequent deliberate Stop click produced the manual-stop event and idle state.
  • During the deliberate-stop check, the first tap emitted pointer events without a click; a second tap emitted the click and stopped the run. This change addresses the trailing-click interruption. Native iOS/Android were not tested.
  • pnpm start:worktree built and started successfully for user testing; app and daemon health checks passed.

AGENT GENERATED

@ymichael
ymichael merged commit 4985b98 into main Sep 11, 2026
16 checks passed
@ymichael
ymichael deleted the bb/fix-mobile-thread-stopping-thr_mdn8mycjz9 branch September 11, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant