Repository navigation
Description
Summary
On the Silk mobile sidebar migration branch, edge-swipe open still uses a custom document swipe session. On drag intent it flushSyncs setOpenMobile(true), which drives ResponsiveDrawerShell/activeDetent to fully open immediately. Finger progress (session.lastProgress) is never mapped into Silk detents during the gesture. A hesitant or cancelled swipe therefore springs the full sidebar open, then settleMobileSwipe(false) deferred-closes ~220ms later. Safe change commits open only on winning release in some paths, but full Silk detent scrubbing remains unresolved.
Versions and environment
- Branch:
bb/plan-silk-mobile-sheet-migration-thr_rbz75bfkui - Head at filing: see metadata block (source review may cite an earlier SHA)
- Review artifact:
/tmp/compound-engineering-1000/ce-code-review/20260820-164824-1b0b5004 - Finding ID:
#12from synthesized residual review
Steps to reproduce
- Build/run the app on a compact/mobile viewport with the Silk sidebar migration.
- Start an edge-swipe open from the left edge.
- Drag only a short distance (e.g. ~20px) so open threshold is not met, then release.
- Observe open/close thrash: sidebar fully presents mid-gesture, then deferred-closes after settle.
Expected vs actual
Expected: Finger progress scrubs Silk travel/activeDetent (or native Silk present gesture owns the open). Cancelled/sub-threshold swipes do not fully open the sidebar.
Actual: Custom swipe sets openMobile=true on drag intent; Silk presents fully; failed settle only deferred-closes. Gesture ownership is split between document swipe code and Silk travel with no shared scrubbing contract.
Evidence
apps/app/src/components/ui/sidebar.tsx:1164-1167—session.isDragging = true; flushSync(() => { setOpenMobile(true); });apps/app/src/components/ui/sidebar.tsx:1140-1146— progress computed intosession.lastProgressbut never applied to the Silk shellapps/app/src/components/ui/sidebar.tsx:1128-1141—settleMobileSwipe(false)only deferredsetOpenMobile(false)after a failed openpackages/shared-ui/src/components/ui/responsive-overlay.tsx:396-401—open=truewith persistClosed immediatelysetActiveDetent(1)(full present, not scrubbed)
Suggested fix
Either drive Silk activeDetent/travel from the swipe session progress until release, or drop the custom open scrub path and use Silk's native present gesture only. If React state must flip early for realization, keep activeDetent scrubbed to finger progress and only commit detent 1 when shouldOpenSidebarMobileSwipe wins.
What you ruled out
- Not fixed by commit-open-only-on-winning-release alone: residual review notes that path may avoid some thrash but full Silk detent scrubbing is still unresolved.
- Unverified live iOS Safari repro in this filing pass; filed from ce-code-review residual handoff (adversarial reviewer, confidence 75).
Metadata
- Severity: P1
- Confidence: 75
- Reviewer(s): adversarial
- Finding ID: apps/app/src/components/ui/sidebar.tsx|1164-1170|edge-swipe-open-ignores-finger-cancelled-swipe-fully-opens
- Source branch:
bb/plan-silk-mobile-sheet-migration-thr_rbz75bfkui - Source review run:
20260820-164824-1b0b5004 - Canonical plan:
plans/2026-08-20-001-refactor-silk-mobile-drawers-plan.md
AGENT GENERATED: by Grok 4.5
Activity