Repository navigation
Description
Summary
On phones, bb's sidebar, right-panel shelf, sheets and right-panel tab pager move on fixed timers. They don't respond to how the user's finger moves:
- Every release settles in the same 220 ms, so a fast flick and a slow drag land identically.
- The tab pager doesn't follow the finger at all.
- Moving a gesture past the edge stops dead instead of resisting.
- A new gesture can't cleanly take over one that is still settling.
The settle timers are also not tied to the gesture that started them. An older gesture's timer can write or clear the page position after a newer gesture on another surface has taken the page, which can leave the page partly off screen.
Versions and environment
mainat 4d7a9af (bb 0.50.1), from source.- Compact (phone) viewport: Chromium with touch emulation at 390×844, and the iOS app's web view.
Steps to reproduce
- Open bb at a phone-sized viewport with touch input.
- Flick the sidebar open from the left edge quickly. Then drag it open slowly and let go.
- Flick the right panel closed. Then drag it closed slowly and let go.
- In the right panel, drag horizontally across the tab strip.
- Open a sheet such as a picker drawer and flick it down.
Expected vs actual
- Expected:
- The surface tracks the finger and keeps the release speed.
- A fast flick settles quickly and a slow release settles gently.
- Dragging past an edge rubber-bands.
- A new touch catches a settling surface where it is.
- Only the gesture that currently owns the page can move it.
- Actual:
- Every release uses a fixed 220 ms ease, whatever the speed. The open/close decision is a position or velocity threshold.
- The tab pager switches tabs only on
touchend, after 30 px. - Sheets settle with a fixed duration.
- Settle timers run unconditionally, without checking which gesture owns the page now.
Evidence (code at 4d7a9af)
- Sidebar: fixed 220 ms settle and transition.
bb/apps/app/src/components/ui/sidebar.tsx
Lines 38 to 49 in 4d7a9af
const SIDEBAR_MOBILE_SWIPE_OPEN_FLING_MAX_IDLE_MS = 100; const SIDEBAR_MOBILE_DRAG_SETTLE_MS = 220; const SIDEBAR_MOBILE_REALIZE_TIMEOUT_MS = 1000; const SIDEBAR_MOBILE_DRAG_SETTLE_EASING = "cubic-bezier(0.32, 0.72, 0, 1)"; const SIDEBAR_MOBILE_SHELF_SETTLE_TRANSITION = `translate ${SIDEBAR_MOBILE_DRAG_SETTLE_MS}ms ${SIDEBAR_MOBILE_DRAG_SETTLE_EASING}`; const SIDEBAR_MOBILE_SHELF_BACKDROP_SETTLE_TRANSITION = `opacity ${SIDEBAR_MOBILE_DRAG_SETTLE_MS}ms ${SIDEBAR_MOBILE_DRAG_SETTLE_EASING}, translate ${SIDEBAR_MOBILE_DRAG_SETTLE_MS}ms ${SIDEBAR_MOBILE_DRAG_SETTLE_EASING}`; const SIDEBAR_MOBILE_WHEEL_SWIPE_OPEN_DISTANCE_PX = 90; const SIDEBAR_MOBILE_WHEEL_SWIPE_RESET_MS = 250; const SIDEBAR_MOBILE_SHELF_INSET_TRANSITION_CLASS = "max-md:[transition:translate_220ms_cubic-bezier(0.32,0.72,0,1)] motion-reduce:transition-none!"; const SIDEBAR_MOBILE_BACKDROP_TRANSITION_CLASS = "[transition:opacity_220ms_cubic-bezier(0.32,0.72,0,1),translate_220ms_cubic-bezier(0.32,0.72,0,1)]"; - Sidebar button open/close: unconditional settle timers.
bb/apps/app/src/components/ui/sidebar.tsx
Lines 525 to 560 in 4d7a9af
if (!isMobileSidebarClosing || mobileSettleTimeoutRef.current !== null) { return; } applySidebarMobileDragStyles({ progress: 0, settling: true }); mobileSettleTimeoutRef.current = window.setTimeout(() => { mobileSettleTimeoutRef.current = null; flushSync(() => { setSuppressMobileOpenAnimation(false); setSuppressMobileCloseAnimation(true); setIsMobileSidebarClosing(false); setOpenMobile(false); }); clearSidebarMobileDragAttributes(); }, SIDEBAR_MOBILE_DRAG_SETTLE_MS); }, [isMobileSidebarClosing]); const openMobileSidebar = React.useCallback(() => { if (openMobileRef.current || mobileSettleTimeoutRef.current !== null) { return; } React.startTransition(() => { realizeMobileSidebar(); }); applySidebarMobileDragStyles({ progress: 1, settling: true }); mobileSettleTimeoutRef.current = window.setTimeout(() => { mobileSettleTimeoutRef.current = null; flushSync(() => { setSuppressMobileOpenAnimation(true); setSuppressMobileCloseAnimation(false); setOpenMobile(true); }); clearSidebarMobileDragAttributes(); }, SIDEBAR_MOBILE_DRAG_SETTLE_MS); }, [realizeMobileSidebar]); - Shared horizontal dismiss drag (right-panel shelf):
- The settle timer calls
onDismiss/onClearafter a fixed 220 ms, whatever gesture came since.bb/apps/app/src/components/ui/use-horizontal-dismiss-drag.ts
Lines 123 to 140 in 4d7a9af
const settle = React.useCallback( (progress: number, session: DragSession, dismiss: boolean) => { clearSettle(); const current = optionsRef.current; current.onProgress({ progress, settling: true, width: session.width }); if (dismiss && current.dismissTiming === "immediate") { current.onDismiss(); } settleTimeoutRef.current = window.setTimeout(() => { settleTimeoutRef.current = null; if (dismiss && current.dismissTiming === "settled") { optionsRef.current.onDismiss(); } else { optionsRef.current.onClear(); } }, DRAG_SETTLE_MS); }, [clearSettle, optionsRef], - Threshold release.
bb/apps/app/src/components/ui/use-horizontal-dismiss-drag.ts
Lines 211 to 214 in 4d7a9af
const dismiss = session.progress <= 0.75 || (session.progress <= 0.88 && session.velocityX * direction >= 450); settle(dismiss ? 0 : 1, session, dismiss);
- The settle timer calls
- Shelf: fixed transition and settle.
"[transition:translate_220ms_cubic-bezier(0.32,0.72,0,1),width_220ms_cubic-bezier(0.32,0.72,0,1)] motion-reduce:transition-none!"; const SHELF_SETTLE_MS = 220; - Tab pager: switches on
touchendonly.bb/apps/app/src/components/secondary-panel/MobilePanelTabPager.tsx
Lines 187 to 197 in 4d7a9af
onTouchEndCapture={(event) => { const start = touchStart.current; touchStart.current = null; const touch = event.changedTouches[0]; if (!start || !touch) return; const dx = touch.clientX - start.x; const dy = touch.clientY - start.y; if (Math.abs(dx) < 30 || Math.abs(dx) <= Math.abs(dy)) return; suppressClickUntil.current = Date.now() + 500; (dx < 0 ? nextTab : previousTab)?.onSelect(); }} - Sheets:
- Fixed-duration transition.
const transition = `transform ${motionDurationMs}ms ${PERSISTENT_DRAWER_EASING}`; - Threshold release.
bb/packages/shared-ui/src/components/ui/responsive-overlay.tsx
Lines 809 to 819 in 4d7a9af
const offsetY = Math.max(0, event.clientY - drag.startY); const shouldClose = !cancelled && (offsetY >= drag.height * PERSISTENT_DRAWER_CLOSE_RATIO || drag.velocityY >= PERSISTENT_DRAWER_CLOSE_VELOCITY_PX_PER_SEC); if (shouldClose) { setDragPosition(drag.height, drag.height, true); requestClose(); } else { setDragPosition(0, drag.height, true); }
- Fixed-duration transition.
Repro status and what I ruled out
- The fixed-time, threshold-only release behaviour is direct from the code above and is visible at any phone viewport.
- I found the stale-timer page writes by reading main's code. I did not reproduce a page left off screen live on
main. I reproduced it, with per-frame traces, on intermediate versions of the fix: Escape mid-swipe, Escape during the sidebar's opening settle, and the sidebar button just after a shelf flick. - Not a duplicate:
- Compact sidebar swipe can stay partly open after a lost end event #4110 (closed) covered a lost
touchendleaving the sidebar part open. - Edge-swipe open ignores finger; cancelled swipe fully opens #2046 (closed) covered edge-swipe open ignoring the finger.
- Neither covers release velocity, interruption or cross-surface ownership.
- Compact sidebar swipe can stay partly open after a lost end event #4110 (closed) covered a lost
Suggested priority and effort
Medium priority. This affects every phone user and makes core navigation feel mechanical. A page left off screen is recoverable by toggling the sidebar again. Effort: medium.
Found while working on BB-31 in bb thread thr_hpvnhhpqmm.
AGENT GENERATED
Activity
bb-slop-cop commentedon Dec 2, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotTriage: Bug · Priority: Medium · Effort: Medium · Labels:
mobile,partial-repro.Reproduction and root-cause report: Partially reproduced · high root-cause confidence. Two clean runs confirmed fixed release timing, a tab strip that only moves on release, and an old right-panel timer clearing the sidebar’s newer page translation. The page did not remain stuck off-screen in either run.
No new PR: Open draft #8536 already links this issue.