diff --git a/apps/mobile/src/components/LoadingScreen.tsx b/apps/mobile/src/components/LoadingScreen.tsx index 351f828d3be203a2820dd5508e2ea7ed6404ac0c..3503685f74e5e601e18f880747fc767f9cd9be0e 100644 --- a/apps/mobile/src/components/LoadingScreen.tsx +++ b/apps/mobile/src/components/LoadingScreen.tsx @@ -7,6 +7,8 @@ import { BrandMark } from "./BrandMark"; export function LoadingScreen(props: { readonly message: string; + /** Let the enclosing pane supply the background and top inset. */ + readonly embedded?: boolean; readonly messagePlacement?: "above-spinner" | "below-spinner"; }) { const { themeAppearance: colorScheme } = useAppearancePreferences(); @@ -14,7 +16,10 @@ export function LoadingScreen(props: { const messagePlacement = props.messagePlacement ?? "below-spinner"; return ( - + diff --git a/apps/mobile/src/features/threads/ThreadRouteScreen.tsx b/apps/mobile/src/features/threads/ThreadRouteScreen.tsx index 9f27cab56e280166b961cdf459c68205a086cb01..2992a8cbc39053d490ef99de05d7aa8396d51e04 100644 --- a/apps/mobile/src/features/threads/ThreadRouteScreen.tsx +++ b/apps/mobile/src/features/threads/ThreadRouteScreen.tsx @@ -2,6 +2,7 @@ import { makeTurnCommandMetadata } from "../../lib/commandMetadata"; import { buildProjectThreadStartTurnInput } from "../../lib/projectThreadStartTurn"; import { useWorktreeSetup } from "./use-worktree-setup"; import { worktreeSetupAgentStarted } from "@t3tools/client-runtime/worktree-setup"; +import { ScreenHeader } from "../../components/ScreenHeader"; import { StackActions, useFocusEffect, @@ -103,8 +104,50 @@ function firstRouteParam(value: string | string[] | undefined): string | null { return first === undefined || first.trim().length === 0 ? null : first; } +function ThreadPane(props: { readonly children: ReactNode }) { + return ( + + {props.children} + + ); +} + +function ThreadRouteFallbackLayout(props: { readonly children: ReactNode }) { + const navigation = useNavigation(); + const { layout } = useAdaptiveWorkspaceLayout(); + const { themeVariables } = useAppearancePreferences(); + if (Platform.OS !== "android") return props.children; + + return ( + <> + { + if (navigation.canGoBack()) navigation.goBack(); + else navigation.dispatch(StackActions.replace("Home")); + } + } + hideBottomBorder + /> + {props.children} + + ); +} + function OpeningThreadLoadingScreen() { - return ; + return ( + + + + ); } type ThreadRouteScreenRouteProps = StaticScreenProps<{ @@ -123,23 +166,25 @@ function ThreadUnavailableScreen(props: { readonly onAction: () => void; }) { return ( - - - + + + + + ); } @@ -931,7 +976,7 @@ function ThreadRouteContent( <> - + - + );