@devries-cameron20 / t3code Mirror · read-only / commits / 8863990fca
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 15:30 UTC

fix(android): Use MD3 loading spinners (#14282)

Alex committed Oct 11, 2026 at 11:35 UTC 8863990fcaecfb59dbd6c338e49aba603ecccdfd
32 files changed +159 -113
apps/mobile/src/components/AppActivityIndicator.android.tsx new
+49
@@ -0,0 +1,49 @@
1 +import { LoadingIndicator, Host } from "@expo/ui/jetpack-compose";
2 +import { size as composeSize } from "@expo/ui/jetpack-compose/modifiers";
3 +import { StyleSheet, View, type ActivityIndicatorProps } from "react-native";
4 +import { useResolveClassNames, withUniwind } from "uniwind";
5 +
6 +function AndroidActivityIndicator({
7 + animating = true,
8 + color,
9 + colorClassName: _colorClassName,
10 + className: _className,
11 + hidesWhenStopped: _hidesWhenStopped,
12 + size = "small",
13 + style,
14 + ...viewProps
15 +}: ActivityIndicatorProps) {
16 + const { color: primaryColor } = useResolveClassNames("text-primary");
17 + const diameter = typeof size === "number" ? size : size === "large" ? 48 : 20;
18 +
19 + return (
20 + <View
21 + accessible={animating}
22 + accessibilityRole="progressbar"
23 + accessibilityState={{ busy: animating }}
24 + {...viewProps}
25 + style={[styles.container, style]}
26 + >
27 + <View
28 + pointerEvents="none"
29 + importantForAccessibility="no-hide-descendants"
30 + style={{ width: diameter, height: diameter }}
31 + >
32 + {animating ? (
33 + <Host ignoreSafeAreaKeyboardInsets style={{ flex: 1 }}>
34 + <LoadingIndicator
35 + color={color ?? primaryColor}
36 + modifiers={[composeSize(diameter, diameter)]}
37 + />
38 + </Host>
39 + ) : null}
40 + </View>
41 + </View>
42 + );
43 +}
44 +
45 +export const AppActivityIndicator = withUniwind(AndroidActivityIndicator);
46 +
47 +const styles = StyleSheet.create({
48 + container: { alignItems: "center", justifyContent: "center" },
49 +});
apps/mobile/src/components/AppActivityIndicator.tsx new
+3
@@ -0,0 +1,3 @@
1 +import { ActivityIndicator } from "react-native";
2 +
3 +export const AppActivityIndicator = ActivityIndicator;
apps/mobile/src/components/LoadingScreen.tsx
+3 -2
@@ -1,5 +1,6 @@
1 -import { ActivityIndicator, StatusBar, View } from "react-native";
1 +import { StatusBar, View } from "react-native";
2 import { useSafeAreaInsets } from "react-native-safe-area-context";
3 +import { AppActivityIndicator } from "./AppActivityIndicator";
4 import { useAppearancePreferences } from "../features/settings/appearance/AppearancePreferencesProvider";
5
6 import { AppText as Text } from "./AppText";
@@ -26,7 +27,7 @@ export function LoadingScreen(props: {
27 {messagePlacement === "above-spinner" ? (
28 <Text className="font-t3-bold text-lg text-foreground">{props.message}</Text>
29 ) : null}
29 - <ActivityIndicator size="large" />
30 + <AppActivityIndicator size="large" />
31 {messagePlacement === "below-spinner" ? (
32 <Text className="font-t3-bold text-lg text-foreground">{props.message}</Text>
33 ) : null}
apps/mobile/src/components/MaterialButton.android.tsx
+2 -3
@@ -1,7 +1,7 @@
1 import {
2 Box,
3 Button,
4 - CircularProgressIndicator,
4 + LoadingIndicator,
5 FilledTonalButton,
6 Host,
7 Row,
@@ -78,9 +78,8 @@ export function MaterialButton(props: MaterialButtonProps) {
78 <Row verticalAlignment="center">
79 {props.loading ? (
80 <>
81 - <CircularProgressIndicator
81 + <LoadingIndicator
82 modifiers={[size(mediumIconSize, mediumIconSize)]}
83 - strokeWidth={2}
83 color={colors["--color-foreground-muted"]}
84 />
85 <Box modifiers={[size(8 * scale, 1)]} />
apps/mobile/src/components/MediaVideoPlayer.tsx
+4 -3
@@ -2,8 +2,9 @@ import { useIsFocused } from "@react-navigation/native";
2 import { useEvent } from "expo";
3 import { useVideoPlayer, VideoView } from "expo-video";
4 import { useEffect, useEffectEvent, useRef, useState } from "react";
5 -import { ActivityIndicator, AppState, Pressable, View } from "react-native";
5 +import { AppState, Pressable, View } from "react-native";
6
7 +import { AppActivityIndicator } from "./AppActivityIndicator";
8 import { AppText } from "./AppText";
9 import { SymbolView } from "./AppSymbol";
10 import { VideoThumbnailImage } from "./VideoThumbnailImage";
@@ -96,7 +97,7 @@ function LoadedMediaVideo(props: {
97 </View>
98 ) : loadState === "pending" || status === "loading" ? (
99 <View pointerEvents="none" className="absolute inset-0 items-center justify-center">
99 - <ActivityIndicator color="#ffffff" accessibilityLabel="Loading video" />
100 + <AppActivityIndicator color="#ffffff" accessibilityLabel="Loading video" />
101 </View>
102 ) : null}
103 </View>
@@ -160,7 +161,7 @@ function MediaVideoPlayerContent(props: MediaVideoPlayerProps) {
161 {props.unavailable ? (
162 <AppText className="text-sm text-white/80">Video unavailable</AppText>
163 ) : props.uri === null ? (
163 - <ActivityIndicator color="#ffffff" accessibilityLabel="Loading video" />
164 + <AppActivityIndicator color="#ffffff" accessibilityLabel="Loading video" />
165 ) : (
166 <View className="size-12 items-center justify-center rounded-full bg-black/60">
167 <SymbolView name="play" size={28} tintColor="#ffffff" type="monochrome" />
apps/mobile/src/components/ProjectCloneBanner.tsx
+3 -2
@@ -3,8 +3,9 @@ import {
3 projectCloneProgressSummary,
4 type ProjectCloneSnapshot,
5 } from "@t3tools/contracts";
6 -import { ActivityIndicator, Pressable, View } from "react-native";
6 +import { Pressable, View } from "react-native";
7
8 +import { AppActivityIndicator } from "./AppActivityIndicator";
9 import { cn } from "../lib/cn";
10 import { AppText as Text } from "./AppText";
11
@@ -24,7 +25,7 @@ export function ProjectCloneBanner(props: {
25 if (clone.phase === "running") {
26 return (
27 <View className="flex-row items-center gap-3 rounded-2xl border border-border bg-card px-3.5 py-3">
27 - <ActivityIndicator size="small" />
28 + <AppActivityIndicator size="small" />
29 <View className="min-w-0 flex-1">
30 <Text className="font-t3-medium text-sm" numberOfLines={1}>
31 Cloning {name}
apps/mobile/src/components/VideoPreviewModal.tsx
+3 -2
@@ -1,9 +1,10 @@
1 import { useIsFocused } from "@react-navigation/native";
2 import { videoMimeType } from "@t3tools/shared/video";
3 import { useEffect, useRef, useState } from "react";
4 -import { ActivityIndicator, Keyboard, Modal, Pressable, View } from "react-native";
4 +import { Keyboard, Modal, Pressable, View } from "react-native";
5 import { useSafeAreaInsets } from "react-native-safe-area-context";
6
7 +import { AppActivityIndicator } from "./AppActivityIndicator";
8 import { loadLocalAttachmentPreview } from "../lib/localAttachmentPreview";
9 import { useMediaActions } from "../state/mediaActions";
10 import { type MediaActionsSource } from "../lib/mediaActionsSource";
@@ -165,7 +166,7 @@ function OpenVideoPreviewModal(props: {
166 <MediaSourceCaption source={mediaActions.title} />
167 {playback.uri === null && !playback.unavailable ? (
168 <View className="flex-1 items-center justify-center gap-3 px-6">
168 - <ActivityIndicator color="#ffffff" />
169 + <AppActivityIndicator color="#ffffff" />
170 <AppText className="text-sm text-white/80">Loading video...</AppText>
171 </View>
172 ) : (
apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx
+3 -9
@@ -10,17 +10,11 @@ import {
10 resolveEnvironmentMachineKind,
11 } from "@t3tools/contracts";
12 import { useNavigation } from "@react-navigation/native";
13 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
14 import { ScreenHeader } from "../../components/ScreenHeader";
15 import { SymbolView } from "../../components/AppSymbol";
16 import { useCallback, useMemo, useRef, type ComponentProps } from "react";
16 -import {
17 - ActivityIndicator,
18 - Platform,
19 - Pressable,
20 - RefreshControl,
21 - useWindowDimensions,
22 - View,
23 -} from "react-native";
17 +import { Platform, Pressable, RefreshControl, useWindowDimensions, View } from "react-native";
18 import { GestureDetector, useNativeGesture } from "react-native-gesture-handler";
19 import type { SwipeableMethods } from "react-native-gesture-handler/ReanimatedSwipeable";
20
@@ -399,7 +393,7 @@ export function ArchivedThreadsScreen(props: {
393 if (isInitialLoad) {
394 return (
395 <View className="items-center py-16">
402 - <ActivityIndicator colorClassName="accent-icon" />
396 + <AppActivityIndicator colorClassName="accent-icon" />
397 <Text className="mt-3 text-sm text-foreground-muted">Loading archive...</Text>
398 </View>
399 );
apps/mobile/src/features/cloud/T3ConnectProfilePage.tsx
+7 -11
@@ -7,16 +7,9 @@ import type { MenuAction } from "@react-native-menu/menu";
7 import type { EnvironmentId } from "@t3tools/contracts";
8 import type { RelayClientEnvironmentRecord } from "@t3tools/contracts/relay";
9 import { type ReactNode, useRef, useState } from "react";
10 -import {
11 - ActivityIndicator,
12 - Alert,
13 - Pressable,
14 - RefreshControl,
15 - ScrollView,
16 - Text,
17 - View,
18 -} from "react-native";
10 +import { Alert, Pressable, RefreshControl, ScrollView, Text, View } from "react-native";
11
12 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
13 import { SymbolView } from "../../components/AppSymbol";
14 import { showConfirmDialog } from "../../components/ConfirmDialogHost";
15 import { ControlPillMenu } from "../../components/ControlPill";
@@ -167,7 +160,7 @@ export function T3ConnectProfilePage() {
160 </>
161 ) : isInitialLoad ? (
162 <View className="flex-row items-center gap-3 px-6 py-4">
170 - <ActivityIndicator colorClassName={"accent-clerk-foreground-muted"} size="small" />
163 + <AppActivityIndicator colorClassName={"accent-clerk-foreground-muted"} size="small" />
164 <Text className="text-base text-clerk-foreground-muted">Loading environments</Text>
165 </View>
166 ) : environments.length > 0 ? (
@@ -178,7 +171,10 @@ export function T3ConnectProfilePage() {
171 subtitle={`${linkedAtLabel(environment.linkedAt)} · ${endpointLabel(environment)}`}
172 accessory={
173 deregisteringEnvironmentId === environment.environmentId ? (
181 - <ActivityIndicator colorClassName={"accent-clerk-foreground-muted"} size="small" />
174 + <AppActivityIndicator
175 + colorClassName={"accent-clerk-foreground-muted"}
176 + size="small"
177 + />
178 ) : (
179 <ControlPillMenu
180 actions={ENVIRONMENT_MENU_ACTIONS}
apps/mobile/src/features/connection/CloudEnvironmentRows.tsx
+3 -2
@@ -1,3 +1,4 @@
1 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
2 import { ConnectionTraceId } from "./ConnectionTraceId";
3 import { useAuth } from "@clerk/expo";
4 import { SymbolView } from "../../components/AppSymbol";
@@ -13,7 +14,7 @@ import {
14 } from "@t3tools/contracts";
15 import { useAtomValue } from "@effect/atom-react";
16 import { useCallback, useState } from "react";
16 -import { ActivityIndicator, Pressable, type TextLayoutEvent, View } from "react-native";
17 +import { Pressable, type TextLayoutEvent, View } from "react-native";
18
19 import { AppText as Text } from "../../components/AppText";
20 import { EnvironmentMachineSymbol } from "../../components/EnvironmentMachineSymbol";
@@ -151,7 +152,7 @@ function CloudEnvironmentRowsContent(
152 </View>
153 ) : controller.relayDiscovery.isRefreshing ? (
154 <View collapsable={false} className="items-center gap-3 rounded-[24px] bg-grouped-card p-6">
154 - <ActivityIndicator colorClassName={"accent-icon"} />
155 + <AppActivityIndicator colorClassName={"accent-icon"} />
156 <Text className="text-center text-sm leading-normal text-foreground-muted">
157 Loading linked cloud environments.
158 </Text>
apps/mobile/src/features/connection/EnvironmentConnectionNotice.tsx
+3 -2
@@ -1,10 +1,11 @@
1 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
2 import { ConnectionTraceId } from "./ConnectionTraceId";
3 import {
4 type EnvironmentConnectionPhase,
5 type EnvironmentConnectionPresentation,
6 } from "@t3tools/client-runtime/connection";
7 import { SymbolView } from "../../components/AppSymbol";
7 -import { ActivityIndicator, Pressable, View } from "react-native";
8 +import { Pressable, View } from "react-native";
9
10 import { AppText as Text } from "../../components/AppText";
11
@@ -65,7 +66,7 @@ export function EnvironmentConnectionNotice(props: {
66 <View className="flex-1 items-center justify-center px-8">
67 <View className="max-w-[320px] items-center gap-3">
68 {isRetrying ? (
68 - <ActivityIndicator size="small" colorClassName={"accent-icon-muted"} />
69 + <AppActivityIndicator size="small" colorClassName={"accent-icon-muted"} />
70 ) : (
71 <SymbolView
72 name={props.connection.phase === "offline" ? "wifi.slash" : "bolt.horizontal.circle"}
apps/mobile/src/features/devices/DevicePreviewRouteScreen.tsx
+4 -11
@@ -9,19 +9,12 @@ import * as Cause from "effect/Cause";
9 import { useCallback, useEffect, useMemo, useRef, useState, type RefObject } from "react";
10 import * as Haptics from "expo-haptics";
11 import { Accelerometer } from "expo-sensors";
12 -import {
13 - ActivityIndicator,
14 - Alert,
15 - AppState,
16 - BackHandler,
17 - Pressable,
18 - StatusBar,
19 - View,
20 -} from "react-native";
12 +import { Alert, AppState, BackHandler, Pressable, StatusBar, View } from "react-native";
13 import Animated, { FadeIn, FadeOut, ReduceMotion } from "react-native-reanimated";
14 import { useSafeAreaInsets } from "react-native-safe-area-context";
15
16 import { SymbolView } from "../../components/AppSymbol";
17 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
18 import { AppText } from "../../components/AppText";
19 import { ControlPill, ControlPillMenu } from "../../components/ControlPill";
20 import { GlassSurface } from "../../components/GlassSurface";
@@ -295,7 +288,7 @@ function DevicePreviewScreen({
288 </Pressable>
289 </>
290 ) : focused && foreground ? (
298 - <ActivityIndicator color={themeVariables["--color-icon"]} />
291 + <AppActivityIndicator color={themeVariables["--color-icon"]} />
292 ) : null}
293 </View>
294 )}
@@ -428,7 +421,7 @@ function OpenDevicePreview({
421 </>
422 ) : (
423 <>
431 - <ActivityIndicator color={themeVariables["--color-icon"]} />
424 + <AppActivityIndicator color={themeVariables["--color-icon"]} />
425 <AppText className="text-sm text-foreground-muted">Connecting to device...</AppText>
426 </>
427 )}
apps/mobile/src/features/devices/DeviceStreamWebView.tsx
+3 -2
@@ -9,10 +9,11 @@ import {
9 useState,
10 type Ref,
11 } from "react";
12 -import { ActivityIndicator, Platform, Pressable, View } from "react-native";
12 +import { Platform, Pressable, View } from "react-native";
13 import { WebView } from "react-native-webview";
14 import type { DeviceStreamStatus } from "@t3tools/client-runtime/device/stream";
15
16 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
17 import { AppText } from "../../components/AppText";
18
19 import {
@@ -187,7 +188,7 @@ function DeviceStreamDocumentView({
188 className="absolute inset-0 items-center justify-center gap-4 px-6"
189 style={{ backgroundColor: background }}
190 >
190 - {status === "connecting" ? <ActivityIndicator colorClassName="accent-icon" /> : null}
191 + {status === "connecting" ? <AppActivityIndicator colorClassName="accent-icon" /> : null}
192 <AppText
193 accessibilityLiveRegion="polite"
194 className="text-center text-sm text-foreground-muted"
apps/mobile/src/features/diagnostics/SettingsDiagnosticsRouteScreen.tsx
+3 -2
@@ -1,8 +1,9 @@
1 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
2 import { ScreenScrollView as ScrollView } from "../../components/ScreenScrollView";
3 import Constants from "expo-constants";
4 import * as Updates from "expo-updates";
5 import { useEffect, useState } from "react";
5 -import { ActivityIndicator, Platform, View } from "react-native";
6 +import { Platform, View } from "react-native";
7 import { useSafeAreaInsets } from "react-native-safe-area-context";
8
9 import { SymbolView } from "../../components/AppSymbol";
@@ -85,7 +86,7 @@ export function SettingsDiagnosticsRouteScreen() {
86 <SettingsSection title="Startup crashes">
87 {state.status === "loading" ? (
88 <View className="items-center gap-3 px-6 py-8">
88 - <ActivityIndicator />
89 + <AppActivityIndicator />
90 <Text className="text-center text-sm text-foreground-muted">Reading crash log…</Text>
91 </View>
92 ) : state.status === "unavailable" ? (
apps/mobile/src/features/files/FilePreviewFeedback.tsx
+3 -2
@@ -1,5 +1,6 @@
1 -import { ActivityIndicator, View } from "react-native";
1 +import { View } from "react-native";
2
3 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
4 import { AppText as Text } from "../../components/AppText";
5 import { cn } from "../../lib/cn";
6
@@ -14,7 +15,7 @@ export function FilePreviewLoading(props: {
15 props.background === "card" ? "bg-card" : "bg-sheet",
16 )}
17 >
17 - <ActivityIndicator />
18 + <AppActivityIndicator />
19 <Text className="text-center text-sm text-foreground-muted">{props.message}</Text>
20 </View>
21 );
apps/mobile/src/features/files/FileTreeBrowser.tsx
+4 -3
@@ -1,8 +1,9 @@
1 import { LegendList } from "@legendapp/list/react-native";
2 import type { ProjectEntry } from "@t3tools/contracts";
3 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
4 import { SymbolView } from "../../components/AppSymbol";
5 import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
5 -import { ActivityIndicator, Platform, Pressable, RefreshControl, View } from "react-native";
6 +import { Platform, Pressable, RefreshControl, View } from "react-native";
7 import { useSafeAreaInsets } from "react-native-safe-area-context";
8
9 import { AppText as Text } from "../../components/AppText";
@@ -96,7 +97,7 @@ const FileTreeRow = memo(function FileTreeRow(props: {
97 {node.name}
98 </Text>
99 {node.kind === "directory" && props.expanded && props.loading ? (
99 - <ActivityIndicator size="small" accessibilityLabel={`Loading ${node.name}`} />
100 + <AppActivityIndicator size="small" accessibilityLabel={`Loading ${node.name}`} />
101 ) : null}
102 </Pressable>
103 );
@@ -296,7 +297,7 @@ export function FileTreeBrowser(props: {
297 </Pressable>
298 </>
299 ) : props.isPending ? (
299 - <ActivityIndicator size="small" />
300 + <AppActivityIndicator size="small" />
301 ) : (
302 <>
303 <Text className="text-sm font-t3-bold text-foreground">No files found</Text>
apps/mobile/src/features/files/WorkspaceFileWebPreview.tsx
+3 -2
@@ -1,7 +1,8 @@
1 import { useState } from "react";
2 -import { ActivityIndicator, View } from "react-native";
2 +import { View } from "react-native";
3 import { WebView } from "react-native-webview";
4
5 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
6 import { AppText as Text } from "../../components/AppText";
7 import { FilePreviewLoading } from "./FilePreviewFeedback";
8 import { LoadingStrip } from "../../components/LoadingStrip";
@@ -46,7 +47,7 @@ export function WorkspaceFileWebPreview(props: { readonly uri: string | null })
47 }}
48 renderLoading={() => (
49 <View className="absolute inset-0 items-center justify-center bg-card">
49 - <ActivityIndicator />
50 + <AppActivityIndicator />
51 </View>
52 )}
53 style={{ flex: 1, backgroundColor: "transparent" }}
apps/mobile/src/features/home/HomeScreen.tsx
+2 -2
@@ -1,3 +1,4 @@
1 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
2 import { useAndroidControlSizing } from "../../components/useAndroidControlSizing";
3 import type { ThreadMoveDestination } from "../threads/threadOrder";
4 import { computeThreadMoveAvailability } from "../threads/threadOrder";
@@ -15,7 +16,6 @@ import { useAtomValue } from "@effect/atom-react";
16 import { useFocusEffect } from "@react-navigation/native";
17 import { use, useCallback, useEffect, useMemo, useRef, useState, type ComponentProps } from "react";
18 import {
18 - ActivityIndicator,
19 Platform,
20 ScrollView,
21 View,
@@ -947,7 +947,7 @@ export function HomeScreen(props: HomeScreenProps) {
947 />
948 {emptyState.loading ? (
949 <View className="mt-4 items-center">
950 - <ActivityIndicator colorClassName="accent-icon-muted" />
950 + <AppActivityIndicator colorClassName="accent-icon-muted" />
951 </View>
952 ) : null}
953 </View>
apps/mobile/src/features/home/WorkspaceConnectionTitle.tsx
+3 -2
@@ -1,7 +1,8 @@
1 import type { NativeStackNavigationOptions } from "@react-navigation/native-stack";
2 import { useEffect, useRef, useState, type ReactNode } from "react";
3 -import { ActivityIndicator, Animated, Platform, Pressable, View } from "react-native";
3 +import { Animated, Platform, Pressable, View } from "react-native";
4
5 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
6 import { SymbolView } from "../../components/AppSymbol";
7 import { AppText as Text } from "../../components/AppText";
8 import { useAndroidControlSizing } from "../../components/useAndroidControlSizing";
@@ -134,7 +135,7 @@ export function WorkspaceConnectionTitle(props: {
135 ]}
136 >
137 {status.showsProgress ? (
137 - <ActivityIndicator
138 + <AppActivityIndicator
139 colorClassName={"accent-icon-muted"}
140 size={Platform.OS === "android" ? Math.round(20 * scale) : "small"}
141 />
apps/mobile/src/features/projects/AddProjectScreen.tsx
+5 -4
@@ -1,3 +1,4 @@
1 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
2 import { MaterialListRow } from "../../components/MaterialListRow";
3 import { SettingsScreen } from "../settings/components/SettingsScreen";
4 import { ScreenScrollView as ScrollView } from "../../components/ScreenScrollView";
@@ -55,7 +56,7 @@ import {
56 import { CommonActions, StackActions, useNavigation } from "@react-navigation/native";
57 import { SymbolView } from "../../components/AppSymbol";
58 import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
58 -import { Platform, ActivityIndicator, Alert, Pressable, View } from "react-native";
59 +import { Platform, Alert, Pressable, View } from "react-native";
60 import { useSafeAreaInsets } from "react-native-safe-area-context";
61 import * as Arr from "effect/Array";
62 import * as Cause from "effect/Cause";
@@ -265,7 +266,7 @@ function PrimaryActionButton(props: {
266 className="h-12 items-center justify-center rounded-full bg-primary active:opacity-70 disabled:opacity-45"
267 >
268 {props.loading ? (
268 - <ActivityIndicator colorClassName={String("accent-primary-foreground")} />
269 + <AppActivityIndicator colorClassName={String("accent-primary-foreground")} />
270 ) : (
271 <Text className="text-base font-t3-bold text-primary-foreground">{props.label}</Text>
272 )}
@@ -665,7 +666,7 @@ export function AddProjectSourceScreen() {
666 )}
667 </ListSection>
668 {discoveryState.isPending ? (
668 - <ActivityIndicator colorClassName="accent-icon-muted" />
669 + <AppActivityIndicator colorClassName="accent-icon-muted" />
670 ) : null}
671 </>
672 ) : null}
@@ -918,7 +919,7 @@ function FolderBrowser(props: {
919 <ListSection>
920 {fileAccess.isPending || (browseState.isPending && browseState.data === null) ? (
921 <View className="items-center py-5">
921 - <ActivityIndicator colorClassName="accent-icon-muted" />
922 + <AppActivityIndicator colorClassName="accent-icon-muted" />
923 </View>
924 ) : null}
925 {browsePath.canBrowseUp ? (
apps/mobile/src/features/review/ReviewSheet.tsx
+2 -2
@@ -1,6 +1,7 @@
1 import type { EnvironmentId, ThreadId } from "@t3tools/contracts";
2 import { formatDiffCount } from "@t3tools/client-runtime/diff-count";
3 import { useNavigation, type StaticScreenProps } from "@react-navigation/native";
4 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
5 import { nativeHeaderScrollEdgeEffects } from "../../native/StackHeader";
6 import { ScreenHeader } from "../../components/ScreenHeader";
7 import type { ScreenHeaderMenuItem } from "../../components/ScreenHeader.types";
@@ -19,7 +20,6 @@ import {
20 useState,
21 } from "react";
22 import {
22 - ActivityIndicator,
23 FlatList,
24 Platform,
25 Pressable,
@@ -855,7 +855,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
855 Platform.OS !== "android" && "border-b border-border bg-card",
856 )}
857 >
858 - <ActivityIndicator size="small" />
858 + <AppActivityIndicator size="small" />
859 <Text className="text-xs text-foreground-muted">Loading diff…</Text>
860 </View>
861 ) : parsedDiff.kind === "empty" ? (
apps/mobile/src/features/settings/SettingsClientStorageRouteScreen.tsx
+3 -2
@@ -1,9 +1,10 @@
1 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
2 import { ScreenScrollView as ScrollView } from "../../components/ScreenScrollView";
3 import { useAtomSet, useAtomValue } from "@effect/atom-react";
4 import { type EnvironmentMachineKind, resolveEnvironmentMachineKind } from "@t3tools/contracts";
5 import { AsyncResult } from "effect/reactivity";
6 import { useMemo } from "react";
6 -import { ActivityIndicator, Alert, Pressable, View } from "react-native";
7 +import { Alert, Pressable, View } from "react-native";
8 import { useSafeAreaInsets } from "react-native-safe-area-context";
9
10 import { AppText as Text } from "../../components/AppText";
@@ -99,7 +100,7 @@ export function SettingsClientStorageRouteScreen() {
100 </View>
101 ) : !summary ? (
102 <View className="items-center gap-3 px-6 py-8">
102 - <ActivityIndicator />
103 + <AppActivityIndicator />
104 <Text className="text-center text-sm text-foreground-muted">
105 Inspecting cached data…
106 </Text>
apps/mobile/src/features/settings/components/SettingsActionRow.tsx
+5 -2
@@ -1,6 +1,7 @@
1 import type { ComponentProps } from "react";
2 -import { ActivityIndicator, Platform, Pressable } from "react-native";
2 +import { Platform, Pressable } from "react-native";
3
4 +import { AppActivityIndicator } from "../../../components/AppActivityIndicator";
5 import { SymbolView } from "../../../components/AppSymbol";
6 import { AppText as Text } from "../../../components/AppText";
7 import { MaterialListRow } from "../../../components/MaterialListRow";
@@ -26,7 +27,9 @@ export function SettingsActionRow(props: {
27 weight="regular"
28 />
29 );
29 - const spinner = props.loading ? <ActivityIndicator colorClassName={iconColorClassName} /> : null;
30 + const spinner = props.loading ? (
31 + <AppActivityIndicator colorClassName={iconColorClassName} />
32 + ) : null;
33
34 if (Platform.OS === "android") {
35 return (
apps/mobile/src/features/settings/components/SettingsLegalDocumentRouteScreen.tsx
+3 -2
@@ -1,8 +1,9 @@
1 import { type NavigationProp, type ParamListBase, useNavigation } from "@react-navigation/native";
2 import { useCallback, useLayoutEffect, useState } from "react";
3 -import { ActivityIndicator, Linking, Pressable, View } from "react-native";
3 +import { Linking, Pressable, View } from "react-native";
4 import { WebView } from "react-native-webview";
5
6 +import { AppActivityIndicator } from "../../../components/AppActivityIndicator";
7 import { AppText as Text } from "../../../components/AppText";
8 import { LoadingStrip } from "../../../components/LoadingStrip";
9 import { SymbolView } from "../../../components/AppSymbol";
@@ -172,7 +173,7 @@ export function SettingsLegalDocumentRouteScreen({
173 }}
174 renderLoading={() => (
175 <View className="absolute inset-0 items-center justify-center bg-sheet">
175 - <ActivityIndicator />
176 + <AppActivityIndicator />
177 </View>
178 )}
179 style={{ flex: 1, backgroundColor: "transparent" }}
apps/mobile/src/features/threads/GitActionProgressOverlay.tsx
+3 -2
@@ -1,8 +1,9 @@
1 import * as Haptics from "expo-haptics";
2 import { GlassView } from "expo-glass-effect";
3 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
4 import { SymbolView } from "../../components/AppSymbol";
5 import { useCallback, useEffect, useRef } from "react";
5 -import { ActivityIndicator, Pressable, StyleSheet, useColorScheme, View } from "react-native";
6 +import { Pressable, StyleSheet, useColorScheme, View } from "react-native";
7 import Animated, { FadeIn, FadeOut, LinearTransition } from "react-native-reanimated";
8 import { useSafeAreaInsets } from "react-native-safe-area-context";
9
@@ -158,7 +159,7 @@ function OverlayContent(props: { readonly progress: GitActionProgress }) {
159 function OverlayIcon(props: { readonly phase: GitActionProgress["phase"] }) {
160 switch (props.phase) {
161 case "running":
161 - return <ActivityIndicator size="small" colorClassName={"accent-icon"} />;
162 + return <AppActivityIndicator size="small" colorClassName={"accent-icon"} />;
163 case "success":
164 return (
165 <View className="h-6 w-6 items-center justify-center rounded-full bg-green-500">
apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx
+4 -11
@@ -1,3 +1,4 @@
1 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
2 import { MaterialListRow } from "../../components/MaterialListRow";
3 import type { EnvironmentProject } from "@t3tools/client-runtime/state/shell";
4 import { shouldCheckoutNewTaskBranch } from "./new-task-context-presentation";
@@ -11,15 +12,7 @@ import {
12 import * as Haptics from "expo-haptics";
13 import { useNavigation } from "@react-navigation/native";
14 import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
14 -import {
15 - ActivityIndicator,
16 - Alert,
17 - Platform,
18 - Pressable,
19 - ScrollView,
20 - TextInput,
21 - View,
22 -} from "react-native";
15 +import { Alert, Platform, Pressable, ScrollView, TextInput, View } from "react-native";
16 import { useSafeAreaInsets } from "react-native-safe-area-context";
17
18 import { AndroidScreenHeader } from "../../components/AndroidScreenHeader";
@@ -486,7 +479,7 @@ export function BranchPickerScreen(props: {
479 : 0,
480 }}
481 >
489 - {props.loading ? <ActivityIndicator /> : null}
482 + {props.loading ? <AppActivityIndicator /> : null}
483 <Text className="text-center text-sm text-foreground-muted">
484 {props.loading
485 ? "Loading branches…"
@@ -525,7 +518,7 @@ export function BranchPickerScreen(props: {
518 ListFooterComponent={
519 props.refreshing ? (
520 <View className="items-center py-4">
528 - <ActivityIndicator />
521 + <AppActivityIndicator />
522 </View>
523 ) : null
524 }
apps/mobile/src/features/threads/NewTaskRouteScreen.tsx
+3 -2
@@ -1,3 +1,4 @@
1 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
2 import { MaterialListRow } from "../../components/MaterialListRow";
3 import { ScreenHeader } from "../../components/ScreenHeader";
4 import {
@@ -15,7 +16,7 @@ import {
16 } from "@t3tools/client-runtime/state/runtime";
17 import type { EnvironmentProject } from "@t3tools/client-runtime/state/shell";
18 import { useEffect, useRef, useState } from "react";
18 -import { ActivityIndicator, Alert, Platform, Pressable, View } from "react-native";
19 +import { Alert, Platform, Pressable, View } from "react-native";
20 import { useSafeAreaInsets } from "react-native-safe-area-context";
21 import { cn } from "../../lib/cn";
22 import { MaterialScreenContent } from "../../components/MaterialScreenContent";
@@ -369,7 +370,7 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
370 )}
371 >
372 {projectEmptyState.loading ? (
372 - <ActivityIndicator colorClassName="accent-icon-muted" />
373 + <AppActivityIndicator colorClassName="accent-icon-muted" />
374 ) : null}
375 <Text className="text-center text-lg font-t3-bold text-foreground">
376 {projectEmptyState.title}
apps/mobile/src/features/threads/ThreadFeed.tsx
+5 -5
@@ -1,6 +1,7 @@
1 import { ThreadContextDivider } from "./thread-context-divider";
2 import { ThreadHandoffRow } from "./thread-handoff-row";
3 import { SecretRequestCard } from "./SecretRequestCard";
4 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
5 import {
6 WorktreeWorkingHeader,
7 WorktreeSetupCard,
@@ -79,7 +80,6 @@ import {
80 type PartialMarkdownTheme,
81 } from "react-native-nitro-markdown";
82 import {
82 - ActivityIndicator,
83 Alert,
84 Image,
85 Platform,
@@ -378,7 +378,7 @@ function AssistantForkButton(props: {
378 className="h-7 w-7 items-center justify-center disabled:opacity-40"
379 >
380 {busy ? (
381 - <ActivityIndicator size="small" />
381 + <AppActivityIndicator size="small" />
382 ) : (
383 <SymbolView
384 name="arrow.triangle.branch"
@@ -416,7 +416,7 @@ function MessageAttachmentImage(props: {
416 if (uri === null) {
417 return (
418 <View className={`${props.className} items-center justify-center`}>
419 - <ActivityIndicator />
419 + <AppActivityIndicator />
420 </View>
421 );
422 }
@@ -630,7 +630,7 @@ function MessageAttachmentFile(props: {
630 >
631 <View className="h-12 w-10 shrink-0 items-center justify-center rounded-lg bg-subtle">
632 {opening ? (
633 - <ActivityIndicator size="small" />
633 + <AppActivityIndicator size="small" />
634 ) : (
635 <PierreEntryIcon path={attachment.name} kind="file" size={26} />
636 )}
@@ -3310,7 +3310,7 @@ function ThreadFeedLoadEarlierControl(props: ThreadFeedHistoryControls) {
3310 className="min-h-9 flex-row items-center justify-center gap-2 rounded-full border border-border/60 bg-surface/80 px-4 py-2 disabled:opacity-50"
3311 >
3312 {props.loading ? (
3313 - <ActivityIndicator size="small" color={accentColor} />
3313 + <AppActivityIndicator size="small" color={accentColor} />
3314 ) : (
3315 <SymbolView name="chevron.up" size={12} tintColor={accentColor} type="monochrome" />
3316 )}
apps/mobile/src/features/threads/ThreadMarkdownImage.tsx
+3 -9
@@ -1,14 +1,8 @@
1 import type { AssetResource, EnvironmentId } from "@t3tools/contracts";
2 import { createContext, useContext, useEffect, useId, useState } from "react";
3 -import {
4 - ActivityIndicator,
5 - Image,
6 - Pressable,
7 - StyleSheet,
8 - View,
9 - type ViewStyle,
10 -} from "react-native";
3 +import { Image, Pressable, StyleSheet, View, type ViewStyle } from "react-native";
4
5 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
6 import { AppText as Text } from "../../components/AppText";
7 import type { FilePreviewSource } from "../../components/FilePreviewModal";
8 import { MediaActionsMenu } from "../../components/MediaActionsMenu";
@@ -96,7 +90,7 @@ export function ThreadMarkdownImageView(props: {
90 {failed ? (
91 <Text className="text-xs text-foreground-muted">Image unavailable</Text>
92 ) : (
99 - <ActivityIndicator />
93 + <AppActivityIndicator />
94 )}
95 </Pressable>
96 </MediaActionsMenu>
apps/mobile/src/features/threads/floating-working-control.tsx
+3 -3
@@ -3,7 +3,6 @@ import { formatDuration } from "@t3tools/shared/orchestrationTiming";
3 import { GlassContainer, GlassView } from "expo-glass-effect";
4 import { type ReactNode, useEffect, useRef, useState } from "react";
5 import {
6 - ActivityIndicator,
6 type LayoutChangeEvent,
7 Pressable,
8 Text as SystemText,
@@ -22,6 +21,7 @@ import Animated, {
21 } from "react-native-reanimated";
22 import { withUniwind } from "uniwind";
23
24 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
25 import { AppText as Text } from "../../components/AppText";
26 import { SymbolView } from "../../components/AppSymbol";
27 import { ControlPill } from "../../components/ControlPill";
@@ -364,7 +364,7 @@ function FloatingStatusLabel(props: {
364 className="gap-2"
365 onLayout={props.onLayout}
366 >
367 - <ActivityIndicator size="small" colorClassName="accent-icon-muted" />
367 + <AppActivityIndicator size="small" colorClassName="accent-icon-muted" />
368 <Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
369 {props.status.label}
370 </Text>
@@ -402,7 +402,7 @@ function FloatingStatusLabel(props: {
402 onPress={props.status.onPress}
403 >
404 {props.status.tone === "reconnecting" ? (
405 - <ActivityIndicator size="small" colorClassName="accent-icon-muted" />
405 + <AppActivityIndicator size="small" colorClassName="accent-icon-muted" />
406 ) : (
407 <View className="h-2 w-2 rounded-full bg-red-500" />
408 )}
apps/mobile/src/features/threads/worktree-setup-card.tsx
+10 -5
@@ -6,8 +6,9 @@ import {
6 import { worktreeSetupAgentStarted } from "@t3tools/client-runtime/worktree-setup";
7 import { formatDuration } from "@t3tools/shared/orchestrationTiming";
8 import { useEffect, useState } from "react";
9 -import { ActivityIndicator, AppState, Pressable, ScrollView, View } from "react-native";
9 +import { AppState, Platform, Pressable, ScrollView, View } from "react-native";
10 import { useSafeAreaInsets } from "react-native-safe-area-context";
11 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
12 import { AppText as Text } from "../../components/AppText";
13 import { SymbolView, type AppSymbolName } from "../../components/AppSymbol";
14 import { WorktreeSetupSheet } from "./worktree-setup-sheet";
@@ -97,10 +98,14 @@ export function WorktreeSetupCard(props: WorktreeSetupCardProps) {
98 }
99 >
100 {backgroundSetup ? (
100 - <ActivityIndicator
101 - size="small"
101 + <AppActivityIndicator
102 + size={Platform.OS === "android" ? 12 : "small"}
103 colorClassName="accent-icon-muted"
103 - style={{ width: 12, height: 12, transform: [{ scale: 0.65 }] }}
104 + style={{
105 + width: 12,
106 + height: 12,
107 + transform: Platform.OS === "android" ? undefined : [{ scale: 0.65 }],
108 + }}
109 />
110 ) : failed ? (
111 <SymbolView
@@ -302,7 +307,7 @@ function StageRow({
307 >
308 <View className="w-6 items-center">
309 {stage.status === "running" && animate ? (
305 - <ActivityIndicator
310 + <AppActivityIndicator
311 size="small"
312 colorClassName="accent-icon-muted"
313 style={{ transform: [{ scale: 0.75 }] }}
apps/mobile/src/features/voice-input/ComposerDictationControl.tsx
+2 -2
@@ -1,7 +1,6 @@
1 import type { VoiceInputPhase, VoiceInputState } from "@t3tools/client-runtime/voice-input";
2 import { memo, useCallback, useLayoutEffect, useState, type ReactNode } from "react";
3 import {
4 - ActivityIndicator,
4 Linking,
5 Platform,
6 Pressable,
@@ -20,6 +19,7 @@ import Animated, {
19 type SharedValue,
20 } from "react-native-reanimated";
21
22 +import { AppActivityIndicator } from "../../components/AppActivityIndicator";
23 import { AppText as Text } from "../../components/AppText";
24 import { SymbolView, type AppSymbolName } from "../../components/AppSymbol";
25 import { cn } from "../../lib/cn";
@@ -304,7 +304,7 @@ function VoiceActionButton(props: {
304 ) : null}
305 <View className="absolute inset-0 items-center justify-center">
306 {props.loading ? (
307 - <ActivityIndicator size="small" colorClassName="accent-icon-muted" />
307 + <AppActivityIndicator size="small" colorClassName="accent-icon-muted" />
308 ) : (
309 <SymbolView
310 name={props.icon}