@devries-cameron20 / t3code Mirror · read-only / commits / ebb0240603
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 00:45 UTC

fix(mobile): medium Android windows keep the rail's room and the sidebar's place (#33021)

Co-authored-by: dongxingong <8446245+dongxingong@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>

dongxingong committed Nov 10, 2026 at 21:47 UTC ebb0240603fd4cf49cf876185c620f98dfaf4d9f
1 file changed +10 -13
apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx
+10 -13
@@ -362,8 +362,8 @@ function AdaptiveWorkspaceLayoutContent(
362 floatingTabs.row,
363 floatingTabsEnabled,
364 ]);
365 - // A floating sidebar brings the rail with it.
366 - const width = viewportWidth - (sidebarFloats ? 0 : navigationRailWidth);
365 + // The rail keeps its room even while the sidebar floats; only the list pane overlays the page.
366 + const width = viewportWidth - navigationRailWidth;
367 // The sidebar stays mounted under a workspace page, so its list is ready on the way back.
368 const shouldRenderPrimarySidebar = layout.usesSplitView;
369 const fileInspector = useMemo(
@@ -721,7 +721,7 @@ function AdaptiveWorkspaceLayoutContent(
721 // panes land. A sliding sidebar uncovers the strip it is about to fill, or covers the content
722 // until it is gone.
723 const contentLeftTarget = sidebarFloats
724 - ? 0
724 + ? navigationRailWidth
725 : navigationRailWidth +
726 (shouldRenderPrimarySidebar && !workspacePage && panes.primarySidebarVisible
727 ? (layout.listPaneWidth ?? 0) + (layout.listPaneGap ?? 0)
@@ -794,7 +794,9 @@ function AdaptiveWorkspaceLayoutContent(
794 workspacePage,
795 ]);
796 const railAnimatedStyle = useAnimatedStyle(() => ({ width: renderedRailWidth.value }));
797 - const floatingSidebarAnimatedStyle = useAnimatedStyle(() => ({ left: renderedRailWidth.value }));
797 + const floatingSidebarAnimatedStyle = useAnimatedStyle(() => ({
798 + left: sidebarFloats ? renderedRailWidth.value : 0,
799 + }));
800 const floatingSidebarOpen = sidebarFloats && panes.primarySidebarVisible;
801 // Its own value, so a sidebar that was beside a list doesn't dim the page as it leaves.
802 const scrimOpacity = useSharedValue(0);
@@ -850,7 +852,7 @@ function AdaptiveWorkspaceLayoutContent(
852 Math.max(
853 0,
854 viewportWidth -
853 - (sidebarFloats ? 0 : renderedRailWidth.value) -
855 + renderedRailWidth.value -
856 (workspacePage || sidebarFloats ? 0 : renderedSidebarWidth.value) -
857 renderedInspectorWidth.value,
858 ),
@@ -974,10 +976,7 @@ function AdaptiveWorkspaceLayoutContent(
976 >
977 <AndroidHingeObserver onChange={handleHingeChange} />
978 {shouldRenderNavigationRail ? (
977 - <Animated.View
978 - className={sidebarFloats ? "absolute inset-y-0 left-0" : "shrink self-stretch"}
979 - style={railAnimatedStyle}
980 - />
979 + <Animated.View className="shrink self-stretch" style={railAnimatedStyle} />
980 ) : null}
981 {shouldRenderPrimarySidebar && layout.listPaneWidth !== null ? (
982 <Animated.View
@@ -994,11 +993,9 @@ function AdaptiveWorkspaceLayoutContent(
993 style={[
994 workspacePage ? { position: "absolute", top: 0, bottom: 0, left: 0 } : null,
995 sidebarFloats
997 - ? [
998 - { position: "absolute", top: 0, bottom: 0, zIndex: 2, elevation: 8 },
999 - floatingSidebarAnimatedStyle,
1000 - ]
996 + ? { position: "absolute", top: 0, bottom: 0, zIndex: 2, elevation: 8 }
997 : null,
998 + floatingSidebarAnimatedStyle,
999 sidebarAnimatedStyle,
1000 ]}
1001 >