Repository navigation
Fix mobile follow-up taps stopping active threads - #3456
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:worktreebuild of final PR head4573d1f75bfca1ba180d8d6ef85d1339bf0d9965, 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: 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
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.pnpm start:worktreebuilt and started successfully for user testing; app and daemon health checks passed.