From 8a7f0bbb3714d5f831d6b318900dc72b695723bc Mon Sep 17 00:00:00 2001 From: Pixel Perfect Date: Sun, 1 Nov 2026 10:12:27 -0800 Subject: [PATCH 1/2] fix(mobile): restore the reserved compose space on Android Revert commit 5882ccd7f7dd58af962b78dc48699639ea5a7782 (#26939), restoring the empty compose slot when the FAB is hidden. --- .../AndroidWorkspaceNavigation.android.tsx | 25 ++++++------------- .../workspace/floating-workspace-tabs.ts | 4 +-- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx b/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx index f9f2e57bc3ec3..52f92ffc9fe46 100644 --- a/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx +++ b/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx @@ -86,6 +86,13 @@ export function AndroidWorkspaceNavigation(props: { const rail = Boolean(props.rail); const floating = !rail && Boolean(props.floating); const tabs = [...visibleNavigationTabs(order, hidden, rail ? 5 : 4), "settings"]; + const metrics = floatingTabsMetrics( + tabs.length, + scale, + fabSize, + props.paneWidth ?? window.width, + props.fillWidth, + ); const { containerColor, indicatorColor, selectedColor, unselectedColor } = androidWorkspaceNavigationColors(colors, rail, floating); const selectedTab = selectedNavigationTab( @@ -95,24 +102,6 @@ export function AndroidWorkspaceNavigation(props: { hidden, rail ? 5 : 4, ); - // FloatingWorkspaceTabs starts the bar at the left inset, so a cutout narrows the room. - const barWidth = - props.paneWidth ?? - window.width - (Math.max(insets.left, FLOATING_TABS.edge) - FLOATING_TABS.edge); - // A phone draws compose on the Chats list only; the split sidebar draws it on every tab - // except the Settings and Usage pages. - const composeBesideBar = - props.paneWidth === undefined - ? selectedTab === "threads" - : selectedTab !== "settings" && selectedTab !== "usage"; - const metrics = floatingTabsMetrics( - tabs.length, - scale, - fabSize, - barWidth, - props.fillWidth, - composeBesideBar && connectionState.hasConnections, - ); if (!rail && keyboardVisible) return null; return ( diff --git a/apps/mobile/src/features/workspace/floating-workspace-tabs.ts b/apps/mobile/src/features/workspace/floating-workspace-tabs.ts index d28524e656b17..bb24d3478fdf2 100644 --- a/apps/mobile/src/features/workspace/floating-workspace-tabs.ts +++ b/apps/mobile/src/features/workspace/floating-workspace-tabs.ts @@ -7,7 +7,6 @@ export function floatingTabsMetrics( fabSize: number, paneWidth?: number, fillWidth = false, - composeVisible = true, ) { const unit = Math.max(1, scale); const height = fabSize; @@ -17,10 +16,11 @@ export function floatingTabsMetrics( const room = paneWidth === undefined ? count * 60 * unit - : sharesRow && composeVisible + : sharesRow ? paneWidth - beside : paneWidth - 2 * FLOATING_TABS.edge; return { + // Reserve the compose slot even while its button is hidden. pill: Math.max(0, fillWidth ? room : Math.min(count * 72 * unit, room)), height, row, From 9b35ec9e0eea549692b929424ba43b8c305d33d3 Mon Sep 17 00:00:00 2001 From: Pixel Perfect Date: Sun, 1 Nov 2026 10:16:07 -0800 Subject: [PATCH 2/2] fix(mobile): preserve floating tab cutout clearance --- .../workspace/AndroidWorkspaceNavigation.android.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx b/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx index 52f92ffc9fe46..247f7e00a5b3a 100644 --- a/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx +++ b/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx @@ -86,13 +86,6 @@ export function AndroidWorkspaceNavigation(props: { const rail = Boolean(props.rail); const floating = !rail && Boolean(props.floating); const tabs = [...visibleNavigationTabs(order, hidden, rail ? 5 : 4), "settings"]; - const metrics = floatingTabsMetrics( - tabs.length, - scale, - fabSize, - props.paneWidth ?? window.width, - props.fillWidth, - ); const { containerColor, indicatorColor, selectedColor, unselectedColor } = androidWorkspaceNavigationColors(colors, rail, floating); const selectedTab = selectedNavigationTab( @@ -102,6 +95,11 @@ export function AndroidWorkspaceNavigation(props: { hidden, rail ? 5 : 4, ); + // FloatingWorkspaceTabs starts the bar at the left inset, so a cutout narrows the room. + const barWidth = + props.paneWidth ?? + window.width - (Math.max(insets.left, FLOATING_TABS.edge) - FLOATING_TABS.edge); + const metrics = floatingTabsMetrics(tabs.length, scale, fabSize, barWidth, props.fillWidth); if (!rail && keyboardVisible) return null; return (