@devries-cameron20 / t3code Mirror · read-only / commits / e1f33e023c
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 23, 05:30 UTC

refactor(mobile): Git and Agents sheet headers take theme colours from classes (#20409)

oliver committed Oct 18, 2026 at 08:44 UTC e1f33e023c804226671736828b7d25e502bdb1db
3 files changed +22 -28
apps/mobile/src/features/threads/ThreadAgentsSheet.tsx
+8 -9
@@ -13,14 +13,14 @@ import { Atom } from "effect/reactivity";
13 import * as Haptics from "expo-haptics";
14 import { useEffect, useState } from "react";
15 import { Platform, Pressable, ScrollView, View } from "react-native";
16 -import { Screen, ScreenStack, ScreenStackHeaderConfig } from "react-native-screens";
16 +import { ScreenStack } from "react-native-screens";
17 import { useSafeAreaInsets } from "react-native-safe-area-context";
18
19 import { AndroidSheetHeader } from "../../components/ui/AndroidScreenHeader";
20 import { AppText as Text } from "../../components/ui/AppText";
21 -import { useUniwindTheme } from "../../lib/useUniwindTheme";
21 import { environmentThreadDetails } from "../../state/threads";
22 import { NativeStackScreenOptions, nativeHeaderScrollEdgeEffects } from "../../native/StackHeader";
23 +import { NativeHeader, NativeScreen } from "../../native/ThemedScreenStack";
24 import { SubagentRow } from "./SubagentRow";
25 import { ScreenContent } from "../../components/ui/ScreenContent";
26 import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
@@ -46,7 +46,6 @@ export function ThreadAgentsSheet({ route }: StaticScreenProps<AgentsTarget>) {
46 const target = route.params;
47 const navigation = useNavigation();
48 const insets = useSafeAreaInsets();
49 - const theme = useUniwindTheme();
49 const turn = useThreadTurnSubagents(target);
50 const subagents = turn?.subagents ?? [];
51 const hasLiveAgent = (turn?.liveCount ?? 0) > 0;
@@ -97,27 +96,27 @@ export function ThreadAgentsSheet({ route }: StaticScreenProps<AgentsTarget>) {
96 return (
97 <View collapsable={false} className="flex-1 bg-sheet">
98 <ScreenStack style={{ flex: 1 }}>
100 - <Screen
99 + <NativeScreen
100 activityState={2}
101 enabled
102 isNativeStack
103 screenId="thread-agents-sheet-native"
104 scrollEdgeEffects={HEADER_SCROLL_EDGE_EFFECTS}
106 - style={{ backgroundColor: theme["--color-sheet"], flex: 1 }}
105 + className="flex-1 bg-sheet"
106 >
107 {content}
109 - <ScreenStackHeaderConfig
108 + <NativeHeader
109 backgroundColor="rgba(0,0,0,0)"
111 - color={theme["--color-foreground"]}
110 + tintColorClassName="accent-foreground"
111 hideBackButton
112 hideShadow={false}
113 title="Agents"
115 - titleColor={theme["--color-foreground"]}
114 + titleColorClassName="accent-foreground"
115 titleFontSize={18}
116 titleFontWeight="800"
117 translucent
118 />
120 - </Screen>
119 + </NativeScreen>
120 </ScreenStack>
121 </View>
122 );
apps/mobile/src/features/threads/git/GitOverviewSheet.tsx
+14 -17
@@ -17,10 +17,10 @@ import { SymbolView } from "../../../components/ui/AppSymbol";
17 import { useCallback, useEffect, useMemo, useState } from "react";
18 import { Platform, Pressable, RefreshControl, ScrollView, View } from "react-native";
19
20 -import { Screen, ScreenStack, ScreenStackHeaderConfig } from "react-native-screens";
20 +import { ScreenStack } from "react-native-screens";
21 import { useSafeAreaInsets } from "react-native-safe-area-context";
22 import { NativeSheetContent } from "../../../native/NativeSheetContent";
23 -import { useUniwindTheme } from "../../../lib/useUniwindTheme";
23 +import { NativeHeader, NativeScreen } from "../../../native/ThemedScreenStack";
24 import {
25 AndroidHeaderIconButton,
26 AndroidSheetHeader,
@@ -93,9 +93,6 @@ function GitOverviewSheetContent(props: GitOverviewSheetProps) {
93 const gitState = useSelectedThreadGitState();
94 const gitActions = useSelectedThreadGitActions();
95 const { canWriteSourceControl, canChangeThreadBranch } = gitActions;
96 - const theme = useUniwindTheme();
97 - const foregroundColor = theme["--color-foreground"];
98 - const sheetColor = theme["--color-sheet"];
96
97 const gitStatus = useEnvironmentQuery(
98 selectedThread !== null && selectedThreadCwd !== null
@@ -393,28 +390,28 @@ function GitOverviewSheetContent(props: GitOverviewSheetProps) {
390 return (
391 <View collapsable={false} className="flex-1 border-l border-border bg-sheet">
392 <ScreenStack style={{ flex: 1 }}>
396 - <Screen
393 + <NativeScreen
394 activityState={2}
395 enabled
396 isNativeStack
397 screenId="thread-git-inspector-native"
398 scrollEdgeEffects={HEADER_SCROLL_EDGE_EFFECTS}
402 - style={{ backgroundColor: sheetColor, flex: 1 }}
399 + className="flex-1 bg-sheet"
400 >
401 <NativeSheetContent>{content}</NativeSheetContent>
405 - <ScreenStackHeaderConfig
402 + <NativeHeader
403 backgroundColor="rgba(0,0,0,0)"
407 - color={foregroundColor}
404 + tintColorClassName="accent-foreground"
405 hideBackButton
406 hideShadow={false}
407 navigationItemStyle="editor"
408 title={currentBranchLabel}
412 - titleColor={foregroundColor}
409 + titleColorClassName="accent-foreground"
410 titleFontSize={17}
411 titleFontWeight="700"
412 translucent
413 />
417 - </Screen>
414 + </NativeScreen>
415 </ScreenStack>
416 </View>
417 );
@@ -427,28 +424,28 @@ function GitOverviewSheetContent(props: GitOverviewSheetProps) {
424 return (
425 <View collapsable={false} className="flex-1 bg-sheet">
426 <ScreenStack style={{ flex: 1 }}>
430 - <Screen
427 + <NativeScreen
428 activityState={2}
429 enabled
430 isNativeStack
431 screenId="thread-git-sheet-native"
432 scrollEdgeEffects={HEADER_SCROLL_EDGE_EFFECTS}
436 - style={{ backgroundColor: sheetColor, flex: 1 }}
433 + className="flex-1 bg-sheet"
434 >
435 <NativeSheetContent>{content}</NativeSheetContent>
439 - <ScreenStackHeaderConfig
436 + <NativeHeader
437 backgroundColor="rgba(0,0,0,0)"
441 - color={foregroundColor}
438 + tintColorClassName="accent-foreground"
439 hideBackButton
440 hideShadow={false}
441 navigationItemStyle="editor"
442 title={currentBranchLabel}
446 - titleColor={foregroundColor}
443 + titleColorClassName="accent-foreground"
444 titleFontSize={18}
445 titleFontWeight="800"
446 translucent
447 />
451 - </Screen>
448 + </NativeScreen>
449 </ScreenStack>
450 </View>
451 );
vite.config.ts
-2
@@ -397,10 +397,8 @@ export default defineConfig({
397 "apps/mobile/src/features/settings/appearance/components/FontSizeSliderRow.tsx",
398 "apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx",
399 "apps/mobile/src/features/threads/ThreadQueueControl.tsx",
400 - "apps/mobile/src/features/threads/ThreadAgentsSheet.tsx",
400 "apps/mobile/src/features/review/ReviewCommentCard.tsx",
401 "apps/mobile/src/features/threads/ThreadSettingsSheet.tsx",
403 - "apps/mobile/src/features/threads/git/GitOverviewSheet.tsx",
402 "apps/mobile/src/features/threads/thread-list-items.tsx",
403 "apps/mobile/src/features/threads/thread-list-v2-items.tsx",
404 "apps/mobile/src/lib/useMobileNavigationTheme.ts",