Repository navigation
feat(app): make mobile gestures follow the finger, carry release velocity, and share one page owner - #8536
Open
smsunarto wants to merge 11 commits into
Conversation
…ide the desktop sidebar on translate
…oute dismiss haptic through app feedback
…terrupt, keep the desktop panel on left so it tracks the gap
… only on committed open or close
…lear only inset styles the shelf still owns
… a shared owner token
…tab pager out of page ownership
…nd claim it for every page mover
…nd expose surface-dim
smsunarto
marked this pull request as ready for review
December 2, 2026 09:25
This branch has not been deployed
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
On phones, the sidebar, right-panel shelf, sheets and right-panel tab pager released on fixed 220 ms timers with threshold-only open/close decisions:
The settle timers also ran without checking which gesture currently held the page. An older gesture's timer could write or clear the page position after another surface took it, leaving the page partly off screen. See #8535.
What changed
@bb/shared-uigesture-physicshelper: velocity sampling, momentum projection, rubber-band past edges, and settle durations derived from the remaining distance and release speed. It is registered in the plugin registry.responsive-overlay) and tab pager track the finger. They project the release to decide where to land, and settle with a velocity-matched CSS curve.gesture-commit-feedback.page-gesture-owner.tsholds a monotonic token and is the only module that writes the page (sidebar inset) position:writePageMotion(token, …)writes only for the current owner.translateso its panel tracks the inset gap without a seam.How you verified
pnpm exec turbo run typecheck test lint lint:type-aware --filter=@bb/app --filter=@bb/shared-ui --filter=@bb/plugin-registry: 17/17 tasks pass.node packages/plugin-registry/scripts/build-registry.mjs --check: up to date.oxfmt --checkon the changed files passes.gesture-physics.test.ts, plus additions tosidebar.test.tsx,CompactSecondaryPanelShelf.test.tsx,MobilePanelTabPager.test.tsxandresponsive-overlay.test.tsx.page-gesture-ownership.test.tsxhas two guards:Notes
transitionwriter outside the owner module;defaultPreventedguard is unchanged frommain, so this PR doesn't touch it.Closes #8535