@devries-cameron20 / t3code-1 / commits / 7a328c47ca
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(mobile): thread row timers no longer reflow the title every second (#33447)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Nov 9, 2026 at 08:34 UTC 7a328c47ca67e6d9a44a44d01bb9d5fff1496157
1 file changed +32 -9
apps/mobile/src/features/threads/thread-list-v2-items.tsx
+32 -9
@@ -31,7 +31,7 @@ import { canSnooze } from "@t3tools/client-runtime/state/thread-settled";
31 import { threadChipCopyTarget } from "@t3tools/client-runtime/thread-reference";
32 import type { MenuAction } from "@react-native-menu/menu";
33 import { memo, useCallback, useMemo, useState, type ComponentProps } from "react";
34 -import { Platform, Pressable, useWindowDimensions, View } from "react-native";
34 +import { Platform, Pressable, Text as RNText, useWindowDimensions, View } from "react-native";
35 import type { SwipeableMethods } from "react-native-gesture-handler/ReanimatedSwipeable";
36
37 import type { ThreadListProvider } from "../../state/thread-list-environments";
@@ -84,7 +84,8 @@ import { PullRequestGlyph } from "../pull-requests/pullRequestGlyphs";
84 import { pullRequestStatus } from "../pull-requests/pullRequestStatus";
85
86 interface StatusLabel {
87 - readonly label: string;
87 + // Null when the icon and timer carry the status on their own.
88 + readonly label: string | null;
89 readonly icon: AppSymbolName;
90 readonly className: string;
91 readonly iconTintClassName: string;
@@ -109,13 +110,13 @@ const STATUS_LABEL_BY_STATUS: Partial<Record<ThreadListV2Status, StatusLabel>> =
110 iconTintClassName: "accent-adaptive-fuchsia-600-300",
111 },
112 working: {
112 - label: "Working",
113 + label: null,
114 icon: "circle.dashed",
115 className: "text-adaptive-sky-600-400",
116 iconTintClassName: "accent-adaptive-sky-600-400",
117 },
118 waiting: {
118 - label: "Waiting",
119 + label: null,
120 icon: "circle.dashed.inset.filled",
121 className: "text-foreground-muted",
122 iconTintClassName: "accent-foreground-muted",
@@ -140,11 +141,28 @@ const DONE_STATUS_LABEL: StatusLabel = {
141 iconTintClassName: "accent-adaptive-emerald-700-300",
142 };
143
143 -function ThreadListV2Duration(props: { readonly startedAt: string | null }) {
144 +// DM Sans has no tabular figures, so a ticking timer in it reflows the row every second.
145 +const TABULAR_DURATION_STYLE = {
146 + fontFamily: Platform.OS === "ios" ? "System" : "sans-serif",
147 + fontWeight: "700",
148 + fontVariant: ["tabular-nums"],
149 +} as const;
150 +
151 +function ThreadListV2Duration(props: {
152 + readonly startedAt: string | null;
153 + readonly leadingSpace: boolean;
154 +}) {
155 const startedAtMs = Date.parse(props.startedAt ?? "");
156 const nowMs = useVisibleSecondClock(Number.isFinite(startedAtMs));
157 if (!Number.isFinite(startedAtMs)) return null;
147 - return ` ${formatWorkingDurationLabel(nowMs - startedAtMs)}`;
158 + return (
159 + <>
160 + {props.leadingSpace ? " " : null}
161 + <RNText style={TABULAR_DURATION_STYLE}>
162 + {formatWorkingDurationLabel(nowMs - startedAtMs)}
163 + </RNText>
164 + </>
165 + );
166 }
167
168 const CARD_MENU_ACTIONS: MenuAction[] = [
@@ -1218,15 +1236,20 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
1236 <Text
1237 className={cn(
1238 "text-xs font-t3-bold",
1221 - (status === "working" || status === "waiting") && "tabular-nums",
1239 selected ? selectedThreadRowColors.foregroundClassName : statusLabel.className,
1240 )}
1241 >
1242 {statusLabel.label}
1243 {status === "working" ? (
1227 - <ThreadListV2Duration startedAt={resolveThreadWorkingStartedAt(thread)} />
1244 + <ThreadListV2Duration
1245 + startedAt={resolveThreadWorkingStartedAt(thread)}
1246 + leadingSpace={statusLabel.label !== null}
1247 + />
1248 ) : status === "waiting" ? (
1229 - <ThreadListV2Duration startedAt={thread.latestRun?.completedAt ?? null} />
1249 + <ThreadListV2Duration
1250 + startedAt={thread.latestRun?.completedAt ?? null}
1251 + leadingSpace={statusLabel.label !== null}
1252 + />
1253 ) : null}
1254 </Text>
1255 </View>