Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): worktree setup clock pauses on hidden thread screens #20066

Mergedjuliusmarmingemerged 6 commits intomain fromrefs/pull/20066/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 5 additions and 19 deletions.

x
0 of 1 viewed, 1 left
5 additions and 19 deletionsapps/mobile/src/features/threads/worktree-setup-card.tsxModified
View file
@@ -5,14 +5,15 @@
} from "@t3tools/contracts";
import { worktreeSetupAgentStarted } from "@t3tools/client-runtime/worktree-setup";
import { formatDuration } from "@t3tools/shared/orchestrationTiming";
-import { useEffect, useState } from "react";
-import { AppState, Platform, Pressable, ScrollView, View } from "react-native";
+import { useState } from "react";
+import { Platform, Pressable, ScrollView, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { AppActivityIndicator } from "../../components/ui/AppActivityIndicator";
import { AppText as Text } from "../../components/ui/AppText";
import { SymbolView, type AppSymbolName } from "../../components/ui/AppSymbol";
import { WorktreeSetupSheet } from "./worktree-setup-sheet";
import { ShimmeringWorkContent } from "./thread-work-log";
+import { useVisibleSecondClock } from "./use-visible-second-clock";
​
export interface WorktreeSetupCardProps {
snapshot: WorktreeSetupSnapshot;
@@ -45,7 +46,7 @@
const backgroundSetup = handedOff && running;
const scriptName = snapshot.setupScript?.name ?? "Setup script";
const [detailsOpen, setDetailsOpen] = useState(false);
- const now = useSetupClock(running || working);
+ const now = useVisibleSecondClock(running || working);
const failed =
snapshot.phase === "failed" || snapshot.stages.some((stage) => stage.status === "failed");
const label =
@@ -147,7 +148,7 @@