TypeScript
fix(mobile): center floating status actions (#24526)
Alex5ed8b54860c6
diff --git a/apps/mobile/src/features/threads/floating-working-control.tsx b/apps/mobile/src/features/threads/floating-working-control.tsxindex a012e6253f4..c39788a6697 100644--- a/apps/mobile/src/features/threads/floating-working-control.tsx+++ b/apps/mobile/src/features/threads/floating-working-control.tsx@@ -196,20 +196,24 @@ export function FloatingWorkingControl(props: {<View className="flex-row items-center">{statusContent}{action !== null ? (- <Pressable- accessibilityRole="button"- accessibilityLabel={action.accessibilityLabel}- accessibilityState={{ disabled: action.disabled }}- disabled={action.disabled}- onPress={action.onPress}+ <ViewonLayout={(event) => setActionWidth(settleWidth(event.nativeEvent.layout.width))}- className={`h-11 flex-row items-center gap-1.5 px-3 active:opacity-70 ${action.disabled ? "opacity-50" : ""}`}+ className="h-11 flex-row items-center">- <View className="mr-1 h-4 w-px bg-border" />- <Text className="font-t3-medium text-xs text-foreground" numberOfLines={1}>- {action.label}- </Text>- </Pressable>+ <View className="h-4 w-px bg-border" />+ <Pressable+ accessibilityRole="button"+ accessibilityLabel={action.accessibilityLabel}+ accessibilityState={{ disabled: action.disabled }}+ disabled={action.disabled}+ onPress={action.onPress}+ className={`h-11 items-center justify-center px-3 active:opacity-70 ${action.disabled ? "opacity-50" : ""}`}+ >+ <Text className="font-t3-medium text-xs text-foreground" numberOfLines={1}>+ {action.label}+ </Text>+ </Pressable>+ </View>) : null}{hasPreview ? (<View@@ -234,7 +238,7 @@ export function FloatingWorkingControl(props: {onLayout={(event) => setAgentsWidth(settleWidth(event.nativeEvent.layout.width))}className="h-11 flex-row items-center gap-1.5 px-3 active:opacity-70">- {hasStatus || hasPreview ? <View className="mr-1 h-4 w-px bg-border" /> : null}+ {hasStatus || hasPreview ? <View className="absolute left-0 h-4 w-px bg-border" /> : null}<SymbolView name="person.2" size={13} tintColorClassName="accent-foreground-muted" /><Text className="font-t3-medium text-xs tabular-nums" numberOfLines={1}>{agents.label}@@ -252,7 +256,7 @@ export function FloatingWorkingControl(props: {className="h-11 flex-row items-center gap-2 px-3 active:opacity-70">{hasStatus || hasPreview || hasAgents ? (- <View className="mr-1 h-4 w-px bg-border" />+ <View className="absolute left-0 h-4 w-px bg-border" />) : null}<SymbolView name="list.number" size={13} tintColorClassName="accent-foreground-muted" /><Text className="shrink font-t3-medium text-xs tabular-nums" numberOfLines={1}>