The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): the status pill label no longer flickers when it is truncated (#20724)
voida6 committed
Oct 19, 2026 at 06:33 UTC
c289e8012fb6376b81fe617c31df169b013b5d89
1 file changed
+10
-3
apps/mobile/src/features/threads/floating-working-control.tsx
+10
-3
@@ -58,6 +58,13 @@ const UniwindGlassContainer = withUniwind(GlassContainer, {
58
});
59
const AnimatedGlassView = Animated.createAnimatedComponent(UniwindGlassView);
60
61
+// The segment widths feed labelWidth, and labelWidth moves the segments. Pixel
62
+// rounding then flips a segment's width by one physical pixel per layout, which
63
+// re-ellipsizes a truncated label every frame. Sub-point changes are ignored.
64
+function settleWidth(next: number) {
65
+ return (current: number) => (Math.abs(current - next) < 1 ? current : next);
66
+}
67
+
68
const CONTROL_OVERLAY_OFFSET = CONTROL_HEIGHT + CONTROL_GAP - COMPOSER_CAPSULE_INSET;
69
export const FLOATING_WORKING_CONTROL_COVERAGE = CONTROL_OVERLAY_OFFSET + CONTROL_GAP;
70
@@ -182,7 +189,7 @@ export function FloatingWorkingControl(props: {
189
{hasPreview ? (
190
<View
191
className="h-11 flex-row items-center"
185
- onLayout={(event) => setPreviewWidth(event.nativeEvent.layout.width)}
192
+ onLayout={(event) => setPreviewWidth(settleWidth(event.nativeEvent.layout.width))}
193
>
194
{hasStatus ? <View className="h-4 w-px bg-border" /> : null}
195
{props.devicePreview !== null ? (
@@ -199,7 +206,7 @@ export function FloatingWorkingControl(props: {
206
accessibilityLabel={`Open agents, ${agents.accessibilityLabel}`}
207
accessibilityHint="Opens this turn's subagents"
208
onPress={props.onOpenAgents}
202
- onLayout={(event) => setAgentsWidth(event.nativeEvent.layout.width)}
209
+ onLayout={(event) => setAgentsWidth(settleWidth(event.nativeEvent.layout.width))}
210
className="h-11 flex-row items-center gap-1.5 px-3 active:opacity-70"
211
>
212
{hasStatus || hasPreview ? <View className="mr-1 h-4 w-px bg-border" /> : null}
@@ -215,7 +222,7 @@ export function FloatingWorkingControl(props: {
222
accessibilityLabel={`Open queue, ${props.queuedCount} messages`}
223
accessibilityHint="Opens queued messages for reordering, steering, or removal"
224
onPress={props.onOpenQueue}
218
- onLayout={(event) => setQueueWidth(event.nativeEvent.layout.width)}
225
+ onLayout={(event) => setQueueWidth(settleWidth(event.nativeEvent.layout.width))}
226
style={{ maxWidth: Math.min(overlayWidth, windowWidth) * 0.45 }}
227
className="h-11 flex-row items-center gap-2 px-3 active:opacity-70"
228
>