Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): wait for thread deep link hydration #11502

MergedMichel-Liao(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/11502/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 149 additions and 6 deletions (loading 1).

x
0 of 4 viewed, 4 left
37 additions and 6 deletionsapps/mobile/src/features/threads/ThreadRouteScreen.tsxModified
View file
@@ -25,6 +25,7 @@
import { Alert, Platform, ScrollView, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { useWorkspaceState } from "../../state/workspace";
+import { useEnvironmentShellState } from "../../state/shell";
import { restoredNewTaskDraftKey } from "../../state/new-task-draft-key";
import { clearPendingThreadCreationOutcome } from "../../state/pending-thread-creation";
import { recoverFailedThreadDraft } from "../../state/recover-failed-thread-draft";
@@ -88,6 +89,7 @@
ThreadInspectorContentStack,
type ThreadInspectorMode,
} from "./thread-inspector-content-stack";
+import { threadRouteIsHydrating } from "./thread-route-hydration";
​
interface ThreadInspectorSelection {
readonly routeThreadIdentity: string | null;
@@ -123,7 +125,11 @@
readonly renderInspector?: (headerInset: number) => ReactNode;
​
-function ThreadUnavailableScreen() {
+/** Shows recovery only after the target route has reached a terminal unavailable state. */
+function ThreadUnavailableScreen(props: {
+ readonly actionLabel: string;
+ readonly onAction: () => void;
+}) {
return (
<ScrollView