From 1f0285c06b06a830ef07e20e71787e384d0db96c Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Fri, 10 Jul 2026 11:34:47 +0200 Subject: [PATCH] fix(app): restore mobile left sidebar swipe (#1976) Keep the shared sidebar model outside the root gesture detector so Gesture Handler attaches to the native surface on Android/Fabric. --- docs/mobile-panels.md | 3 ++ packages/app/src/app/_layout.tsx | 48 ++++++++++++++++---------------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/docs/mobile-panels.md b/docs/mobile-panels.md index 7f590312c..c1ad64800 100644 --- a/docs/mobile-panels.md +++ b/docs/mobile-panels.md @@ -70,6 +70,9 @@ definition, no longer eligible to begin. - Callers request semantic targets through `panel-store`; they never write shared values. - Gesture behavior comes from the four explicit hooks in `mobile-panels/gestures.ts`. +- Keep `SidebarModelProvider` outside `MobileGestureWrapper`. The provider shares sidebar derivation + across consumers, while Gesture Handler requires the wrapper's direct child to be a native `View` + so its injected `collapsable={false}` reaches Android/Fabric. - Mobile sidebars render through `MobilePanelOverlay`; do not duplicate overlay lifecycle or motion styles in sidebar components. - Animated panel nodes use React Native static styles plus inline theme values. Do not attach diff --git a/packages/app/src/app/_layout.tsx b/packages/app/src/app/_layout.tsx index af0568476..bb8fa7c31 100644 --- a/packages/app/src/app/_layout.tsx +++ b/packages/app/src/app/_layout.tsx @@ -464,33 +464,33 @@ function AppContainer({ children, chromeEnabled: chromeEnabledOverride }: AppCon ); - const content = ( - - - {workspaceChrome} - - {isCompactLayout && chromeEnabled && } - - - - - - - - - - - - - - + const surface = ( + + {workspaceChrome} + + {isCompactLayout && chromeEnabled && } + + + + + + + + + + + + + ); - if (!isCompactLayout) { - return content; - } + const content = isCompactLayout ? ( + {surface} + ) : ( + surface + ); - return {content}; + return {content}; } function MobileGestureWrapper({