Open History to see the last commit
1import {
2 createPathConfigForStaticNavigation,
3 getPathFromState,
4 NavigationState,
5 StackActions,
6 useNavigation,
7} from "@react-navigation/native";
8import {
9 createNativeStackNavigator,
10 createNativeStackScreen,
11 type NativeStackNavigationOptions,
12} from "@react-navigation/native-stack";
13import { useEffect, useRef } from "react";
14import { DynamicColorIOS, Platform, Pressable, ScrollView, StyleSheet } from "react-native";
15import { useResolveClassNames } from "uniwind";
16
17import { AppText as Text } from "./components/AppText";
18import { getCompactBrandHeaderOptions } from "./components/CompactBrandTitle";
19import { ArchivedThreadsRouteScreen } from "./features/archive/ArchivedThreadsRouteScreen";
20import { useAgentNotificationNavigation } from "./features/agent-awareness/notificationNavigation";
21import { ClerkSettingsSheetDetentProvider } from "./features/cloud/ClerkSettingsSheetDetent";
22import { ConnectOnboardingRouteScreen } from "./features/cloud/ConnectOnboardingRouteScreen";
23import { useConnectOnboardingNavigation } from "./features/cloud/connectOnboardingNavigation";
24import { ThreadFilesTreeScreen, ThreadFileScreen } from "./features/files/ThreadFilesRouteScreen";
25import { AdaptiveWorkspaceLayout } from "./features/layout/AdaptiveWorkspaceLayout";
26import { HardwareKeyboardCommandProvider } from "./features/keyboard/HardwareKeyboardCommandProvider";
27import { ReviewCommentComposerSheet } from "./features/review/ReviewCommentComposerSheet";
28import { ReviewSheet } from "./features/review/ReviewSheet";
29import { ThreadTerminalRouteScreen } from "./features/terminal/ThreadTerminalRouteScreen";
30import { GitBranchesSheet } from "./features/threads/git/GitBranchesSheet";
31import { GitCommitSheet } from "./features/threads/git/GitCommitSheet";
32import { GitConfirmSheet } from "./features/threads/git/GitConfirmSheet";
33import { GitOverviewSheet } from "./features/threads/git/GitOverviewSheet";
34import { ThreadRouteScreen } from "./features/threads/ThreadRouteScreen";
35import { ConnectionsRouteScreen } from "./features/connection/ConnectionsRouteScreen";
36import { ConnectionsNewRouteScreen } from "./features/connection/ConnectionsNewRouteScreen";
37import { HomeRouteScreen } from "./features/home/HomeRouteScreen";
38import { AddProjectDestinationRoute } from "./features/projects/AddProjectDestinationRoute";
39import { AddProjectLocalRoute } from "./features/projects/AddProjectLocalRoute";
40import { AddProjectRepositoryRoute } from "./features/projects/AddProjectRepositoryRoute";
41import { AddProjectSourceRoute } from "./features/projects/AddProjectSourceRoute";
42import { NewTaskDraftRouteScreen } from "./features/threads/NewTaskDraftRouteScreen";
43import { NewTaskFlowProvider } from "./features/threads/new-task-flow-provider";
44import { NewTaskRouteScreen } from "./features/threads/NewTaskRouteScreen";
45import { SettingsAppearanceRouteScreen } from "./features/settings/SettingsAppearanceRouteScreen";
46import { SettingsClientStorageRouteScreen } from "./features/settings/SettingsClientStorageRouteScreen";
47import { SettingsAuthRouteScreen } from "./features/settings/SettingsAuthRouteScreen";
48import { SettingsEnvironmentsRouteScreen } from "./features/settings/SettingsEnvironmentsRouteScreen";
49import { SettingsLegalRouteScreen } from "./features/settings/SettingsLegalRouteScreen";
50import { SettingsProjectGroupingRouteScreen } from "./features/settings/SettingsProjectGroupingRouteScreen";
51import { UsageRouteScreen } from "./features/usage/UsageRouteScreen";
52import { SettingsRouteScreen } from "./features/settings/SettingsRouteScreen";
53import { ShowcaseCaptureCoordinator } from "./features/showcase/ShowcaseCaptureCoordinator";
54import {
55 SettingsLegalDocumentCloseHeaderButton,
56 SettingsLegalDocumentExternalHeaderButton,
57} from "./features/settings/components/SettingsLegalDocumentRouteScreen";
58import { useAppShortcuts } from "./features/shortcuts/useAppShortcuts";
59import { useIncomingShare } from "./features/sharing/IncomingShareProvider";
60import {
61 EMPTY_INCOMING_SHARE_PRESENTATION_STATE,
62 transitionIncomingSharePresentation,
63} from "./features/sharing/incoming-share-presentation";
64import { NATIVE_LIQUID_GLASS_SUPPORTED } from "./native/native-glass";
65import { nativeHeaderScrollEdgeEffects } from "./native/StackHeader";
66import { useThreadOutboxDrain } from "./state/use-thread-outbox-drain";
67
68const HEADER_SCROLL_EDGE_EFFECTS = nativeHeaderScrollEdgeEffects(Platform.OS, Platform.Version);
69
70// Matches --color-sheet in global.css (light/dark). DynamicColorIOS lets the header
71// background stay STATIC config while still adapting to appearance changes.
72const SHEET_BACKGROUND_COLOR =
73 Platform.OS === "ios"
74 ? DynamicColorIOS({ light: "rgba(242, 242, 247, 0.98)", dark: "rgba(14, 14, 14, 0.98)" })
75 : undefined;
76
77type AppScreenOptions = NativeStackNavigationOptions & {
78 readonly unstable_navigationItemStyle?: "editor";
79};
80
81// Shared header presets. Screens only override genuinely dynamic values (titles,
82// subtitles, toolbar items, search callbacks) via NativeStackScreenOptions.
83//
84// GLASS: transparent header over the screen's primary scroll view on supported
85// iOS versions. Pre-glass iOS gets the same solid material as internal-scroll
86// surfaces so content is laid out below the bar instead of underlapping it.
87const GLASS_HEADER_OPTIONS: AppScreenOptions = {
88 headerBackButtonDisplayMode: "minimal",
89 headerBackTitle: "",
90 headerLargeTitle: false,
91 headerShadowVisible: false,
92 headerShown: true,
93 headerStyle: NATIVE_LIQUID_GLASS_SUPPORTED
94 ? { backgroundColor: "transparent" }
95 : SHEET_BACKGROUND_COLOR !== undefined
96 ? { backgroundColor: SHEET_BACKGROUND_COLOR as unknown as string }
97 : undefined,
98 headerTitleStyle: { fontSize: 18, fontWeight: "800" },
99 headerTransparent: NATIVE_LIQUID_GLASS_SUPPORTED,
100 scrollEdgeEffects: NATIVE_LIQUID_GLASS_SUPPORTED ? HEADER_SCROLL_EDGE_EFFECTS : undefined,
101 unstable_navigationItemStyle: NATIVE_LIQUID_GLASS_SUPPORTED ? "editor" : undefined,
102};
103
104// SOLID: opaque sheet-colored header for surfaces whose content scrolls internally
105// (file viewer, terminal, review) — there is nothing for glass to sample there.
106const SOLID_HEADER_OPTIONS: AppScreenOptions = {
107 headerBackButtonDisplayMode: "minimal",
108 headerBackTitle: "",
109 headerLargeTitle: false,
110 headerShadowVisible: false,
111 headerShown: true,
112 headerStyle:
113 SHEET_BACKGROUND_COLOR !== undefined
114 ? // native-stack types this as `string`, but the native side accepts any
115 // ColorValue including DynamicColorIOS.
116 { backgroundColor: SHEET_BACKGROUND_COLOR as unknown as string }
117 : undefined,
118 headerTitleStyle: { fontSize: 18, fontWeight: "800" },
119 headerTransparent: false,
120 unstable_navigationItemStyle: Platform.OS === "ios" ? "editor" : undefined,
121};
122
123// Solid header variant for screens inside sheets (centered title, no editor style).
124const SHEET_SOLID_HEADER_OPTIONS: AppScreenOptions = {
125 ...SOLID_HEADER_OPTIONS,
126 unstable_navigationItemStyle: undefined,
127};
128
129const LEGAL_DOCUMENT_HEADER_OPTIONS: AppScreenOptions = {
130 ...SHEET_SOLID_HEADER_OPTIONS,
131 headerBackVisible: false,
132 headerLeft: SettingsLegalDocumentCloseHeaderButton,
133 headerRight: () => <SettingsLegalDocumentExternalHeaderButton />,
134 presentation: "fullScreenModal",
135};
136
137const SettingsSheetStack = createNativeStackNavigator({
138 initialRouteName: "Settings",
139 screenOptions: {
140 ...GLASS_HEADER_OPTIONS,
141 // Sheets read better with the iOS-default centered title (no editor style).
142 unstable_navigationItemStyle: undefined,
143 },
144 screens: {
145 Settings: createNativeStackScreen({
146 screen: SettingsRouteScreen,
147 linking: "",
148 options: {
149 title: "Settings",
150 },
151 }),
152 SettingsEnvironments: createNativeStackScreen({
153 screen: SettingsEnvironmentsRouteScreen,
154 linking: "environments",
155 options: {
156 title: "Environments",
157 },
158 }),
159 SettingsEnvironmentNew: createNativeStackScreen({
160 screen: ConnectionsNewRouteScreen,
161 linking: "environment-new",
162 options: {
163 title: "Add Environment",
164 },
165 }),
166 SettingsArchive: createNativeStackScreen({
167 screen: ArchivedThreadsRouteScreen,
168 linking: "archive",
169 options: {
170 title: "Archived Threads",
171 },
172 }),
173 SettingsAppearance: createNativeStackScreen({
174 screen: SettingsAppearanceRouteScreen,
175 linking: "appearance",
176 options: {
177 title: "Appearance",
178 },
179 }),
180 SettingsProjectGrouping: createNativeStackScreen({
181 screen: SettingsProjectGroupingRouteScreen,
182 linking: "project-grouping",
183 options: {
184 title: "Project Grouping",
185 },
186 }),
187 SettingsClientStorage: createNativeStackScreen({
188 screen: SettingsClientStorageRouteScreen,
189 linking: "client-storage",
190 options: {
191 title: "Client Storage",
192 },
193 }),
194 SettingsUsage: createNativeStackScreen({
195 screen: UsageRouteScreen,
196 linking: "usage",
197 options: {
198 title: "Usage",
199 },
200 }),
201 SettingsAuth: createNativeStackScreen({
202 screen: SettingsAuthRouteScreen,
203 linking: "auth",
204 options: {
205 title: "Sign in",
206 },
207 }),
208 SettingsWaitlist: createNativeStackScreen({
209 // Keep the old deep link working after the Connect GA launch.
210 screen: SettingsAuthRouteScreen,
211 linking: "waitlist",
212 options: {
213 title: "Sign in",
214 },
215 }),
216 },
217});
218
219// Thread routes live FLAT in the root stack (not in a nested navigator). A nested
220// stack means a second UINavigationController with its own UINavigationBar, which
221// breaks iOS 26's shared-header morphing between Home and Thread (each pair inside
222// one bar morphs; across two bars the whole screen slides). Flat linking paths keep
223// the same deep-link URLs the nested config produced.
224const THREAD_LINKING_PREFIX = "threads/:environmentId/:threadId";
225
226// New-task / add-project flow: nested navigator inside the formSheet (Settings-sheet
227// pattern — a plain formSheet screen cannot render a stack header; the header and
228// in-sheet pushes come from this nested stack).
229const NewTaskSheetStack = createNativeStackNavigator({
230 initialRouteName: "NewTask",
231 screenOptions: {
232 ...GLASS_HEADER_OPTIONS,
233 // Sheets read better with the iOS-default centered title (no editor style).
234 unstable_navigationItemStyle: undefined,
235 },
236 screens: {
237 NewTask: createNativeStackScreen({
238 screen: NewTaskRouteScreen,
239 linking: "",
240 options: {
241 title: "Choose project",
242 },
243 }),
244 NewTaskDraft: createNativeStackScreen({
245 screen: NewTaskDraftRouteScreen,
246 linking: "draft",
247 // The draft composer has no scroll view for glass to sample; a solid
248 // header also lays the content out below the bar (no manual inset).
249 options: SHEET_SOLID_HEADER_OPTIONS,
250 }),
251 AddProject: createNativeStackScreen({
252 screen: AddProjectSourceRoute,
253 linking: "add-project",
254 options: {
255 title: "Add Project",
256 },
257 }),
258 AddProjectRepository: createNativeStackScreen({
259 screen: AddProjectRepositoryRoute,
260 linking: "add-project/repository",
261 }),
262 AddProjectDestination: createNativeStackScreen({
263 screen: AddProjectDestinationRoute,
264 linking: "add-project/destination",
265 }),
266 AddProjectLocal: createNativeStackScreen({
267 screen: AddProjectLocalRoute,
268 linking: "add-project/local",
269 }),
270 },
271});
272
273// Routes presented as sheets/overlays ON TOP of the workspace. They must not
274// influence the adaptive workspace layout: opening Settings over Home should
275// not flip the sidebar in or change the active thread.
276const WORKSPACE_OVERLAY_ROUTES = new Set([
277 "ConnectOnboarding",
278 "Connections",
279 "ConnectionsNew",
280 "GitBranches",
281 "GitCommit",
282 "GitConfirm",
283 "GitOverview",
284 "NewTaskSheet",
285 "SettingsLegal",
286 "SettingsSheet",
287 "ThreadReviewComment",
288]);
289
290/**
291 * Pathname of the topmost NON-overlay route — the screen the workspace is
292 * actually "on", regardless of any sheets floating above it.
293 */
294function workspacePathFromState(state: NavigationState): string {
295 const routes = state.routes.filter((route) => !WORKSPACE_OVERLAY_ROUTES.has(route.name));
296 const effectiveState =
297 routes.length > 0 && routes.length !== state.routes.length
298 ? ({ ...state, routes, index: routes.length - 1 } as NavigationState)
299 : state;
300 const path = getPathFromState(effectiveState, navigationPathConfig);
301 return path.startsWith("/") ? path : `/${path}`;
302}
303
304// The drain hook subscribes to the outbox, all thread shells, projects, and
305// connection statuses. Hosting it in a null-rendering leaf keeps those
306// updates from re-rendering RootStackLayout (and with it every screen) on
307// each enqueue, shell change, or reconnect.
308function ThreadOutboxDrainWorker() {
309 useThreadOutboxDrain();
310 return null;
311}
312
313function RootStackLayout(props: {
314 readonly children: React.ReactNode;
315 readonly state: NavigationState;
316}) {
317 const navigation = useNavigation();
318 const { pendingShare } = useIncomingShare();
319 const sharePresentationRef = useRef(EMPTY_INCOMING_SHARE_PRESENTATION_STATE);
320 useAgentNotificationNavigation();
321 // Presents the T3 Connect onboarding sheet after an in-session sign-in.
322 useConnectOnboardingNavigation();
323 // Launcher app shortcuts: routes shortcut taps and tracks opened threads.
324 useAppShortcuts(props.state);
325 useEffect(() => {
326 const topRouteName = props.state.routes[props.state.index]?.name;
327 const transition = transitionIncomingSharePresentation(sharePresentationRef.current, {
328 isShareSheetPresented: topRouteName === "NewTaskSheet",
329 pendingShareId: pendingShare?.id ?? null,
330 });
331 sharePresentationRef.current = transition.state;
332 if (!transition.shareIdToPresent) {
333 return;
334 }
335 navigation.navigate("NewTaskSheet", {
336 screen: "NewTask",
337 params: { incomingShareId: transition.shareIdToPresent },
338 });
339 }, [navigation, pendingShare, props.state]);
340 // Full pathname (sheets included) for keyboard-command scoping; the
341 // workspace layout only reacts to the underlying non-overlay route.
342 const path = getPathFromState(props.state, navigationPathConfig);
343 const pathname = path.startsWith("/") ? path : `/${path}`;
344 const workspacePathname = workspacePathFromState(props.state);
345
346 return (
347 <HardwareKeyboardCommandProvider pathname={pathname}>
348 <ThreadOutboxDrainWorker />
349 <ShowcaseCaptureCoordinator pathname={pathname} />
350 <ClerkSettingsSheetDetentProvider initiallyExpanded={false}>
351 <AdaptiveWorkspaceLayout pathname={workspacePathname}>
352 {props.children}
353 </AdaptiveWorkspaceLayout>
354 </ClerkSettingsSheetDetentProvider>
355 </HardwareKeyboardCommandProvider>
356 );
357}
358
359function NotFoundScreen() {
360 const navigation = useNavigation();
361 const screenBgStyle = StyleSheet.flatten(useResolveClassNames("bg-screen"));
362 const primaryBgStyle = StyleSheet.flatten(useResolveClassNames("bg-primary"));
363 const returnHomeButtonStyle = StyleSheet.flatten([
364 {
365 borderRadius: 999,
366 paddingHorizontal: 20,
367 paddingVertical: 14,
368 },
369 primaryBgStyle,
370 ]);
371
372 return (
373 <ScrollView
374 contentInsetAdjustmentBehavior="automatic"
375 contentContainerStyle={{
376 flexGrow: 1,
377 alignItems: "center",
378 justifyContent: "center",
379 gap: 16,
380 paddingHorizontal: 24,
381 paddingVertical: 32,
382 }}
383 style={[{ flex: 1 }, screenBgStyle]}
384 >
385 <Text className="text-3xl font-t3-bold text-foreground" selectable>
386 Route not found
387 </Text>
388 <Pressable
389 style={returnHomeButtonStyle}
390 onPress={() => navigation.dispatch(StackActions.replace("Home"))}
391 >
392 <Text className="text-base font-t3-bold text-primary-foreground">Return home</Text>
393 </Pressable>
394 </ScrollView>
395 );
396}
397
398export const RootStack = createNativeStackNavigator({
399 initialRouteName: "Home",
400 layout: RootStackLayout,
401 screenOptions: {
402 headerShown: false,
403 },
404 screens: {
405 Home: createNativeStackScreen({
406 screen: HomeRouteScreen,
407 linking: "",
408 options: {
409 ...GLASS_HEADER_OPTIONS,
410 contentStyle: { backgroundColor: "transparent" },
411 headerBackVisible: false,
412 ...getCompactBrandHeaderOptions(),
413 },
414 }),
415 Thread: createNativeStackScreen({
416 screen: ThreadRouteScreen,
417 linking: THREAD_LINKING_PREFIX,
418 options: GLASS_HEADER_OPTIONS,
419 }),
420 ThreadTerminal: createNativeStackScreen({
421 screen: ThreadTerminalRouteScreen,
422 linking: `${THREAD_LINKING_PREFIX}/terminal`,
423 options: SOLID_HEADER_OPTIONS,
424 }),
425 ThreadReview: createNativeStackScreen({
426 screen: ReviewSheet,
427 linking: `${THREAD_LINKING_PREFIX}/review`,
428 options: SOLID_HEADER_OPTIONS,
429 }),
430 ThreadReviewComment: createNativeStackScreen({
431 screen: ReviewCommentComposerSheet,
432 linking: `${THREAD_LINKING_PREFIX}/review-comment`,
433 options: {
434 // Android cannot host the keyboard-driven comment composer inside a
435 // formSheet; use a full-screen modal there instead.
436 presentation: Platform.OS === "android" ? "fullScreenModal" : "formSheet",
437 sheetAllowedDetents: Platform.OS === "android" ? undefined : [0.55, 0.92],
438 sheetGrabberVisible: Platform.OS !== "android",
439 },
440 }),
441 ThreadFiles: createNativeStackScreen({
442 screen: ThreadFilesTreeScreen,
443 linking: `${THREAD_LINKING_PREFIX}/files`,
444 options: {
445 ...GLASS_HEADER_OPTIONS,
446 contentStyle:
447 SHEET_BACKGROUND_COLOR !== undefined
448 ? { backgroundColor: SHEET_BACKGROUND_COLOR }
449 : undefined,
450 title: "Files",
451 },
452 }),
453 ThreadFile: createNativeStackScreen({
454 screen: ThreadFileScreen,
455 linking: `${THREAD_LINKING_PREFIX}/files/:path*`,
456 options: SOLID_HEADER_OPTIONS,
457 }),
458 GitOverview: createNativeStackScreen({
459 screen: GitOverviewSheet,
460 linking: `${THREAD_LINKING_PREFIX}/git`,
461 options: {
462 presentation: "formSheet",
463 sheetAllowedDetents: [0.55, 0.92],
464 sheetGrabberVisible: true,
465 },
466 }),
467 GitCommit: createNativeStackScreen({
468 screen: GitCommitSheet,
469 linking: `${THREAD_LINKING_PREFIX}/git/commit`,
470 options: {
471 presentation: "formSheet",
472 sheetAllowedDetents: [0.55, 0.92],
473 sheetGrabberVisible: true,
474 },
475 }),
476 GitBranches: createNativeStackScreen({
477 screen: GitBranchesSheet,
478 linking: `${THREAD_LINKING_PREFIX}/git/branches`,
479 options: {
480 presentation: "formSheet",
481 sheetAllowedDetents: [0.55, 0.92],
482 sheetGrabberVisible: true,
483 },
484 }),
485 GitConfirm: createNativeStackScreen({
486 screen: GitConfirmSheet,
487 linking: `${THREAD_LINKING_PREFIX}/git-confirm`,
488 options: {
489 presentation: "formSheet",
490 sheetAllowedDetents: [0.45, 0.7],
491 sheetGrabberVisible: true,
492 },
493 }),
494 SettingsSheet: createNativeStackScreen({
495 screen: SettingsSheetStack,
496 linking: "settings",
497 options: {
498 gestureEnabled: true,
499 headerShown: false,
500 // Android pushes settings as a regular full page with an in-screen
501 // back header; iOS keeps the detented form sheet.
502 ...(Platform.OS === "android"
503 ? { presentation: "card" as const }
504 : {
505 presentation: "formSheet" as const,
506 sheetAllowedDetents: [0.7, 0.92],
507 sheetGrabberVisible: true,
508 }),
509 },
510 }),
511 SettingsLegal: createNativeStackScreen({
512 screen: SettingsLegalRouteScreen,
513 linking: "settings/legal",
514 options: {
515 ...LEGAL_DOCUMENT_HEADER_OPTIONS,
516 title: "Legal",
517 },
518 }),
519 ConnectOnboarding: createNativeStackScreen({
520 screen: ConnectOnboardingRouteScreen,
521 linking: "connect-onboarding",
522 options: {
523 // A root-level Android formSheet does not host the native stack bar;
524 // the route renders an embedded AndroidSheetHeader instead.
525 ...(Platform.OS === "android" ? { headerShown: false } : SHEET_SOLID_HEADER_OPTIONS),
526 title: "Set up T3 Connect",
527 gestureEnabled: true,
528 presentation: "formSheet",
529 sheetAllowedDetents: [0.6, 0.95],
530 sheetGrabberVisible: true,
531 },
532 }),
533 Connections: createNativeStackScreen({
534 screen: ConnectionsRouteScreen,
535 linking: "connections",
536 options: {
537 title: "Environments",
538 // Android: full page; the screen renders its own AndroidScreenHeader,
539 // so the native bar stays hidden. iOS keeps the sheet.
540 ...(Platform.OS === "android"
541 ? { presentation: "card" as const, headerShown: false }
542 : {
543 presentation: "formSheet" as const,
544 sheetAllowedDetents: [0.55, 0.7],
545 sheetGrabberVisible: true,
546 }),
547 },
548 }),
549 ConnectionsNew: createNativeStackScreen({
550 screen: ConnectionsNewRouteScreen,
551 linking: "connections/new",
552 options: {
553 presentation: "formSheet",
554 sheetAllowedDetents: [0.55, 0.7],
555 sheetGrabberVisible: true,
556 },
557 }),
558 NewTaskSheet: createNativeStackScreen({
559 screen: NewTaskSheetStack,
560 linking: "new",
561 // The whole new-task flow (choose project → draft → add project) shares
562 // draft state via NewTaskFlowProvider. The expo-router era mounted it in
563 // app/new/_layout.tsx; this layout wrapper is the native-stack equivalent.
564 layout: ({ children }) => <NewTaskFlowProvider>{children}</NewTaskFlowProvider>,
565 options: {
566 gestureEnabled: true,
567 headerShown: false,
568 // Android pushes the flow as a regular full page — the draft should
569 // read like a thread that just doesn't exist yet; iOS keeps the sheet.
570 ...(Platform.OS === "android"
571 ? { presentation: "card" as const }
572 : {
573 presentation: "formSheet" as const,
574 sheetAllowedDetents: [0.92],
575 sheetGrabberVisible: true,
576 }),
577 },
578 }),
579 NotFound: createNativeStackScreen({
580 screen: NotFoundScreen,
581 linking: "*",
582 }),
583 },
584});
585type RootStackType = typeof RootStack;
586
587const navigationPathConfig = {
588 screens: createPathConfigForStaticNavigation(RootStack) ?? {},
589};
590
591declare module "@react-navigation/native" {
592 interface RootNavigator extends RootStackType {}
593}