TypeScript
fix(mobile): Live Activity stops shouting the running-agent count (#24329)
Julius Marminged14ace8233ad
diff --git a/apps/mobile/src/widgets/AgentActivity.tsx b/apps/mobile/src/widgets/AgentActivity.tsxindex 53063393bbd..ca0a6d50d42 100644--- a/apps/mobile/src/widgets/AgentActivity.tsx+++ b/apps/mobile/src/widgets/AgentActivity.tsx@@ -1,4 +1,4 @@-import { Circle, HStack, Image, Spacer, Text, VStack, ZStack } from "@expo/ui/swift-ui";+import { HStack, Image, Spacer, Text, VStack, ZStack } from "@expo/ui/swift-ui";import type { ComponentProps } from "react";import {accessibilityElement,@@ -152,8 +152,7 @@ export function AgentActivity(: environment.isStale? "Out of date": `${props.activeCount} active`;- const showCompactCount = !attentionRow && !allDone && !environment.isStale;- const compactCountLabel = props.activeCount > 99 ? "99+" : `${props.activeCount}`;+ const showCompactGlyph = !attentionRow && !failedRow && !allDone && !environment.isStale;const summary = attentionSuffix || activeLabel;// Any registered scheme variant routes back to this app; taps are delivered@@ -182,7 +181,8 @@ export function AgentActivity(return "clock.arrow.circlepath";case "running":default:- return "arrow.triangle.2.circlepath";+ // Matches the thread list's Working indicator.+ return "circle.dashed";}};@@ -331,28 +331,20 @@ export function AgentActivity(</VStack>),compactLeading: renderLogo(14, tint, linkModifiers),- compactTrailing: showCompactCount ? (- <ZStack+ // While agents are only working, stay quiet: the thread list's Working+ // glyph marks the activity without a count. Labels appear only for+ // attention or outcomes.+ compactTrailing: showCompactGlyph ? (+ <HStackmodifiers={[- frame({ width: 28, height: 28 }),+ padding({ trailing: 2 }),accessibilityElement("ignore"),accessibilityLabel(agentsLabel),...linkModifiers,]}>- <Circle modifiers={[foregroundStyle(tint)]} />- <Text- modifiers={[- font({ weight: "bold", size: 14 }),- foregroundStyle("#000000"),- lineLimit(1),- minimumScaleFactor(0.75),- frame({ width: 24, height: 28 }),- ]}- >- {compactCountLabel}- </Text>- </ZStack>+ {renderGlyph(phaseSymbol(heroRow?.phase ?? "running"), 14, tint)}+ </HStack>) : (<Textmodifiers={[@@ -367,13 +359,14 @@ export function AgentActivity(? attentionRow.phase === "waiting_for_approval"? "Approval": "Input"- : activeLabel}+ : failedRow+ ? "Failed"+ : activeLabel}</Text>),- minimal:- (attentionRow || failedRow || allDone) && heroRow- ? renderGlyph(phaseSymbol(heroRow.phase), 13, phaseTint(heroRow.phase), linkModifiers)- : renderLogo(11, tint, linkModifiers),+ minimal: heroRow+ ? renderGlyph(phaseSymbol(heroRow.phase), 13, phaseTint(heroRow.phase), linkModifiers)+ : renderLogo(11, tint, linkModifiers),expandedLeading: (<HStack spacing={5} alignment="center" modifiers={[padding({ leading: 4, vertical: 4 })]}>{renderLogo(15, tint)}