The best way to control Claude Code, Codex and more from any computer or phone
refactor(mobile): use shared cache action rows (#21916)
Julius Marminge committed
Oct 19, 2026 at 15:04 UTC
6c3911102d054c1d957d45ec89a0e64d02a50272
1 file changed
+9
-22
apps/mobile/src/features/settings/SettingsClientStorageRouteScreen.tsx
+9
-22
@@ -5,12 +5,12 @@ import { useAtomSet, useAtomValue } from "@effect/atom-react";
5
import { type EnvironmentMachineKind, resolveEnvironmentMachineKind } from "@t3tools/contracts";
6
import { AsyncResult } from "effect/reactivity";
7
import { useMemo } from "react";
8
-import { Pressable, View } from "react-native";
8
+import { View } from "react-native";
9
import { useSafeAreaInsets } from "react-native-safe-area-context";
10
11
import { AppText as Text } from "../../components/ui/AppText";
12
import { SymbolView } from "../../components/ui/AppSymbol";
13
-import { EnvironmentMachineSymbol } from "../../components/EnvironmentMachineSymbol";
13
+import { ENVIRONMENT_MACHINE_SYMBOLS } from "../../components/EnvironmentMachineSymbol";
14
import {
15
clearClientCacheAtom,
16
clientCacheSummaryAtom,
@@ -167,28 +167,15 @@ function CacheEnvironmentRow(props: {
167
readonly onClear: () => void;
168
}) {
169
return (
170
- <View
171
- className={
172
- props.first
173
- ? "flex-row items-center gap-3 p-4"
174
- : "border-t border-border flex-row items-center gap-3 p-4"
175
- }
176
- >
177
- <EnvironmentMachineSymbol kind={props.machine} size={22} tintColorClassName="accent-icon" />
178
- <Text className="min-w-0 flex-1 text-base text-foreground" numberOfLines={1}>
179
- {props.environmentLabel}
180
- </Text>
181
- <Pressable
182
- accessibilityLabel={`Clear cache for ${props.environmentLabel}`}
183
- accessibilityRole="button"
170
+ <View className={props.first ? undefined : "border-t border-border"}>
171
+ <SettingsActionRow
172
+ icon={ENVIRONMENT_MACHINE_SYMBOLS[props.machine]}
173
+ label={props.environmentLabel}
174
+ description={`Clear ${formatBytes(props.environment.payloadBytes)} of cached data`}
175
+ tone="danger"
176
disabled={props.disabled}
177
onPress={props.onClear}
186
- className="rounded-full px-3 py-2 disabled:opacity-40"
187
- >
188
- <Text className="font-t3-medium tabular-nums text-danger-foreground" numberOfLines={1}>
189
- Clear {formatBytes(props.environment.payloadBytes)}
190
- </Text>
191
- </Pressable>
178
+ />
179
</View>
180
);
181
}