Repository navigation
Recover iOS sidebar swipes after interrupted touch sessions - #3544
Merged
SawyerHood merged 3 commits intoSep 12, 2026
Merged
Conversation
Contributor
Author
|
Follow-up verification against latest upstream
The isolated server, Tailscale endpoint, data directory, and temporary worktree were removed after the test.
|
This was referenced Sep 22, 2026
ymichael
added a commit
that referenced
this pull request
Sep 22, 2026
## Human comments ## What was wrong A compact sidebar opening swipe sets `openMobile=true` at drag intent. If its terminal event is lost, the page can remain only partly translated while the drawer is logically open. Both touch and pointer start handlers then reject every later opening swipe until reload. Text-selection cancellation could clear an active drag without resetting that state. The end handlers also ignored the release coordinate, so sparse move events could settle a sufficient swipe closed. Fixes #4110. ## What changed - Reset an interrupted active drag when the next eligible touch or primary pointer gesture starts. Keep normally opened drawers unaffected. - Reset an active drag when native text selection takes over. - Include the release position in the final swipe decision and match touch endings using `changedTouches`, so another finger's end does not terminate the tracked gesture. - Add regressions for lost terminal events on touch, pointer, and the iOS pointer-then-touch sequence; selection cleanup; sparse release coordinates; and another finger ending. This changes only `apps/app/src/components/ui/sidebar.tsx` and its test. There are no server/daemon wire, CLI, SDK, configuration, or protocol changes. ## How you verified - New interrupted-drag and release-position cases failed before the fix and pass after it. - `pnpm exec turbo run test --filter=@bb/app -- src/components/ui/sidebar.test.tsx`: 40 passed on the rebased head. - `pnpm exec turbo run typecheck --filter=@bb/app`: passed. - `pnpm start:worktree --dryrun` twice, then a persistent source server at [the review app](https://ymichael--19220.getbb.app); server and daemon health passed. - A deterministic 390 × 844 Chromium touch procedure against that build omitted a `touchend`, observed `data-state="open"` with `translate="20px"`, then confirmed the next swipe opened fully with no inline translation. It also passed text-selection cleanup, a tap without a swipe, normal opening and closing swipes, a trigger tap, and the desktop trigger. The procedure and output are in the originating BB thread's storage, outside this commit. - The intermittent phone report is a strong match for the reproduced stuck state; I did not reproduce it on a physical device. Related PR #3544 recovered interrupted sessions before drag intent. This PR covers interruption after the drawer has become logically open. BB-Thread-ID: thr_e2bgmgxf8g > AGENT GENERATED
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
The compact sidebar installs capture listeners before the Send control handles its pointer event. In iOS WKWebView, submitting a follow-up can blur the composer and detach the Send target before the matching terminal touch event reaches the window listener. That leaves
swipeSessionRefoccupied, so every later sidebar gesture is rejected until the page reloads.What changed
There are no server/daemon wire, CLI, SDK, configuration, or protocol changes.
How you verified
pnpm exec turbo run test --filter=@bb/app -- src/components/ui/sidebar.test.tsx src/components/promptbox/PromptBoxInternal.test.tsx: 166 tests passed. Five new regression cases fail without the implementation change.pnpm exec turbo run typecheck --filter=@bb/app: passed.pnpm exec turbo run test --filter=@bb/mobile -- src/lib/e2e/mobile-e2e-flows.test.ts src/lib/e2e/ci-run-flows.test.ts: 4 tests passed.bash -n apps/mobile/e2e/scripts/ci-run-flows.sh: passed.Maintainer action for simulator media: add the
mobile-e2elabel. Contributor permissions cannot apply repository labels.