Skip to content

Mobile sidebar, shelf, sheets and tab pager use fixed-time slides that ignore the finger and can be overwritten by stale gestures #8535

Backlog

Description

@smsunarto

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

  • main at 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

  1. Open bb at a phone-sized viewport with touch input.
  2. Flick the sidebar open from the left edge quickly. Then drag it open slowly and let go.
  3. Flick the right panel closed. Then drag it closed slowly and let go.
  4. In the right panel, drag horizontally across the tab strip.
  5. 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.
    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.
    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/onClear after a fixed 220 ms, whatever gesture came since.
      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.
      const dismiss =
      session.progress <= 0.75 ||
      (session.progress <= 0.88 && session.velocityX * direction >= 450);
      settle(dismiss ? 0 : 1, session, dismiss);
  • 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 touchend only.
    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:

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:

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

  1. added theissue type on Dec 2, 2026
  2. added
    mobile
    partial-repro
    on Dec 2, 2026
  3. bb-slop-cop commented on Dec 2, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Triage: 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.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    mobilepartial-repro

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions