Skip to content
TypeScript

fix(mobile): keep settled status pills readable (#31635)

shivam4cb6945dc60e
diff --git a/apps/mobile/src/features/threads/floating-working-control.tsx b/apps/mobile/src/features/threads/floating-working-control.tsx
index 4ef096c1000..a41fc2b3de3 100644
--- a/apps/mobile/src/features/threads/floating-working-control.tsx
+++ b/apps/mobile/src/features/threads/floating-working-control.tsx
@@ -101,11 +101,12 @@ export function FloatingWorkingControl(props: {
const [previewWidth, setPreviewWidth] = useState(0);
const agents = props.agents;
const hasAgents = agents !== null;
+ // Only reserve the scroll button's slot while it is visible.
+ const reservedWidth = props.showScrollToEnd ? CONTROL_HEIGHT + 32 : 16;
const availableLabelWidth = Math.max(
0,
Math.min(overlayWidth, windowWidth) -
- CONTROL_HEIGHT -
- 32 -
+ reservedWidth -
(action !== null ? actionWidth : 0) -
(hasQueue ? queueWidth : 0) -
(hasAgents ? agentsWidth : 0) -
@@ -186,7 +187,7 @@ export function FloatingWorkingControl(props: {
props.status !== null ? (
<View
pointerEvents={statusInteractive ? "box-none" : "none"}
- className="h-11 items-center justify-center"
+ className="h-11 items-center justify-center overflow-hidden"
>
<Animated.View className="h-11" style={capsuleSizerStyle} />
<View
@@ -272,7 +273,7 @@ export function FloatingWorkingControl(props: {
className="h-11 flex-row items-center gap-1.5 px-3 active:opacity-70"
>
{hasStatus || hasPreview ? <View className="absolute left-0 h-4 w-px bg-border" /> : null}
- <SymbolView name="person.2" size={13} tintColorClassName="accent-foreground-muted" />
+ <SymbolView name="person.2" size={13} tintColorClassName="accent-foreground" />
<Text className="font-t3-medium text-xs tabular-nums" numberOfLines={1}>
{agents.label}
</Text>
@@ -291,7 +292,7 @@ export function FloatingWorkingControl(props: {
{hasStatus || hasPreview || hasAgents ? (
<View className="absolute left-0 h-4 w-px bg-border" />
) : null}
- <SymbolView name="list.number" size={13} tintColorClassName="accent-foreground-muted" />
+ <SymbolView name="list.number" size={13} tintColorClassName="accent-foreground" />
<Text className="shrink font-t3-medium text-xs tabular-nums" numberOfLines={1}>
{props.queuedCount} queued
</Text>
@@ -395,7 +396,7 @@ function CompactingLabel(props: { readonly onLayout: (event: LayoutChangeEvent)
<SymbolView
name="arrow.down.right.and.arrow.up.left"
size={13}
- tintColorClassName="foreground"
+ tintColorClassName="accent-foreground"
type="monochrome"
/>
<Text className="font-t3-medium text-xs text-foreground">Compacting…</Text>
@@ -452,7 +453,7 @@ function FloatingStatusLabel(props: {
onLayout={props.onLayout}
onPress={props.status.onPress}
>
- <SymbolView name="text.bubble" size={13} tintColorClassName="foreground" />
+ <SymbolView name="text.bubble" size={13} tintColorClassName="accent-foreground" />
<Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
{props.status.label}
</Text>
@@ -494,7 +495,7 @@ function FloatingStatusLabel(props: {
<SymbolView
name={props.status.state === "settled" ? "checkmark.circle" : "clock"}
size={13}
- tintColorClassName="foreground"
+ tintColorClassName="accent-foreground"
type="monochrome"
/>
<Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
@@ -516,7 +517,7 @@ function FloatingStatusLabel(props: {
<SymbolView
name={props.status.waiting ? "person.2" : "terminal"}
size={13}
- tintColorClassName="foreground"
+ tintColorClassName="accent-foreground"
type="monochrome"
/>
<Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
@@ -557,7 +558,12 @@ function FloatingStatusLabel(props: {
className="gap-2"
onLayout={props.onLayout}
>
- <SymbolView name="target" size={13} tintColorClassName="foreground" type="monochrome" />
+ <SymbolView
+ name="target"
+ size={13}
+ tintColorClassName="accent-foreground"
+ type="monochrome"
+ />
<Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
{props.status.label}
</Text>
@@ -575,7 +581,7 @@ function FloatingStatusLabel(props: {
<SymbolView
name="arrow.triangle.branch"
size={13}
- tintColorClassName="foreground"
+ tintColorClassName="accent-foreground"
type="monochrome"
/>
<ShimmeringWorkContent