TypeScript
refactor(mobile): a pane's bar draws its own sidebar toggle (#27086)
Julius Marminge29db71bf25b0
diff --git a/apps/mobile/src/components/ui/AppBar.android.test.tsx b/apps/mobile/src/components/ui/AppBar.android.test.tsxindex 30b70764820..c4cf88d185a 100644--- a/apps/mobile/src/components/ui/AppBar.android.test.tsx+++ b/apps/mobile/src/components/ui/AppBar.android.test.tsx@@ -27,9 +27,7 @@ vi.mock("./useToolbarLayout", () => ({useToolbarLayout: () => ({ height: 48, paddingTop: 0, paddingBottom: 0 }),}));vi.mock("../../native/StackHeader", () => ({ NativeStackScreenOptions: () => null }));-vi.mock("../../features/layout/workspace-sidebar-toolbar", () => ({- AndroidWorkspaceSidebarButton: () => null,-}));+vi.mock("../../features/layout/useSidebarToggle", () => ({ useSidebarToggle: () => null }));vi.mock("../../features/settings/appearance/AppearancePreferencesProvider", () => ({useAppearancePreferences: () => ({ themeVariables: {} }),}));@@ -50,7 +48,7 @@ it("renders a sheet bar without search outside a navigation container", () => {const root = createRoot(container);roots.push(root);- act(() => root.render(<AppBar sheet sidebar={false} title="Arrange threads" />));+ act(() => root.render(<AppBar sheet title="Arrange threads" />));expect(container.textContent).toBe("Arrange threads");});diff --git a/apps/mobile/src/components/ui/AppBar.android.tsx b/apps/mobile/src/components/ui/AppBar.android.tsxindex 37b67d0305e..770a26c4661 100644--- a/apps/mobile/src/components/ui/AppBar.android.tsx+++ b/apps/mobile/src/components/ui/AppBar.android.tsx@@ -3,9 +3,9 @@ import { Keyboard, type TextInputInstance, View } from "react-native";import { useHardwareBack } from "../../lib/backHandler";import { useToolbarLayout } from "./useToolbarLayout";import { NativeStackScreenOptions } from "../../native/StackHeader";-import { AndroidWorkspaceSidebarButton } from "../../features/layout/workspace-sidebar-toolbar";+import { useSidebarToggle } from "../../features/layout/useSidebarToggle";import { useAppearancePreferences } from "../../features/settings/appearance/AppearancePreferencesProvider";-import { AndroidScreenHeader } from "./AndroidScreenHeader";+import { AndroidHeaderIconButton, AndroidScreenHeader } from "./AndroidScreenHeader";import { ScreenHeaderButton } from "./ScreenHeaderButton.android";import { Menu } from "./Menu";import { SearchField } from "./SearchField";@@ -68,6 +68,7 @@ function AppBarView(props: AppBarProps & { readonly searchState?: SearchState })const { paddingTop, paddingBottom } = useToolbarLayout(props.sheet);const { themeVariables } = useAppearancePreferences();const inWorkspace = useHasWorkspaceAppBar();+ const sidebarToggle = useSidebarToggle();const inline = search?.mode === "inline";const searching = searchState?.searching === true;const openSearch = () => searchState?.open();@@ -155,7 +156,15 @@ function AppBarView(props: AppBarProps & { readonly searchState?: SearchState })subtitle={props.subtitle}onBack={props.onBack}leading={- props.leading ?? (props.sidebar !== false ? <AndroidWorkspaceSidebarButton /> : undefined)+ props.leading ??+ // Only a real button: any leading content takes the bar's navigation slot.+ (sidebarToggle && !props.sheet ? (+ <AndroidHeaderIconButton+ accessibilityLabel={sidebarToggle.accessibilityLabel}+ icon={sidebarToggle.icon}+ onPress={sidebarToggle.onPress}+ />+ ) : undefined)}embedded={props.sheet}hideBottomBorder={props.hideBottomBorder}diff --git a/apps/mobile/src/components/ui/AppBar.tsx b/apps/mobile/src/components/ui/AppBar.tsxindex e8d42fffdfb..c343e7c5670 100644--- a/apps/mobile/src/components/ui/AppBar.tsx+++ b/apps/mobile/src/components/ui/AppBar.tsx@@ -9,6 +9,7 @@ import { NativeStackScreenOptions } from "../../native/StackHeader";import { useNativeWorkspaceColumnsSupported } from "../../native/NativeWorkspaceColumns";import { useDeviceType } from "../../native/native-layout-metrics";import { useAdaptiveWorkspaceLayout } from "../../features/layout/AdaptiveWorkspaceLayout";+import { useSidebarToggle } from "../../features/layout/useSidebarToggle";import {createNativeMailSearchToolbarItem,NATIVE_MAIL_SEARCH_TOOLBAR_SUPPORTED,@@ -41,7 +42,17 @@ export function AppBar(props: AppBarProps) {const usesNativeWorkspaceColumns = useNativeWorkspaceColumnsSupported();const deviceType = useDeviceType();const headerId = useId();- const { layout, panes, togglePrimarySidebar } = useAdaptiveWorkspaceLayout();+ const { layout } = useAdaptiveWorkspaceLayout();+ const sidebarToggle = useSidebarToggle();+ // The Duo's native columns show their own sidebar button while the sidebar is open.+ const showsSidebarToggle =+ sidebarToggle !== null &&+ (!usesNativeWorkspaceColumns || deviceType === "pad" || !sidebarToggle.visible);+ const splitBackPress = props.backInSplitView?.onPress ?? props.onBack;+ const splitBack =+ layout.usesSplitView && props.backInSplitView && splitBackPress+ ? { ...props.backInSplitView, onPress: splitBackPress }+ : null;const { themeVariables } = useAppearancePreferences();const usesNativeMailSearchToolbar = useNativeMailSearchToolbar();const { search, menus } = props;@@ -63,10 +74,7 @@ export function AppBar(props: AppBarProps) {]}options={{headerShown: true,- headerBackVisible:- !layout.usesSplitView ||- !props.backInSplitView ||- !(props.backInSplitView.onPress || props.onBack),+ headerBackVisible: splitBack === null,title: props.title,unstable_headerSubtitle: props.subtitle || undefined,...(props.matchSearchSurface@@ -117,30 +125,17 @@ export function AppBar(props: AppBarProps) {...props.options,}}/>- {layout.usesSplitView && (props.sidebar !== false || props.backInSplitView) ? (+ {(splitBack || showsSidebarToggle) &&+ props.options?.unstable_headerLeftItems === undefined ? (<Toolbar placement="left">- {props.backInSplitView && (props.backInSplitView.onPress || props.onBack) ? (- <ScreenHeaderButton- {...props.backInSplitView}- onPress={props.backInSplitView.onPress ?? props.onBack}- />- ) : null}- {props.sidebar !== false &&- (!usesNativeWorkspaceColumns || deviceType === "pad" || !panes.primarySidebarVisible) ? (+ {splitBack ? <ScreenHeaderButton {...splitBack} /> : null}+ {showsSidebarToggle ? (<ScreenHeaderButtonaxisBehavior={usesNativeWorkspaceColumns ? "horizontalOnly" : undefined}- accessibilityLabel={- panes.primarySidebarVisible- ? `Maximize ${props.title.toLowerCase()}`- : "Show threads"- }- icon={- panes.primarySidebarVisible ? "arrow.up.left.and.arrow.down.right" : "sidebar.left"- }- onPress={togglePrimarySidebar}- separateBackground={- props.backInSplitView ? props.backInSplitView.separateBackground : true- }+ accessibilityLabel={sidebarToggle.accessibilityLabel}+ icon={sidebarToggle.icon}+ onPress={sidebarToggle.onPress}+ separateBackground={splitBack ? splitBack.separateBackground : true}/>) : null}</Toolbar>diff --git a/apps/mobile/src/components/ui/AppBar.types.ts b/apps/mobile/src/components/ui/AppBar.types.tsindex a83c6cd8acf..11c358d4d71 100644--- a/apps/mobile/src/components/ui/AppBar.types.ts+++ b/apps/mobile/src/components/ui/AppBar.types.ts@@ -75,7 +75,6 @@ export interface AppBarProps {readonly menus?: ReadonlyArray<AppBarMenu>;readonly search?: AppBarSearch;readonly onBack?: () => void;- readonly sidebar?: boolean;/** Android: replaces the sidebar button at the start of the bar. */readonly leading?: ReactNode;/** Leaves route options to the screen: in-screen bars, and screens that set their own. iOS draws nothing. */diff --git a/apps/mobile/src/components/ui/Pane.tsx b/apps/mobile/src/components/ui/Pane.tsxnew file mode 100644index 00000000000..02f07a66f3b--- /dev/null+++ b/apps/mobile/src/components/ui/Pane.tsx@@ -0,0 +1,10 @@+import { createContext, use } from "react";++/** Which workspace column a screen renders in. Sheets and full-screen overlays are in none. */+export type PaneRole = "sidebar" | "content" | "inspector";++export const PaneContext = createContext<PaneRole | null>(null);++export function usePaneRole() {+ return use(PaneContext);+}diff --git a/apps/mobile/src/components/ui/Sheet.android.tsx b/apps/mobile/src/components/ui/Sheet.android.tsxindex 5a193938ae5..b8eed81bdae 100644--- a/apps/mobile/src/components/ui/Sheet.android.tsx+++ b/apps/mobile/src/components/ui/Sheet.android.tsx@@ -24,13 +24,7 @@ export function Sheet(props: SheetProps) {{/* Android FormSheet does not bound flex children. Material drags target the first scroll view, so place content before the header. */}<View collapsable={false} className="absolute inset-0 flex-col-reverse bg-header"><ScreenContent>{props.children}</ScreenContent>- <AppBar- sheet- sidebar={false}- title={props.title}- onBack={() => setIsOpen(false)}- hideBottomBorder- />+ <AppBar sheet title={props.title} onBack={() => setIsOpen(false)} hideBottomBorder /><ViewpointerEvents="none"className="absolute top-1 h-1 w-8 self-center rounded-full bg-header-foreground/40"diff --git a/apps/mobile/src/components/ui/SheetHeader.android.tsx b/apps/mobile/src/components/ui/SheetHeader.android.tsxindex da55cc88c22..35f4ddd0514 100644--- a/apps/mobile/src/components/ui/SheetHeader.android.tsx+++ b/apps/mobile/src/components/ui/SheetHeader.android.tsx@@ -39,7 +39,6 @@ export function SheetHeader(props: SheetHeaderProps) {<AppBarembeddedsheet={props.presentation === "inline"}- sidebar={false}title={props.title}subtitle={props.subtitle}leading={diff --git a/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx b/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsxindex e958dbfdaaa..b18e3051db7 100644--- a/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx+++ b/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx@@ -53,7 +53,6 @@ function ArchivedThreadsHeader(props: {return (<AppBartitle="Archived threads"- sidebar={false}onBack={() => navigation.goBack()}search={{value: props.searchQuery,diff --git a/apps/mobile/src/features/browser/BrowserPreviewRouteScreen.tsx b/apps/mobile/src/features/browser/BrowserPreviewRouteScreen.tsxindex a797ed7b13d..8be58a11465 100644--- a/apps/mobile/src/features/browser/BrowserPreviewRouteScreen.tsx+++ b/apps/mobile/src/features/browser/BrowserPreviewRouteScreen.tsx@@ -113,7 +113,6 @@ function BrowserPreviewScreen({<View className="flex-1 bg-sheet" style={{ paddingBottom: insets.bottom }}><AppBartitle={tab ? browserTabTitle(tab) : "Browser"}- sidebar={false}onBack={onClose}options={{ headerBackVisible: false }}actions={diff --git a/apps/mobile/src/features/connection/ConnectionsRouteScreen.tsx b/apps/mobile/src/features/connection/ConnectionsRouteScreen.tsxindex 2021bb134e3..4b1360d4af5 100644--- a/apps/mobile/src/features/connection/ConnectionsRouteScreen.tsx+++ b/apps/mobile/src/features/connection/ConnectionsRouteScreen.tsx@@ -33,7 +33,6 @@ export function ConnectionsRouteScreen() {{Platform.OS === "android" ? (<AppBarembedded- sidebar={false}title="Environments"onBack={() => navigation.goBack()}actions={[diff --git a/apps/mobile/src/features/development/ComponentCatalogScreen.tsx b/apps/mobile/src/features/development/ComponentCatalogScreen.tsxindex d692e3e129b..35cee094a01 100644--- a/apps/mobile/src/features/development/ComponentCatalogScreen.tsx+++ b/apps/mobile/src/features/development/ComponentCatalogScreen.tsx@@ -59,7 +59,7 @@ export function ComponentCatalogScreen() {};return (<View className="flex-1 bg-screen">- <AppBar title="UI components" onBack={() => navigation.goBack()} sidebar={false} />+ <AppBar title="UI components" onBack={() => navigation.goBack()} /><ScreenScrollViewcontentInsetAdjustmentBehavior="automatic"contentContainerStyle={{ padding: 16, gap: 20, paddingBottom: 40 }}diff --git a/apps/mobile/src/features/files/AttachmentFileScreen.tsx b/apps/mobile/src/features/files/AttachmentFileScreen.tsxindex ab709a5c512..7e095eea01c 100644--- a/apps/mobile/src/features/files/AttachmentFileScreen.tsx+++ b/apps/mobile/src/features/files/AttachmentFileScreen.tsx@@ -241,7 +241,6 @@ export function AttachmentFileScreen(props: AttachmentFileScreenProps) {{isAndroid ? (<AppBarembedded- sidebar={false}title={params.name}subtitle={subtitle}onBack={handleBack}diff --git a/apps/mobile/src/features/files/FilesHeader.tsx b/apps/mobile/src/features/files/FilesHeader.tsxindex 292ee471639..4fdfe9ebf7a 100644--- a/apps/mobile/src/features/files/FilesHeader.tsx+++ b/apps/mobile/src/features/files/FilesHeader.tsx@@ -43,7 +43,6 @@ export function FilesHeader(props: {><AppBarembedded- sidebar={false}title="Files"subtitle={props.projectName}hideBottomBorderdiff --git a/apps/mobile/src/features/files/ZipArchiveView.tsx b/apps/mobile/src/features/files/ZipArchiveView.tsxindex 629a81d6950..d36506a70e6 100644--- a/apps/mobile/src/features/files/ZipArchiveView.tsx+++ b/apps/mobile/src/features/files/ZipArchiveView.tsx@@ -308,7 +308,6 @@ function ZipArchiveHeader(props: {{isAndroid ? (<AppBarembedded- sidebar={false}title={props.name}subtitle={props.subtitle}onBack={() => {@@ -760,7 +759,6 @@ function ZipEntryView(props: {{isAndroid ? (<AppBarembedded- sidebar={false}title={entry.name}subtitle={subtitle}onBack={props.onBack}diff --git a/apps/mobile/src/features/home/HomeRouteScreen.tsx b/apps/mobile/src/features/home/HomeRouteScreen.tsxindex a916e72329c..40d540104ee 100644--- a/apps/mobile/src/features/home/HomeRouteScreen.tsx+++ b/apps/mobile/src/features/home/HomeRouteScreen.tsx@@ -185,7 +185,7 @@ export function HomeRouteScreen() {/></Toolbar>) : null}- {Platform.OS === "android" ? <AppBar embedded sidebar={false} title="Threads" /> : null}+ {Platform.OS === "android" ? <AppBar embedded title="Threads" /> : null}<WorkspaceEmptyDetailonAddConnection={Platform.OS === "android" && !catalogState.hasConnectionsdiff --git a/apps/mobile/src/features/home/ThreadListToolbar.android.tsx b/apps/mobile/src/features/home/ThreadListToolbar.android.tsxindex 4a899867011..babbf32859a 100644--- a/apps/mobile/src/features/home/ThreadListToolbar.android.tsx+++ b/apps/mobile/src/features/home/ThreadListToolbar.android.tsx@@ -62,7 +62,6 @@ export function ThreadListToolbar(props: ThreadListToolbarProps) {onOpenEnvironments={props.onOpenEnvironments}/>}- sidebar={false}search={{value: props.searchQuery,onChangeText: onSearchQueryChange,diff --git a/apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx b/apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsxindex 6a04f3b6869..a4e81e85559 100644--- a/apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx+++ b/apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx@@ -81,6 +81,7 @@ import { usePendingTaskListActions } from "../home/usePendingTaskListActions";import { ThreadNavigationSidebar } from "../threads/ThreadNavigationSidebar";import { useOpenThreadPullRequests } from "../threads/use-open-thread-pull-requests";import { RenderErrorBoundary, RenderFailureView } from "../../components/RenderErrorBoundary";+import { PaneContext } from "../../components/ui/Pane";import { WORKSPACE_PANE_TIMING } from "./workspace-pane-animation";import { WorkspaceInspectorPane } from "./workspace-inspector-pane";import {@@ -811,6 +812,7 @@ function AdaptiveWorkspaceLayoutContent(setPrimarySidebarSearchQuery,showInspector,toggleAuxiliaryPane,+ sidebarToggleable: layout.usesSplitView && !primarySidebarPinned && !workspacePage,togglePrimarySidebar,setPrimarySidebarVisible,openWorkspaceTab,@@ -863,42 +865,44 @@ function AdaptiveWorkspaceLayoutContent(]}><Animated.View className="flex-1" style={listPaneAnimatedStyle}>- <RenderErrorBoundary- renderFallback={(fallback) => (- <RenderFailureView- {...fallback}- title="The sidebar couldn't be displayed"- exit={{ label: "Open settings", onPress: handleOpenSettings }}- />- )}- >- <AndroidWorkspaceSidebar- onRequestVisibility={revealPrimarySidebar}- selectedPullRequestKey={props.selectedPullRequestKey ?? null}+ <PaneContext value="sidebar">+ <RenderErrorBoundary+ renderFallback={(fallback) => (+ <RenderFailureView+ {...fallback}+ title="The sidebar couldn't be displayed"+ exit={{ label: "Open settings", onPress: handleOpenSettings }}+ />+ )}>- <AndroidHomeFabLayout- sidebar- disabled={workspacePage}- onStartNewTask={handleStartNewTask}+ <AndroidWorkspaceSidebar+ onRequestVisibility={revealPrimarySidebar}+ selectedPullRequestKey={props.selectedPullRequestKey ?? null}>- <ThreadNavigationSidebar- width={layout.listPaneWidth}- visible={panes.primarySidebarVisible}- onRequestVisibility={revealPrimarySidebar}- selectedThreadKey={selectedThreadKey}- onOpenSettings={handleOpenSettings}- onOpenEnvironmentSettings={handleOpenEnvironmentSettings}- onNewThreadInProject={handleNewThreadInProject}- onNewThreadOnBranch={handleNewThreadOnBranch}- onOpenPendingTask={handleOpenPendingTask}- onSelectThread={handleSelectThread}- onOpenThreadPullRequests={handleOpenThreadPullRequests}- onSearchQueryChange={setPrimarySidebarSearchQuery}- searchQuery={primarySidebarSearchQuery}- />- </AndroidHomeFabLayout>- </AndroidWorkspaceSidebar>- </RenderErrorBoundary>+ <AndroidHomeFabLayout+ sidebar+ disabled={workspacePage}+ onStartNewTask={handleStartNewTask}+ >+ <ThreadNavigationSidebar+ width={layout.listPaneWidth}+ visible={panes.primarySidebarVisible}+ onRequestVisibility={revealPrimarySidebar}+ selectedThreadKey={selectedThreadKey}+ onOpenSettings={handleOpenSettings}+ onOpenEnvironmentSettings={handleOpenEnvironmentSettings}+ onNewThreadInProject={handleNewThreadInProject}+ onNewThreadOnBranch={handleNewThreadOnBranch}+ onOpenPendingTask={handleOpenPendingTask}+ onSelectThread={handleSelectThread}+ onOpenThreadPullRequests={handleOpenThreadPullRequests}+ onSearchQueryChange={setPrimarySidebarSearchQuery}+ searchQuery={primarySidebarSearchQuery}+ />+ </AndroidHomeFabLayout>+ </AndroidWorkspaceSidebar>+ </RenderErrorBoundary>+ </PaneContext>{/* Keep the pill under the content throughout the sidebar's clipping animation. */}{floatingTabsEnabled && !workspacePage ? (<FloatingWorkspaceTabs@@ -959,7 +963,9 @@ function AdaptiveWorkspaceLayoutContent(}><View className="flex-1">- <SettingsWorkspaceLayout>{children}</SettingsWorkspaceLayout>+ <PaneContext value="content">+ <SettingsWorkspaceLayout>{children}</SettingsWorkspaceLayout>+ </PaneContext></View></SafeAreaInsetsContext>{floatingTabsEnabled &&@@ -976,15 +982,17 @@ function AdaptiveWorkspaceLayoutContent(</WorkspaceContentWidthContext></Animated.View></Animated.View>- <WorkspaceInspectorPane- pathname={props.pathname}- renderedInspectorWidth={renderedInspectorWidth}- active={workspaceInspector?.active ?? false}- panes={panes}- renderInspector={workspaceInspector?.render}- setAuxiliaryPaneWidth={setFileInspectorPreferredWidth}- onClosed={handleWorkspaceInspectorClosed}- />+ <PaneContext value="inspector">+ <WorkspaceInspectorPane+ pathname={props.pathname}+ renderedInspectorWidth={renderedInspectorWidth}+ active={workspaceInspector?.active ?? false}+ panes={panes}+ renderInspector={workspaceInspector?.render}+ setAuxiliaryPaneWidth={setFileInspectorPreferredWidth}+ onClosed={handleWorkspaceInspectorClosed}+ />+ </PaneContext>{shouldRenderNavigationRail && navigationRailWidth > 0 ? (// Its trailing inset clips the old rail as soon as Android fits the workspace to a cover display.<Viewdiff --git a/apps/mobile/src/features/layout/adaptive-workspace-context.ts b/apps/mobile/src/features/layout/adaptive-workspace-context.tsindex 2974633b73a..86630ae8d90 100644--- a/apps/mobile/src/features/layout/adaptive-workspace-context.ts+++ b/apps/mobile/src/features/layout/adaptive-workspace-context.ts@@ -28,6 +28,11 @@ interface AdaptiveWorkspaceContextValue {readonly setPrimarySidebarSearchQuery: (query: string) => void;readonly showInspector: () => void;readonly toggleAuxiliaryPane: () => void;+ /**+ * Whether the content pane offers a sidebar button: false without columns, on a list that keeps+ * its sidebar, and on a workspace page (Android Settings, Usage) that covers it.+ */+ readonly sidebarToggleable: boolean;readonly togglePrimarySidebar: () => void;readonly setPrimarySidebarVisible: (visible: boolean) => void;/** Opens a workspace tab with its list and, with columns, the page it last showed. */@@ -71,6 +76,7 @@ export const AdaptiveWorkspaceContext = createContext<AdaptiveWorkspaceContextVasetPrimarySidebarSearchQuery: () => undefined,showInspector: () => undefined,toggleAuxiliaryPane: () => undefined,+ sidebarToggleable: false,togglePrimarySidebar: () => undefined,setPrimarySidebarVisible: () => undefined,openWorkspaceTab: () => undefined,diff --git a/apps/mobile/src/features/layout/createWorkspaceStackNavigator.ios.tsx b/apps/mobile/src/features/layout/createWorkspaceStackNavigator.ios.tsxindex e2697f4e4d2..f7a9c26b715 100644--- a/apps/mobile/src/features/layout/createWorkspaceStackNavigator.ios.tsx+++ b/apps/mobile/src/features/layout/createWorkspaceStackNavigator.ios.tsx@@ -48,6 +48,8 @@ import {useNativeWorkspaceColumnsSupported,} from "../../native/NativeWorkspaceColumns";import { V5StackHeader } from "../../native/V5StackHeader.ios";+import { PaneContext } from "../../components/ui/Pane";+import { useWorkspaceSidebarHeaderItem } from "./useWorkspaceSidebarHeaderItem";import type { AppNativeStackNavigationOptions } from "../../native/StackHeader";import {collapsedSplitTransition,@@ -130,44 +132,61 @@ function ColumnScreen(props: {props.navigation.emit({ type: "transitionEnd", target: key, data: { closing: true } })}>- <NavigationContext value={descriptor.navigation}>- <NavigationRouteContext value={descriptor.route}>- <V5StackHeader- options={options}- canGoBack={!props.primary}- column={props.primary ? "primary" : "detail"}- onCompose={- descriptor.route.params &&- "draft" in descriptor.route.params &&- descriptor.route.params.draft- ? undefined- : props.onCompose- }- />- <ColumnContent- primary={props.primary}- insetHorizontally={- (options as AppNativeStackNavigationOptions).nativeContentInsetHorizontally- }- >- <NativePrimaryColumnContext value={primaryColumn}>- {/* The Settings slot swaps pages here; its column keeps its measured insets. */}- <Fragment key={key}>{descriptor.render()}</Fragment>- </NativePrimaryColumnContext>- </ColumnContent>- </NavigationRouteContext>- </NavigationContext>+ <PaneContext value={props.primary ? "sidebar" : "content"}>+ <NavigationContext value={descriptor.navigation}>+ <NavigationRouteContext value={descriptor.route}>+ <V5StackHeader+ options={options}+ canGoBack={!props.primary}+ column={props.primary ? "primary" : "detail"}+ onCompose={+ descriptor.route.params &&+ "draft" in descriptor.route.params &&+ descriptor.route.params.draft+ ? undefined+ : props.onCompose+ }+ />+ <ColumnContent+ primary={props.primary}+ insetHorizontally={+ (options as AppNativeStackNavigationOptions).nativeContentInsetHorizontally+ }+ >+ <NativePrimaryColumnContext value={primaryColumn}>+ {/* The Settings slot swaps pages here; its column keeps its measured insets. */}+ <Fragment key={key}>{descriptor.render()}</Fragment>+ </NativePrimaryColumnContext>+ </ColumnContent>+ </NavigationRouteContext>+ </NavigationContext>+ </PaneContext></Split.Screen>);}+function EmptyDetailHeader(props: { readonly onCompose: (() => void) | undefined }) {+ const sidebarItem = useWorkspaceSidebarHeaderItem();+ return (+ <V5StackHeader+ options={{+ headerShown: true,+ title: "",+ unstable_headerLeftItems: () => (sidebarItem ? [sidebarItem] : []),+ }}+ canGoBack={false}+ column="detail"+ onCompose={props.onCompose}+ />+ );+}+function WorkspaceColumns(props: ViewProps & { readonly primary: Route; readonly detail: Route[] },) {const {layout,panes,- togglePrimarySidebar,setPrimarySidebarVisible,toggleAuxiliaryPane,startNewTask,@@ -383,23 +402,9 @@ function WorkspaceColumns(screenKey="workspace-empty"activityMode={layout.usesSplitView && !activeDetailKey ? "attached" : "detached"}>- <V5StackHeader- options={{- headerShown: true,- title: "",- unstable_headerLeftItems: () => [- {- type: "button",- label: "",- icon: { type: "sfSymbol", name: "sidebar.left" },- onPress: togglePrimarySidebar,- },- ],- }}- canGoBack={false}- column="detail"- onCompose={detailCompose}- />+ <PaneContext value="content">+ <EmptyDetailHeader onCompose={detailCompose} />+ </PaneContext><ColumnContent><WorkspaceEmptyDetailtab={settingsOpen ? "settings" : selectedTab}@@ -435,7 +440,7 @@ function WorkspaceColumns(vertical bar wherever they sit, so each pane insets its own content instead. */}<ColumnContent insetHorizontally={false}><View className="flex-1 bg-screen">- {inspector.render?.()}+ <PaneContext value="inspector">{inspector.render?.()}</PaneContext>{inspector.visible ? (<GestureHandlerRootViewstyle={[StyleSheet.absoluteFill, { zIndex: 100 }]}@@ -569,16 +574,19 @@ function WorkspaceStackView(props: ViewProps & { readonly nativeColumns: booleannavigation: props.descriptors[visibleRoute.key]!.navigation,route: visibleRoute,options: modalEnvelopeOptions(descriptor.options),+ // Before iOS 26 the JS columns wrap this whole navigator in the content pane.render: () => (- <V5CardStackView- {...props}- state={{- ...props.state,- routes: group,- index: group.length - 1,- preloadedRoutes: [],- }}- />+ <PaneContext value={null}>+ <V5CardStackView+ {...props}+ state={{+ ...props.state,+ routes: group,+ index: group.length - 1,+ preloadedRoutes: [],+ }}+ />+ </PaneContext>),},];diff --git a/apps/mobile/src/features/layout/useSidebarToggle.ts b/apps/mobile/src/features/layout/useSidebarToggle.tsnew file mode 100644index 00000000000..729f05676a9--- /dev/null+++ b/apps/mobile/src/features/layout/useSidebarToggle.ts@@ -0,0 +1,20 @@+import { usePaneRole } from "../../components/ui/Pane";+import { useAdaptiveWorkspaceLayout } from "./adaptive-workspace-context";++/** The content pane's sidebar button, or null where there's no sidebar beside it to toggle. */+export function useSidebarToggle() {+ const role = usePaneRole();+ const { layout, panes, sidebarToggleable, togglePrimarySidebar } = useAdaptiveWorkspaceLayout();+ if (role !== "content" || !sidebarToggleable) return null;+ const maximizes = panes.primarySidebarVisible && !layout.primarySidebarOverlaysContent;+ return {+ visible: panes.primarySidebarVisible,+ accessibilityLabel: panes.primarySidebarVisible+ ? maximizes+ ? "Maximize content"+ : "Hide sidebar"+ : "Show sidebar",+ icon: maximizes ? "arrow.up.left.and.arrow.down.right" : "sidebar.left",+ onPress: togglePrimarySidebar,+ } as const;+}diff --git a/apps/mobile/src/features/layout/useWorkspaceSidebarHeaderItem.ts b/apps/mobile/src/features/layout/useWorkspaceSidebarHeaderItem.tsindex 75367dfe598..b29b6b3f8d6 100644--- a/apps/mobile/src/features/layout/useWorkspaceSidebarHeaderItem.ts+++ b/apps/mobile/src/features/layout/useWorkspaceSidebarHeaderItem.ts@@ -1,28 +1,19 @@import { useNativeWorkspaceColumnsSupported } from "../../native/NativeWorkspaceColumns";-import { useAdaptiveWorkspaceLayout } from "./AdaptiveWorkspaceLayout";import { withNativeGlassHeaderItem } from "./native-glass-header-items";+import { useSidebarToggle } from "./useSidebarToggle";+/** `useSidebarToggle` as a native header item. */export function useWorkspaceSidebarHeaderItem() {const usesNativeWorkspaceColumns = useNativeWorkspaceColumnsSupported();- const { layout, panes, togglePrimarySidebar } = useAdaptiveWorkspaceLayout();- const label = panes.primarySidebarVisible- ? layout.primarySidebarOverlaysContent- ? "Hide thread sidebar"- : "Maximize content"- : "Show thread sidebar";+ const toggle = useSidebarToggle();+ if (!toggle) return null;return withNativeGlassHeaderItem({axisBehavior: usesNativeWorkspaceColumns ? "horizontalOnly" : undefined,- accessibilityLabel: label,- icon: {- name:- panes.primarySidebarVisible && !layout.primarySidebarOverlaysContent- ? "arrow.up.left.and.arrow.down.right"- : "sidebar.left",- type: "sfSymbol" as const,- },+ accessibilityLabel: toggle.accessibilityLabel,+ icon: { name: toggle.icon, type: "sfSymbol" as const },identifier: "thread-left-sidebar",- label,- onPress: togglePrimarySidebar,+ label: toggle.accessibilityLabel,+ onPress: toggle.onPress,type: "button" as const,});}diff --git a/apps/mobile/src/features/layout/workspace-sidebar-toolbar.tsx b/apps/mobile/src/features/layout/workspace-sidebar-toolbar.tsxdeleted file mode 100644index a5731a1c98b..00000000000--- a/apps/mobile/src/features/layout/workspace-sidebar-toolbar.tsx+++ /dev/null@@ -1,18 +0,0 @@-import { Platform } from "react-native";--import { AndroidHeaderIconButton } from "../../components/ui/AndroidScreenHeader";--import { useAdaptiveWorkspaceLayout } from "./adaptive-workspace-context";--export function AndroidWorkspaceSidebarButton() {- const { layout, panes, togglePrimarySidebar } = useAdaptiveWorkspaceLayout();- if (Platform.OS !== "android" || !layout.usesSplitView) return null;-- return (- <AndroidHeaderIconButton- accessibilityLabel={panes.primarySidebarVisible ? "Maximize content" : "Show sidebar"}- icon={panes.primarySidebarVisible ? "arrow.up.left.and.arrow.down.right" : "sidebar.left"}- onPress={togglePrimarySidebar}- />- );-}diff --git a/apps/mobile/src/features/pull-requests/PullRequestDiscussionScreen.tsx b/apps/mobile/src/features/pull-requests/PullRequestDiscussionScreen.tsxindex b095fe4571b..b298094f74b 100644--- a/apps/mobile/src/features/pull-requests/PullRequestDiscussionScreen.tsx+++ b/apps/mobile/src/features/pull-requests/PullRequestDiscussionScreen.tsx@@ -142,7 +142,6 @@ function Discussion({ params }: { params: PullRequestParams & { readonly discuss{Platform.OS === "android" ? (<AppBarembedded- sidebar={false}title="Discussion"subtitle={`#${params.number}`}onBack={() => navigation.goBack()}diff --git a/apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx b/apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsxindex 8ce46605584..7e5885ace10 100644--- a/apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx+++ b/apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx@@ -68,7 +68,6 @@ import { AppText as Text } from "../../components/ui/AppText";import { AppBar } from "../../components/ui/AppBar";import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing";import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";-import { AndroidWorkspaceSidebarButton } from "../layout/workspace-sidebar-toolbar";import { useWorkspaceSidebarHeaderItem } from "../layout/useWorkspaceSidebarHeaderItem";import { useAndroidWorkspaceBack } from "../workspace/useAndroidWorkspaceNavigation";import { EmptyState } from "../../components/ui/EmptyState";@@ -481,18 +480,16 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestPunstable_headerSubtitle: connected? params.repository: `${params.repository} · Offline`,- unstable_headerLeftItems: layout.usesSplitView ? () => [sidebarHeaderItem] : undefined,+ unstable_headerLeftItems: sidebarHeaderItem ? () => [sidebarHeaderItem] : undefined,}}- optionsVersion={[layout.usesSplitView, sidebarHeaderItem]}+ optionsVersion={[sidebarHeaderItem]}/>{Platform.OS === "android" ? (<AppBarembedded- sidebar={false}title={`#${params.number}${connected ? "" : " · Offline"}`}subtitle={params.repository}onBack={layout.usesSplitView ? undefined : returnToList}- leading={layout.usesSplitView ? <AndroidWorkspaceSidebarButton /> : undefined}actions={[...(permissions.verdicts.length? [@@ -959,7 +956,7 @@ export function PullRequestFileRouteScreen(props: PullRequestFileRouteProps) {<View className="flex-1 bg-screen"><NativeStackScreenOptions options={{ title, headerTitle: title }} />{Platform.OS === "android" ? (- <AppBar embedded sidebar={false} title={title} onBack={() => navigation.goBack()} />+ <AppBar embedded title={title} onBack={() => navigation.goBack()} />) : null}<View className="flex-1 items-center justify-center"><AppActivityIndicator accessibilityLabel="Loading changes" />@@ -1158,7 +1155,6 @@ function PullRequestFileRouteContent({ route }: PullRequestFileRouteProps) {{Platform.OS === "android" ? (<AppBarembedded- sidebar={false}title={title}onBack={() => navigation.goBack()}trailing={diff --git a/apps/mobile/src/features/pull-requests/PullRequestSearchSheet.tsx b/apps/mobile/src/features/pull-requests/PullRequestSearchSheet.tsxindex 8f368fc6188..b7020c684f0 100644--- a/apps/mobile/src/features/pull-requests/PullRequestSearchSheet.tsx+++ b/apps/mobile/src/features/pull-requests/PullRequestSearchSheet.tsx@@ -37,13 +37,7 @@ export function PullRequestSearchSheet(props: {if (Platform.OS === "android") {return (<View className="flex-1 bg-sheet" collapsable={false}>- <AppBar- embedded- sidebar={false}- title={props.title}- hideBottomBorder- onBack={() => navigation.goBack()}- />+ <AppBar embedded title={props.title} hideBottomBorder onBack={() => navigation.goBack()} /><View className="bg-header px-4 pb-3 pt-1"><SearchFieldinputRef={searchRef}diff --git a/apps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsx b/apps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsxindex 407fc554b99..bf7eec3d366 100644--- a/apps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsx+++ b/apps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsx@@ -61,7 +61,6 @@ export function PullRequestToolbar(props: {onOpenEnvironments={() => openSettings(navigation, "SettingsEnvironments")}/>}- sidebar={false}search={{value: tab.query,onChangeText: (query) => dispatch({ type: "query", tab: "pullRequests", query }),diff --git a/apps/mobile/src/features/pull-requests/guide/PullRequestGuideScreen.tsx b/apps/mobile/src/features/pull-requests/guide/PullRequestGuideScreen.tsxindex 84b8dcb9f5a..22447892795 100644--- a/apps/mobile/src/features/pull-requests/guide/PullRequestGuideScreen.tsx+++ b/apps/mobile/src/features/pull-requests/guide/PullRequestGuideScreen.tsx@@ -141,7 +141,6 @@ export function PullRequestGuideStopScreen({ route }: StaticScreenProps<GuideSto{Platform.OS === "android" ? (<AppBarembedded- sidebar={false}title={`Stop ${route.params.position + 1}`}onBack={() => navigation.goBack()}trailing={diff --git a/apps/mobile/src/features/review/ReviewSheet.tsx b/apps/mobile/src/features/review/ReviewSheet.tsxindex 6d591f77961..c75725389ad 100644--- a/apps/mobile/src/features/review/ReviewSheet.tsx+++ b/apps/mobile/src/features/review/ReviewSheet.tsx@@ -395,7 +395,6 @@ function ReviewFileNavigator({{Platform.OS === "android" ? (<AppBarembedded- sidebar={false}title="Changed files"subtitle={`${files.length} ${files.length === 1 ? "file" : "files"}`}hideBottomBorderdiff --git a/apps/mobile/src/features/settings/SettingsKeyboardRouteScreen.tsx b/apps/mobile/src/features/settings/SettingsKeyboardRouteScreen.tsxindex be974f882df..8b89877879e 100644--- a/apps/mobile/src/features/settings/SettingsKeyboardRouteScreen.tsx+++ b/apps/mobile/src/features/settings/SettingsKeyboardRouteScreen.tsx@@ -48,7 +48,7 @@ export function SettingsKeyboardRouteScreen() {{Platform.OS === "android" ? (<><NativeStackScreenOptions options={{ headerShown: false }} />- <AppBar embedded sidebar={false} title="Keyboard" onBack={() => navigation.goBack()} />+ <AppBar embedded title="Keyboard" onBack={() => navigation.goBack()} /></>) : null}<ScrollViewdiff --git a/apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx b/apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsxindex 5a867b623fe..32f05c21020 100644--- a/apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx+++ b/apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx@@ -57,7 +57,6 @@ import { webhookAddress } from "@t3tools/client-runtime/webhook-address";import { tryCopyTextWithHaptic } from "../../lib/copyTextWithHaptic";import { usePreparedConnection } from "../../state/session";import { buildModelOptions } from "../../lib/modelOptions";-import { NativeStackScreenOptions } from "../../native/StackHeader";import { useProjects, useEnvironmentServerConfig } from "../../state/entities";import { useEnvironmentQuery } from "../../state/query";import { serverEnvironment } from "../../state/server";@@ -565,25 +564,27 @@ function SettingsScheduledTaskEditorScreen({ title }: { readonly title: string }]);});return (- <SettingsScreen title={title}>- {Platform.OS === "ios" ? (- <NativeStackScreenOptions- options={{- headerBackVisible: false,- gestureEnabled: !preventRemove,- // Native Back pops before removal guards; a bar action lets the guard run first.- unstable_headerLeftItems: () => [- withNativeGlassHeaderItem({- type: "button",- label: "",- accessibilityLabel: "Back",- icon: { type: "sfSymbol", name: "chevron.backward" },- onPress: () => navigation.goBack(),- }),- ],- }}- />- ) : null}+ <SettingsScreen+ title={title}+ // Native Back pops before removal guards; a bar action lets the guard run first.+ options={+ Platform.OS === "ios"+ ? {+ headerBackVisible: false,+ gestureEnabled: !preventRemove,+ unstable_headerLeftItems: () => [+ withNativeGlassHeaderItem({+ type: "button",+ label: "",+ accessibilityLabel: "Back",+ icon: { type: "sfSymbol", name: "chevron.backward" },+ onPress: () => navigation.goBack(),+ }),+ ],+ }+ : undefined+ }+ ><ScrollViewkeyboardShouldPersistTaps="handled"keyboardDismissMode="on-drag"diff --git a/apps/mobile/src/features/settings/SettingsWorkspaceLayout.android.tsx b/apps/mobile/src/features/settings/SettingsWorkspaceLayout.android.tsxindex 77bd7bfab4c..9fbc8eb4528 100644--- a/apps/mobile/src/features/settings/SettingsWorkspaceLayout.android.tsx+++ b/apps/mobile/src/features/settings/SettingsWorkspaceLayout.android.tsx@@ -3,6 +3,7 @@ import { Activity, useState, type ReactNode } from "react";import { View } from "react-native";import { AppText } from "../../components/ui/AppText";+import { PaneContext } from "../../components/ui/Pane";import { useAdaptiveWorkspaceLayout } from "../layout/adaptive-workspace-context";import { useAndroidWorkspaceRoot } from "../workspace/AndroidWorkspaceTabsProvider";import { SettingsListScreen } from "./SettingsRouteScreen";@@ -24,9 +25,11 @@ export function SettingsWorkspaceLayout(props: { readonly children: ReactNode }){visited ? (<Activity mode={split ? "visible" : "hidden"}><View style={{ width: layout.listPaneWidth ?? 0, marginRight: layout.listPaneGap ?? 0 }}>- <NavigationRouteContext value={route}>- <SettingsListScreen sidebar selected={root?.settingsPage ?? null} />- </NavigationRouteContext>+ <PaneContext value="sidebar">+ <NavigationRouteContext value={route}>+ <SettingsListScreen sidebar selected={root?.settingsPage ?? null} />+ </NavigationRouteContext>+ </PaneContext></View></Activity>) : null}diff --git a/apps/mobile/src/features/settings/components/SettingsScreen.tsx b/apps/mobile/src/features/settings/components/SettingsScreen.tsxindex 1faefbd49ee..7b742cdbb96 100644--- a/apps/mobile/src/features/settings/components/SettingsScreen.tsx+++ b/apps/mobile/src/features/settings/components/SettingsScreen.tsx@@ -18,7 +18,7 @@ import {export { SettingsScreenContent };export function SettingsScreen(- props: Pick<AppBarProps, "title" | "actions" | "trailing" | "search" | "menus"> & {+ props: Pick<AppBarProps, "title" | "actions" | "trailing" | "search" | "menus" | "options"> & {readonly children: ReactNode;readonly formSheet?: boolean;readonly workspaceRoot?: boolean;@@ -51,9 +51,9 @@ export function SettingsScreen(// iOS screens put their filter menus in native header items themselves.menus={Platform.OS === "android" ? props.menus : undefined}sheet={Platform.OS === "android" && props.formSheet}- sidebar={false}onBack={workspaceRoot ? undefined : () => navigation.goBack()}hideBottomBorder={!props.formSheet || Platform.OS === "android"}+ options={props.options}/><ScreenScrollViewBottomInset value={deviceType === "pad" || compactTabs ? 80 : 0}><ScreenScrollViewSurface value={surfaceClassName}>diff --git a/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx b/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsxindex e2661226c91..fe109c5f9d4 100644--- a/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx+++ b/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx@@ -195,13 +195,7 @@ export function NewTaskEnvironmentPickerRouteScreen() {}}/>{Platform.OS === "android" ? (- <AppBar- embedded- sidebar={false}- title="Environment"- hideBottomBorder- onBack={() => navigation.goBack()}- />+ <AppBar embedded title="Environment" hideBottomBorder onBack={() => navigation.goBack()} />) : null}<ScreenContent><ScrollView@@ -487,13 +481,7 @@ export function BranchPickerScreen(props: {return (<View className="flex-1 bg-sheet" collapsable={false}><NativeStackScreenOptions options={{ headerShown: false }} />- <AppBar- embedded- sidebar={false}- title={props.title}- hideBottomBorder- onBack={() => navigation.goBack()}- />+ <AppBar embedded title={props.title} hideBottomBorder onBack={() => navigation.goBack()} /><View className="bg-header px-4 pb-3 pt-1"><SearchFieldinputRef={searchRef}diff --git a/apps/mobile/src/features/threads/NewTaskDraftScreen.tsx b/apps/mobile/src/features/threads/NewTaskDraftScreen.tsxindex f3488ebd3bf..6908688f9f2 100644--- a/apps/mobile/src/features/threads/NewTaskDraftScreen.tsx+++ b/apps/mobile/src/features/threads/NewTaskDraftScreen.tsx@@ -855,7 +855,6 @@ export function NewTaskDraftScreen(props: {header={<AppBartitle="New thread"- sidebar={false}onBack={goBack}options={{...threadHeaderAppearance(NATIVE_LIQUID_GLASS_SUPPORTED),diff --git a/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx b/apps/mobile/src/features/threads/NewTaskRouteScreen.tsxindex 13a50c7f428..cd7bdc77d67 100644--- a/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx+++ b/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx@@ -127,7 +127,6 @@ function NewTaskHeader(props: {<AppBartitle={props.title}subtitle={props.subtitle ?? undefined}- sidebar={false}options={{ headerBackVisible: true }}hideBottomBorderonBack={goBack}diff --git a/apps/mobile/src/features/threads/ThreadAgentsSheet.tsx b/apps/mobile/src/features/threads/ThreadAgentsSheet.tsxindex 7f6d47e9833..b18da049f5d 100644--- a/apps/mobile/src/features/threads/ThreadAgentsSheet.tsx+++ b/apps/mobile/src/features/threads/ThreadAgentsSheet.tsx@@ -166,7 +166,7 @@ export function ThreadAgentsSheet({ route }: StaticScreenProps<AgentsTarget>) {return (<View collapsable={false} className="flex-1 bg-sheet"><NativeStackScreenOptions options={{ sheetCornerRadius: 28 }} />- <AppBar sheet sidebar={false} title="Agents" onBack={() => navigation.goBack()} />+ <AppBar sheet title="Agents" onBack={() => navigation.goBack()} /><ScreenContent insetHorizontal={layout.usesSplitView}>{content}</ScreenContent></View>);diff --git a/apps/mobile/src/features/threads/ThreadBackgroundWorkSheet.tsx b/apps/mobile/src/features/threads/ThreadBackgroundWorkSheet.tsxindex 03427b8f623..67d657b6578 100644--- a/apps/mobile/src/features/threads/ThreadBackgroundWorkSheet.tsx+++ b/apps/mobile/src/features/threads/ThreadBackgroundWorkSheet.tsx@@ -97,7 +97,7 @@ export function ThreadBackgroundWorkSheet({ route }: StaticScreenProps<Backgrounreturn (<View collapsable={false} className="flex-1 bg-sheet"><NativeStackScreenOptions options={{ sheetCornerRadius: 28 }} />- <AppBar sheet sidebar={false} title="Background work" onBack={() => navigation.goBack()} />+ <AppBar sheet title="Background work" onBack={() => navigation.goBack()} /><ScreenContent insetHorizontal={layout.usesSplitView}>{content}</ScreenContent></View>);diff --git a/apps/mobile/src/features/threads/ThreadHeader.tsx b/apps/mobile/src/features/threads/ThreadHeader.tsxindex acdbaea83ef..400c7a13bf3 100644--- a/apps/mobile/src/features/threads/ThreadHeader.tsx+++ b/apps/mobile/src/features/threads/ThreadHeader.tsx@@ -81,7 +81,6 @@ export function ThreadHeader(<AppBartitle={props.title}subtitle={props.subtitle}- sidebar={native.sidebar}options={native.options}optionsVersion={native.optionsVersion}trailing={diff --git a/apps/mobile/src/features/threads/ThreadPullRequestsSheet.tsx b/apps/mobile/src/features/threads/ThreadPullRequestsSheet.tsxindex 40ea2c9de9b..21d3c655ab4 100644--- a/apps/mobile/src/features/threads/ThreadPullRequestsSheet.tsx+++ b/apps/mobile/src/features/threads/ThreadPullRequestsSheet.tsx@@ -113,7 +113,6 @@ export function ThreadPullRequestsSheet(<NativeStackScreenOptions options={{ sheetCornerRadius: 28 }} /><AppBarsheet- sidebar={false}title={title}hideBottomBorderonBack={() => navigation.goBack()}diff --git a/apps/mobile/src/features/threads/ThreadQueueControl.tsx b/apps/mobile/src/features/threads/ThreadQueueControl.tsxindex 31559398d64..3d26799c450 100644--- a/apps/mobile/src/features/threads/ThreadQueueControl.tsx+++ b/apps/mobile/src/features/threads/ThreadQueueControl.tsx@@ -395,7 +395,7 @@ export function ThreadQueueSheet({ route }: StaticScreenProps<QueueTarget>) {<GestureHandlerRootView style={{ flex: 1 }}><View collapsable={false} className="flex-1 bg-sheet"><NativeStackScreenOptions options={{ sheetCornerRadius: 28 }} />- <AppBar sheet sidebar={false} title="Queued" onBack={() => navigation.goBack()} />+ <AppBar sheet title="Queued" onBack={() => navigation.goBack()} /><ScreenContent insetHorizontal={layout.usesSplitView}>{content}</ScreenContent></View></GestureHandlerRootView>diff --git a/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx b/apps/mobile/src/features/threads/ThreadSettingsSheet.tsxindex 4e7552a5083..e907e243713 100644--- a/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx+++ b/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx@@ -1435,7 +1435,6 @@ function ThreadSettingsChoiceScreen() {{Platform.OS === "android" ? (<AppBarembedded- sidebar={false}title={route.params.title}onBack={() => navigation.goBack()}hideBottomBorderdiff --git a/apps/mobile/src/features/threads/git/GitBranchesSheet.tsx b/apps/mobile/src/features/threads/git/GitBranchesSheet.tsxindex 9123a8d8c87..aceeda2ea58 100644--- a/apps/mobile/src/features/threads/git/GitBranchesSheet.tsx+++ b/apps/mobile/src/features/threads/git/GitBranchesSheet.tsx@@ -80,7 +80,6 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {{Platform.OS === "android" ? (<AppBarsheet- sidebar={false}title="Branches & worktrees"onBack={() => navigation.goBack()}hideBottomBorderdiff --git a/apps/mobile/src/features/threads/git/GitConfirmSheet.tsx b/apps/mobile/src/features/threads/git/GitConfirmSheet.tsxindex 7452490b71f..edb8a46eb7a 100644--- a/apps/mobile/src/features/threads/git/GitConfirmSheet.tsx+++ b/apps/mobile/src/features/threads/git/GitConfirmSheet.tsx@@ -130,13 +130,7 @@ export function GitConfirmSheet(props: GitConfirmSheetProps) {/>) : null}{Platform.OS === "android" ? (- <AppBar- sheet- sidebar={false}- title="Confirm action"- onBack={() => navigation.goBack()}- hideBottomBorder- />+ <AppBar sheet title="Confirm action" onBack={() => navigation.goBack()} hideBottomBorder />) : (<View className="min-h-4 pt-2" />)}diff --git a/apps/mobile/src/features/threads/git/GitOverviewSheet.tsx b/apps/mobile/src/features/threads/git/GitOverviewSheet.tsxindex 48fb704fa88..87da9c9992a 100644--- a/apps/mobile/src/features/threads/git/GitOverviewSheet.tsx+++ b/apps/mobile/src/features/threads/git/GitOverviewSheet.tsx@@ -467,7 +467,6 @@ function GitOverviewSheetContent(props: GitOverviewSheetProps) {) : (<AppBarsheet- sidebar={false}title={currentBranchLabel}hideBottomBorder={Platform.OS === "android"}subtitle={currentStatusSummary}diff --git a/apps/mobile/src/features/threads/useThreadHeaderOptions.android.ts b/apps/mobile/src/features/threads/useThreadHeaderOptions.android.tsindex 263852f87b1..262a869f041 100644--- a/apps/mobile/src/features/threads/useThreadHeaderOptions.android.ts+++ b/apps/mobile/src/features/threads/useThreadHeaderOptions.android.ts@@ -8,7 +8,6 @@ export function useThreadHeaderOptions(options: { contentStyle: { backgroundColor: props.headerColor } },// Android renders header actions as children, not native item factories.optionsVersion: [],- sidebar: true,fallback: null,};}diff --git a/apps/mobile/src/features/threads/useThreadHeaderOptions.tsx b/apps/mobile/src/features/threads/useThreadHeaderOptions.tsxindex 8363af1a3e1..a4327457fe2 100644--- a/apps/mobile/src/features/threads/useThreadHeaderOptions.tsx+++ b/apps/mobile/src/features/threads/useThreadHeaderOptions.tsx@@ -52,7 +52,7 @@ export function useThreadHeaderOptions(props: {}),]: []),- sidebarHeaderItem,+ ...(sidebarHeaderItem ? [sidebarHeaderItem] : []),...(!usesDuoHeader && !props.draft? [withNativeGlassHeaderItem({@@ -109,7 +109,6 @@ export function useThreadHeaderOptions(props: {gitStatus?.refName,gitStatus?.pr?.url,],- sidebar: false,fallback:!layout.usesSplitView && !props.usesNativeHeaderGlass ? (<ThreadGitControls {...props.gitControls} showActionControls />diff --git a/apps/mobile/src/features/threads/worktree-setup-sheet.android.tsx b/apps/mobile/src/features/threads/worktree-setup-sheet.android.tsxindex 3c2fb80b6ad..ecd4d5a54d1 100644--- a/apps/mobile/src/features/threads/worktree-setup-sheet.android.tsx+++ b/apps/mobile/src/features/threads/worktree-setup-sheet.android.tsx@@ -26,7 +26,6 @@ export function WorktreeSetupSheet({ children, height, onClose }: WorktreeSetupS><AppBarsheet- sidebar={false}title="Worktree setup"actions={[{ accessibilityLabel: "Close setup details", icon: "xmark", onPress: onClose },diff --git a/apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsx b/apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsxindex 2b32d48bef9..89c0177d46a 100644--- a/apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsx+++ b/apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsx@@ -78,7 +78,7 @@ export function WorkspaceRootScreen() {) : layout.usesSplitView ? (<><NativeStackScreenOptions options={{ headerShown: false }} />- <AppBar embedded sidebar={false} title="Pull requests" />+ <AppBar embedded title="Pull requests" /><View className="flex-1 items-center justify-center px-10"><EmptyStatetitle="Select a pull request"diff --git a/apps/mobile/src/features/workspace/WorkspaceRootScreen.tsx b/apps/mobile/src/features/workspace/WorkspaceRootScreen.tsxindex 7d4c5cb993d..9a7d456fad6 100644--- a/apps/mobile/src/features/workspace/WorkspaceRootScreen.tsx+++ b/apps/mobile/src/features/workspace/WorkspaceRootScreen.tsx@@ -166,7 +166,6 @@ function WorkspaceRootContent() {) : (<AppBarembedded- sidebar={false}title="T3 Code"titleContent={renderHeaderTitle()}actions={[