Skip to content

Commit 6a90274

Browse files
committed
fix(mobile): show compact agent counts in a circle
1 parent 22dca85 commit 6a90274

1 file changed

Lines changed: 27 additions & 10 deletions

File tree

‎apps/mobile/src/widgets/AgentActivity.tsx‎

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { HStack, Image, Spacer, Text, VStack, ZStack } from "@expo/ui/swift-ui";
1+
import { Circle, HStack, Image, Spacer, Text, VStack, ZStack } from "@expo/ui/swift-ui";
22
import type { ComponentProps } from "react";
33
import {
4+
accessibilityElement,
45
accessibilityLabel,
56
activityBackgroundTint,
67
font,
@@ -330,27 +331,43 @@ export function AgentActivity(
330331
</VStack>
331332
),
332333
compactLeading: renderLogo(14, tint, linkModifiers),
333-
compactTrailing: (
334+
compactTrailing: showCompactCount ? (
335+
<ZStack
336+
modifiers={[
337+
frame({ width: 28, height: 28 }),
338+
accessibilityElement("ignore"),
339+
accessibilityLabel(agentsLabel),
340+
...linkModifiers,
341+
]}
342+
>
343+
<Circle modifiers={[foregroundStyle(tint)]} />
344+
<Text
345+
modifiers={[
346+
font({ weight: "bold", size: 14 }),
347+
foregroundStyle("#000000"),
348+
lineLimit(1),
349+
minimumScaleFactor(0.75),
350+
frame({ width: 24, height: 28 }),
351+
]}
352+
>
353+
{compactCountLabel}
354+
</Text>
355+
</ZStack>
356+
) : (
334357
<Text
335358
modifiers={[
336-
font({
337-
weight: showCompactCount ? "bold" : "semibold",
338-
size: showCompactCount ? 14 : 11,
339-
}),
359+
font({ weight: "semibold", size: 11 }),
340360
foregroundStyle(tint),
341361
lineLimit(1),
342362
minimumScaleFactor(0.5),
343-
...(showCompactCount ? [accessibilityLabel(agentsLabel)] : []),
344363
...linkModifiers,
345364
]}
346365
>
347366
{attentionRow
348367
? attentionRow.phase === "waiting_for_approval"
349368
? "Approval"
350369
: "Input"
351-
: showCompactCount
352-
? compactCountLabel
353-
: activeLabel}
370+
: activeLabel}
354371
</Text>
355372
),
356373
minimal:

0 commit comments

Comments
 (0)