Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(ui): tabular figures on live task timers (MUL-5448) (#6094)
Jiayuan Zhang9ff766d7003d
diff --git a/apps/mobile/components/chat/status-pill.tsx b/apps/mobile/components/chat/status-pill.tsxindex 69452733e2..68d3297a43 100644--- a/apps/mobile/components/chat/status-pill.tsx+++ b/apps/mobile/components/chat/status-pill.tsx@@ -22,7 +22,7 @@* fallback. Differences are visual-only.*/import { useEffect, useRef, useState } from "react";-import { View } from "react-native";+import { View, type TextStyle } from "react-native";import Animated, {cancelAnimation,useAnimatedStyle,@@ -109,6 +109,16 @@ function pickStage(return { label: "Thinking" };}+// Tabular figures for the 1Hz counter — proportional digits change the text+// width on 9s → 10s, which reflows the whole row once a second.+//+// This CANNOT be `className="tabular-nums"`. Tailwind compiles that utility to+// `font-variant-numeric`, and react-native-css-interop's property allow-list+// only carries `font-variant-caps` — the declaration is dropped, so the class+// is a silent no-op on RN. `fontVariant` is the working equivalent. Hoisted so+// the once-a-second re-render doesn't hand Text a fresh style object.+const TABULAR_NUMS: TextStyle = { fontVariant: ["tabular-nums"] };+export function StatusPill({pendingTask,taskMessages = [],@@ -145,7 +155,7 @@ export function StatusPill({{stage.static ? null : <BreathingDots />}<Text className="text-xs text-muted-foreground" numberOfLines={1}>{stage.label}- <Text className="text-xs text-muted-foreground/70">+ <Text className="text-xs text-muted-foreground/70" style={TABULAR_NUMS}>{" · "}{formatElapsedSecs(elapsedSec)}</Text>diff --git a/packages/views/chat/components/task-status-pill.tsx b/packages/views/chat/components/task-status-pill.tsxindex befd0e97a2..2d4d42b3c8 100644--- a/packages/views/chat/components/task-status-pill.tsx+++ b/packages/views/chat/components/task-status-pill.tsx@@ -174,7 +174,7 @@ export function TaskStatusPill({<span className={cn(!stage.static && "animate-chat-text-shimmer")}>{stage.label}</span>- <span className="opacity-70"> · {formatElapsedSecs(elapsedSecs)}</span>+ <span className="opacity-70 tabular-nums"> · {formatElapsedSecs(elapsedSecs)}</span></span></div>);diff --git a/packages/views/common/task-transcript/agent-transcript-dialog.tsx b/packages/views/common/task-transcript/agent-transcript-dialog.tsxindex 859f051e9b..6346340370 100644--- a/packages/views/common/task-transcript/agent-transcript-dialog.tsx+++ b/packages/views/common/task-transcript/agent-transcript-dialog.tsx@@ -747,7 +747,7 @@ export function AgentTranscriptDialog({)}{duration && (<>- <span>{t(($) => $.transcript.fact_took, { duration })}</span>+ <span className="tabular-nums">{t(($) => $.transcript.fact_took, { duration })}</span><FactDot /></>)}