@devries-cameron20 / t3code Mirror · read-only / commits / 843cf176ea
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 24, 21:30 UTC

fix(mobile): embed fonts and render project favicons reliably (#3823)

Co-authored-by: codex <codex@users.noreply.github.com>

Julius Marminge committed Jul 9, 2026 at 04:49 UTC 843cf176eae729838b6a2cc8c68cbdadda667d95
64 files changed +444 -837
apps/mobile/app.config.ts
+34 -1
@@ -63,6 +63,16 @@ function resolveAppVariant(value: string | undefined): AppVariant {
63
64 const variant = VARIANT_CONFIG[APP_VARIANT];
65
66 +const dmSansFonts = {
67 + regular: "@expo-google-fonts/dm-sans/400Regular/DMSans_400Regular.ttf",
68 + medium: "@expo-google-fonts/dm-sans/500Medium/DMSans_500Medium.ttf",
69 + bold: "@expo-google-fonts/dm-sans/700Bold/DMSans_700Bold.ttf",
70 +} as const;
71 +
72 +// These aliases match the fonts' PostScript names on iOS. Register the same
73 +// names on Android so React Native and the native composer use one set of
74 +// family names without waiting for runtime font loading.
75 +
76 const config: ExpoConfig = {
77 name: variant.appName,
78 slug: "t3-code",
@@ -121,7 +131,30 @@ const config: ExpoConfig = {
131 favicon: "./assets/favicon.png",
132 },
133 plugins: [
124 - "expo-font",
134 + [
135 + "expo-font",
136 + {
137 + ios: {
138 + fonts: [dmSansFonts.regular, dmSansFonts.medium, dmSansFonts.bold],
139 + },
140 + android: {
141 + fonts: [
142 + {
143 + fontFamily: "DMSans-Regular",
144 + fontDefinitions: [{ path: dmSansFonts.regular, weight: 400 }],
145 + },
146 + {
147 + fontFamily: "DMSans-Medium",
148 + fontDefinitions: [{ path: dmSansFonts.medium, weight: 500 }],
149 + },
150 + {
151 + fontFamily: "DMSans-Bold",
152 + fontDefinitions: [{ path: dmSansFonts.bold, weight: 700 }],
153 + },
154 + ],
155 + },
156 + },
157 + ],
158 "expo-secure-store",
159 "expo-sqlite",
160 ["@clerk/expo", { theme: "./clerk-theme.json" }],
apps/mobile/global.css
+9 -6
@@ -51,6 +51,7 @@
51 /* Inputs */
52 --color-input: #ffffff;
53 --color-input-border: rgba(0, 0, 0, 0.1);
54 + --color-sidebar-search: rgba(118, 118, 128, 0.12);
55 --color-placeholder: #a3a3a3;
56
57 /* Icons */
@@ -144,6 +145,7 @@
145 /* Inputs */
146 --color-input: #141414;
147 --color-input-border: rgba(255, 255, 255, 0.08);
148 + --color-sidebar-search: rgba(118, 118, 128, 0.24);
149 --color-placeholder: #8e8e93;
150
151 /* Icons */
@@ -194,9 +196,10 @@
196
197 /* ─── Typography ────────────────────────────────────────────────────── */
198 @theme {
197 - --font-sans: "DMSans_400Regular";
198 - --font-medium: "DMSans_500Medium";
199 - --font-bold: "DMSans_700Bold";
199 + /* Keep these native family names aligned with app.config.ts. */
200 + --font-sans: "DMSans-Regular";
201 + --font-medium: "DMSans-Medium";
202 + --font-bold: "DMSans-Bold";
203
204 /* Keep this scale aligned with src/lib/typography.ts for native style props. */
205 --text-3xs: 11px;
@@ -221,14 +224,14 @@
224
225 /* ─── Custom utilities ──────────────────────────────────────────────── */
226 @utility font-t3-medium {
224 - font-family: "DMSans_500Medium";
227 + font-family: var(--font-medium);
228 }
229
230 @utility font-t3-bold {
228 - font-family: "DMSans_700Bold";
231 + font-family: var(--font-bold);
232 }
233
234 @utility font-t3-extrabold {
232 - font-family: "DMSans_700Bold";
235 + font-family: var(--font-bold);
236 font-weight: 800;
237 }
apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift
+2 -2
@@ -300,7 +300,7 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate {
300 skillText: "#a21caf",
301 fileTint: "#737373"
302 )
303 - private var fontFamily = "DMSans_400Regular"
303 + private var fontFamily = "DMSans-Regular"
304 private var fontSize: CGFloat = 14
305 private var lineHeight: CGFloat = 20
306 private var contentInsetVertical: CGFloat = 0
@@ -608,7 +608,7 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate {
608 iconImage: UIImage?,
609 style: ComposerChipStyle
610 ) -> UIImage {
611 - let font = UIFont(name: "DMSans_500Medium", size: max(12, fontSize - 2))
611 + let font = UIFont(name: "DMSans-Medium", size: max(12, fontSize - 2))
612 ?? UIFont.systemFont(ofSize: max(12, fontSize - 2), weight: .medium)
613 let fallbackIcon = UIImage(
614 systemName: iconName,
apps/mobile/package.json
+2 -1
@@ -6,7 +6,7 @@
6 "scripts": {
7 "dev": "expo start --clear",
8 "dev:client": "APP_VARIANT=development expo start --dev-client --scheme t3code-dev --clear",
9 - "dev:client:preview": "eas env:exec preview 'EXPO_NO_DOTENV=1 APP_VARIANT=preview expo start --dev-client --scheme t3code-preview --clear'",
9 + "dev:client:preview": "eas env:exec preview 'EXPO_NO_DOTENV=1 APP_VARIANT=preview expo start --dev-client --scheme t3code-preview --clear --lan'",
10 "start": "expo start",
11 "start:dev": "APP_VARIANT=development expo start",
12 "start:preview": "APP_VARIANT=preview expo start",
@@ -80,6 +80,7 @@
80 "expo-font": "~56.0.7",
81 "expo-glass-effect": "~56.0.4",
82 "expo-haptics": "~56.0.3",
83 + "expo-image": "~56.0.11",
84 "expo-image-picker": "~56.0.18",
85 "expo-linking": "~56.0.14",
86 "expo-network": "~56.0.5",
apps/mobile/src/App.tsx
+3 -14
@@ -1,11 +1,6 @@
1 -import {
2 - DMSans_400Regular,
3 - DMSans_500Medium,
4 - DMSans_700Bold,
5 - useFonts,
6 -} from "@expo-google-fonts/dm-sans";
1 import * as Linking from "expo-linking";
2 import * as SplashScreen from "expo-splash-screen";
3 +import { useEffect } from "react";
4 import { StatusBar, useColorScheme } from "react-native";
5 import { GestureHandlerRootView } from "react-native-gesture-handler";
6 import { KeyboardProvider } from "react-native-keyboard-controller";
@@ -13,7 +8,6 @@ import { SafeAreaProvider } from "react-native-safe-area-context";
8 import { createStaticNavigation, DarkTheme, DefaultTheme } from "@react-navigation/native";
9
10 import { RegistryContext } from "@effect/atom-react";
16 -import { useEffect } from "react";
11 import { CloudAuthProvider } from "./features/cloud/CloudAuthProvider";
12 import { AppearancePreferencesProvider } from "./features/settings/appearance/AppearancePreferencesProvider";
13 import { RootStack } from "./Stack";
@@ -29,17 +23,12 @@ const appLinking = {
23 const Navigation = createStaticNavigation(RootStack);
24
25 export default function App() {
32 - const [fontsLoaded] = useFonts({
33 - DMSans_400Regular,
34 - DMSans_500Medium,
35 - DMSans_700Bold,
36 - });
26 const colorScheme = useColorScheme();
27 const statusBarBg = useThemeColor("--color-status-bar");
28
29 useEffect(() => {
41 - if (fontsLoaded) SplashScreen.hide();
42 - }, [fontsLoaded]);
30 + SplashScreen.hide();
31 + }, []);
32
33 return (
34 <RegistryContext.Provider value={appAtomRegistry}>
apps/mobile/src/components/AppText.tsx
+3 -11
@@ -4,7 +4,6 @@ import {
4 type TextInputProps as RNTextInputProps,
5 type TextProps as RNTextProps,
6 } from "react-native";
7 -import { useThemeColor } from "../lib/useThemeColor";
7
8 import { cn } from "../lib/cn";
9
@@ -18,7 +17,7 @@ export function AppText({ className, ...props }: AppTextProps) {
17 return <RNText className={cn("font-sans text-foreground", className)} {...props} />;
18 }
19
21 -export type AppTextInputProps = RNTextInputProps & {
20 +export type AppTextInputProps = Omit<RNTextInputProps, "placeholderTextColor"> & {
21 readonly className?: string;
22 readonly ref?: React.Ref<RNTextInput>;
23 };
@@ -27,14 +26,7 @@ export type AppTextInputProps = RNTextInputProps & {
26 * Thin wrapper around RN TextInput with default input styling.
27 * Uses Uniwind className — no manual style parsing.
28 */
30 -export function AppTextInput({
31 - className,
32 - placeholderTextColor,
33 - ref,
34 - ...props
35 -}: AppTextInputProps) {
36 - const placeholderColor = useThemeColor("--color-placeholder");
37 -
29 +export function AppTextInput({ className, ref, ...props }: AppTextInputProps) {
30 return (
31 <RNTextInput
32 ref={ref}
@@ -42,7 +34,7 @@ export function AppTextInput({
34 "min-h-13.5 rounded-2xl border border-input-border bg-input px-3.5 py-3 font-sans text-base text-foreground",
35 className,
36 )}
45 - placeholderTextColor={placeholderTextColor ?? placeholderColor}
37 + placeholderTextColorClassName="accent-placeholder"
38 {...props}
39 />
40 );
apps/mobile/src/components/BrandMark.tsx
+2 -7
@@ -22,14 +22,9 @@ export function BrandMark(props: { readonly compact?: boolean; readonly stageLab
22 />
23 <View className="gap-1">
24 <View className="flex-row items-center gap-2">
25 - <Text className="text-lg font-t3-bold text-foreground" style={{ letterSpacing: -0.4 }}>
26 - T3 Code
27 - </Text>
25 + <Text className="text-lg font-t3-bold tracking-[-0.4px] text-foreground">T3 Code</Text>
26 <View className="rounded-full bg-subtle px-2 py-1">
29 - <Text
30 - className="text-3xs font-t3-bold uppercase text-foreground-muted"
31 - style={{ letterSpacing: 1.1 }}
32 - >
27 + <Text className="text-3xs font-t3-bold tracking-[1.1px] uppercase text-foreground-muted">
28 {stageLabel}
29 </Text>
30 </View>
apps/mobile/src/components/ComposerAttachmentStrip.tsx
+4 -10
@@ -39,14 +39,14 @@ export function ComposerAttachmentStrip(props: ComposerAttachmentStripProps) {
39 horizontal
40 showsHorizontalScrollIndicator={false}
41 keyboardShouldPersistTaps="always"
42 - style={{ flexGrow: 0 }}
42 + className="grow-0"
43 >
44 - <View style={{ flexDirection: "row", gap: 10 }}>
44 + <View className="flex-row gap-2.5">
45 {props.attachments.map((image) => (
46 <View
47 key={image.id}
48 + className="relative"
49 style={{
49 - position: "relative",
50 paddingTop: removeButtonGutter,
51 paddingRight: removeButtonGutter,
52 }}
@@ -66,16 +66,10 @@ export function ComposerAttachmentStrip(props: ComposerAttachmentStripProps) {
66 />
67 </Pressable>
68 <Pressable
69 + className="absolute h-[22px] w-[22px] items-center justify-center rounded-[11px] bg-black/55"
70 style={{
70 - position: "absolute",
71 top: removeButtonPlacement === "gutter" ? 0 : 4,
72 right: removeButtonPlacement === "gutter" ? 0 : 4,
73 - width: 22,
74 - height: 22,
75 - borderRadius: 11,
76 - backgroundColor: "rgba(0,0,0,0.55)",
77 - alignItems: "center",
78 - justifyContent: "center",
73 }}
74 hitSlop={6}
75 onPress={() => props.onRemove(image.id)}
apps/mobile/src/components/ComposerToolbarTrigger.tsx
+2 -4
@@ -31,11 +31,9 @@ export function ComposerToolbarRow(props: {
31 }) {
32 return (
33 <View
34 + className="flex-row items-center gap-1.5"
35 style={[
36 {
36 - alignItems: "center",
37 - flexDirection: "row",
38 - gap: 6,
37 paddingBottom: props.paddingBottom ?? 8,
38 paddingHorizontal: props.paddingHorizontal ?? 6,
39 paddingTop: props.paddingTop ?? 8,
@@ -89,7 +87,7 @@ export function ComposerToolbarScroller(props: {
87 }, []);
88
89 return (
92 - <View className="min-w-0 flex-1" style={{ position: "relative" }}>
90 + <View className="relative min-w-0 flex-1">
91 <ScrollView
92 horizontal
93 keyboardShouldPersistTaps="always"
apps/mobile/src/components/GlassSafeAreaView.tsx
+5 -15
@@ -39,22 +39,12 @@ export function GlassSafeAreaView({
39 style={{ borderRadius: 0, backgroundColor: "transparent" }}
40 >
41 <View
42 - style={{
43 - flexDirection: "row",
44 - alignItems: "center",
45 - paddingHorizontal: 20,
46 - paddingTop: headerPaddingTop,
47 - paddingBottom: 16,
48 - gap: 10,
49 - }}
42 + className="flex-row items-center gap-2.5 px-5 pb-4"
43 + style={{ paddingTop: headerPaddingTop }}
44 >
51 - <View style={{ alignItems: "flex-start", justifyContent: "center" }}>{leftSlot}</View>
52 - <View
53 - style={{ flex: 1, alignItems: "center", justifyContent: "center", overflow: "hidden" }}
54 - >
55 - {centerSlot}
56 - </View>
57 - <View style={{ alignItems: "flex-end", justifyContent: "center" }}>{rightSlot}</View>
45 + <View className="items-start justify-center">{leftSlot}</View>
46 + <View className="flex-1 items-center justify-center overflow-hidden">{centerSlot}</View>
47 + <View className="items-end justify-center">{rightSlot}</View>
48 </View>
49 </GlassSurface>
50 </View>
apps/mobile/src/components/GlassSurface.tsx
+1 -1
@@ -10,7 +10,7 @@ import {
10 } from "react-native";
11 import { useThemeColor } from "../lib/useThemeColor";
12
13 -export interface GlassSurfaceProps extends ViewProps {
13 +export interface GlassSurfaceProps extends Omit<ViewProps, "className"> {
14 readonly children: ReactNode;
15 readonly glassEffectStyle?: "clear" | "regular" | "none";
16 readonly tintColor?: ColorValue;
apps/mobile/src/components/ProjectFavicon.tsx
+3 -2
@@ -1,6 +1,7 @@
1 import { SymbolView } from "expo-symbols";
2 +import { Image } from "expo-image";
3 import { useState } from "react";
3 -import { Image, View } from "react-native";
4 +import { View } from "react-native";
5 import type { EnvironmentId } from "@t3tools/contracts";
6 import { useThemeColor } from "../lib/useThemeColor";
7 import { useAssetUrl } from "../state/assets";
@@ -78,7 +79,7 @@ function ProjectFaviconImage(props: {
79 borderRadius: props.size * 0.16,
80 ...(showImage ? {} : { position: "absolute" as const, opacity: 0 }),
81 }}
81 - resizeMode="contain"
82 + contentFit="contain"
83 onLoad={() => {
84 if (props.faviconUrl) loadedFaviconUrls.add(props.faviconUrl);
85 setStatus("loaded");
apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx
+3 -8
@@ -244,9 +244,8 @@ function ProjectGroupLabel(props: {
244 workspaceRoot={props.project.workspaceRoot}
245 />
246 <Text
247 - className="flex-1 text-xs font-t3-medium uppercase text-foreground-muted"
247 + className="flex-1 text-xs font-t3-medium tracking-[0.5px] uppercase text-foreground-muted"
248 numberOfLines={1}
249 - style={{ letterSpacing: 0.5 }}
249 >
250 {props.project.title}
251 </Text>
@@ -331,10 +330,7 @@ function ArchivedThreadRow(props: {
330 >
331 {props.thread.title}
332 </Text>
334 - <Text
335 - className="text-xs text-foreground-tertiary"
336 - style={{ fontVariant: ["tabular-nums"], minWidth: 30, textAlign: "right" }}
337 - >
333 + <Text className="min-w-[30px] text-right text-xs tabular-nums text-foreground-tertiary">
334 {timestamp}
335 </Text>
336 </View>
@@ -347,9 +343,8 @@ function ArchivedThreadRow(props: {
343 type="monochrome"
344 />
345 <Text
350 - className="min-w-0 flex-1 text-2xs text-foreground-tertiary"
346 + className="min-w-0 flex-1 font-mono text-2xs text-foreground-tertiary"
347 numberOfLines={1}
352 - style={{ fontFamily: "monospace" }}
348 >
349 {subtitle.join(" · ")}
350 </Text>
apps/mobile/src/features/cloud/CloudWaitlistEnrollment.tsx
+15 -70
@@ -1,13 +1,12 @@
1 import { useWaitlist } from "@clerk/expo";
2 -import { ActivityIndicator, Pressable, StyleSheet, Text, TextInput, View } from "react-native";
2 +import { ActivityIndicator, Pressable, Text, TextInput, View } from "react-native";
3 import { useState } from "react";
4
5 -import { useThemeColor } from "../../lib/useThemeColor";
5 +import { cn } from "../../lib/cn";
6 import { CloudWaitlistJoinRejectedError, joinCloudWaitlist } from "./cloudWaitlistJoin";
7
8 export function CloudWaitlistEnrollment(props: { readonly onSignIn: () => void }) {
9 const { errors, fetchStatus, waitlist } = useWaitlist();
10 - const colors = useCloudWaitlistColors();
10 const [emailAddress, setEmailAddress] = useState("");
11 const [requestError, setRequestError] = useState<string | null>(null);
12 const isSubmitting = fetchStatus === "fetching";
@@ -34,7 +33,7 @@ export function CloudWaitlistEnrollment(props: { readonly onSignIn: () => void }
33
34 if (waitlist.id) {
35 return (
37 - <View style={styles.content}>
36 + <View className="gap-[18px]">
37 <Text className="text-center font-t3-bold text-xl text-foreground">
38 You are on the waitlist
39 </Text>
@@ -47,19 +46,22 @@ export function CloudWaitlistEnrollment(props: { readonly onSignIn: () => void }
46 }
47
48 return (
50 - <View style={styles.content}>
49 + <View className="gap-[18px]">
50 <Text className="font-sans text-base text-foreground-secondary">
51 Enter your email and we will let you know when access is ready.
52 </Text>
53
55 - <View style={styles.field}>
54 + <View className="gap-2">
55 <Text className="font-t3-bold text-sm text-foreground-secondary">Email address</Text>
56 <TextInput
57 accessibilityLabel="Email address"
58 autoCapitalize="none"
59 autoComplete="email"
60 autoCorrect={false}
62 - className="font-sans text-lg text-foreground"
61 + className={cn(
62 + "min-h-[54px] rounded-2xl border border-input-border bg-input px-4 py-3.5 font-sans text-lg text-foreground border-continuous",
63 + (fieldError || requestError) && "border-danger-foreground",
64 + )}
65 keyboardType="email-address"
66 onChangeText={(value) => {
67 setEmailAddress(value);
@@ -67,16 +69,8 @@ export function CloudWaitlistEnrollment(props: { readonly onSignIn: () => void }
69 }}
70 onSubmitEditing={() => void joinWaitlist()}
71 placeholder="Enter your email address"
70 - placeholderTextColor={colors.placeholder}
72 + placeholderTextColorClassName="accent-placeholder"
73 returnKeyType="join"
72 - style={[
73 - styles.input,
74 - {
75 - backgroundColor: colors.input,
76 - borderColor:
77 - fieldError || requestError ? colors.dangerForeground : colors.inputBorder,
78 - },
79 - ]}
74 textContentType="emailAddress"
75 value={emailAddress}
76 />
@@ -99,15 +93,11 @@ export function CloudWaitlistEnrollment(props: { readonly onSignIn: () => void }
93 }}
94 disabled={isSubmitting || emailAddress.trim().length === 0}
95 onPress={() => void joinWaitlist()}
102 - style={[
103 - styles.primaryButton,
104 - {
105 - backgroundColor: colors.primary,
106 - opacity: isSubmitting || emailAddress.trim().length === 0 ? 0.45 : 1,
107 - },
108 - ]}
96 + className="min-h-[54px] flex-row items-center justify-center gap-2 rounded-full bg-primary px-5 py-3 disabled:opacity-[0.45]"
97 >
110 - {isSubmitting ? <ActivityIndicator color={colors.primaryForeground} size="small" /> : null}
98 + {isSubmitting ? (
99 + <ActivityIndicator colorClassName="accent-primary-foreground" size="small" />
100 + ) : null}
101 <Text className="font-t3-bold text-base text-primary-foreground">
102 {isSubmitting ? "Joining" : "Join the waitlist"}
103 </Text>
@@ -120,7 +110,7 @@ export function CloudWaitlistEnrollment(props: { readonly onSignIn: () => void }
110
111 function SignInAction(props: { readonly onPress: () => void }) {
112 return (
123 - <View style={styles.signInRow}>
113 + <View className="flex-row items-center justify-center gap-1 pt-1">
114 <Text className="font-sans text-base text-foreground-secondary">Already have access?</Text>
115 <Pressable accessibilityRole="button" hitSlop={8} onPress={props.onPress}>
116 <Text className="font-t3-bold text-base text-foreground">Sign in</Text>
@@ -128,48 +118,3 @@ function SignInAction(props: { readonly onPress: () => void }) {
118 </View>
119 );
120 }
131 -
132 -function useCloudWaitlistColors() {
133 - return {
134 - dangerForeground: String(useThemeColor("--color-danger-foreground")),
135 - input: String(useThemeColor("--color-input")),
136 - inputBorder: String(useThemeColor("--color-input-border")),
137 - placeholder: String(useThemeColor("--color-placeholder")),
138 - primary: String(useThemeColor("--color-primary")),
139 - primaryForeground: String(useThemeColor("--color-primary-foreground")),
140 - };
141 -}
142 -
143 -const styles = StyleSheet.create({
144 - content: {
145 - gap: 18,
146 - },
147 - field: {
148 - gap: 8,
149 - },
150 - input: {
151 - borderCurve: "continuous",
152 - borderRadius: 16,
153 - borderWidth: 1,
154 - minHeight: 54,
155 - paddingHorizontal: 16,
156 - paddingVertical: 14,
157 - },
158 - primaryButton: {
159 - alignItems: "center",
160 - borderRadius: 999,
161 - flexDirection: "row",
162 - gap: 8,
163 - justifyContent: "center",
164 - minHeight: 54,
165 - paddingHorizontal: 20,
166 - paddingVertical: 12,
167 - },
168 - signInRow: {
169 - alignItems: "center",
170 - flexDirection: "row",
171 - gap: 4,
172 - justifyContent: "center",
173 - paddingTop: 4,
174 - },
175 -});
apps/mobile/src/features/cloud/ConnectOnboardingRouteScreen.tsx
+1 -1
@@ -88,7 +88,7 @@ function ConfiguredConnectOnboardingRouteScreen() {
88 alwaysBounceVertical
89 contentInsetAdjustmentBehavior="automatic"
90 showsVerticalScrollIndicator={false}
91 - style={{ flex: 1 }}
91 + className="flex-1"
92 contentInset={{ bottom: Math.max(insets.bottom, 18) + 18 }}
93 contentContainerStyle={{
94 gap: 16,
apps/mobile/src/features/connection/CloudEnvironmentRows.tsx
+2 -4
@@ -297,9 +297,8 @@ function CloudEnvironmentRowShell(props: {
297 {props.connectionError ? (
298 <Text
299 aria-hidden
300 - className={cn("absolute left-0 right-0 text-xs", statusClassName)}
300 onTextLayout={onMeasuredErrorTextLayout}
302 - style={{ opacity: 0, zIndex: -1 }}
301 + className={cn("absolute inset-x-0 -z-[1] text-xs opacity-0", statusClassName)}
302 >
303 {measuredErrorText}
304 </Text>
@@ -321,7 +320,7 @@ function CloudEnvironmentRowShell(props: {
320 <Text
321 accessibilityHint="Copies the trace ID"
322 accessibilityRole="button"
324 - className={cn("text-xs underline", statusClassName)}
323 + className={cn("text-xs underline decoration-dotted", statusClassName)}
324 onLongPress={(event) => {
325 event.stopPropagation();
326 copyTextWithHaptic(errorTraceId, { target: "connection-trace-id" });
@@ -329,7 +328,6 @@ function CloudEnvironmentRowShell(props: {
328 onPress={(event) => {
329 event.stopPropagation();
330 }}
332 - style={{ textDecorationStyle: "dotted" }}
331 >
332 {errorTraceId}
333 </Text>
apps/mobile/src/features/connection/ConnectionEnvironmentRow.tsx
+4 -17
@@ -38,7 +38,6 @@ export function ConnectionEnvironmentRow(props: {
38 const [url, setUrl] = useState(props.environment.displayUrl);
39
40 const mutedColor = useThemeColor("--color-icon-subtle");
41 - const placeholderColor = useThemeColor("--color-placeholder");
41 const primaryFg = useThemeColor("--color-primary-foreground");
42 const dangerFg = useThemeColor("--color-danger-foreground");
43 const statusLabel = connectionStatusLabel(props.environment);
@@ -98,7 +97,7 @@ export function ConnectionEnvironmentRow(props: {
97 <Text
98 accessibilityHint="Copies the trace ID"
99 accessibilityRole="button"
101 - className="underline"
100 + className="underline decoration-dotted"
101 onLongPress={(event) => {
102 event.stopPropagation();
103 copyTextWithHaptic(statusTraceId, { target: "connection-trace-id" });
@@ -106,7 +105,6 @@ export function ConnectionEnvironmentRow(props: {
105 onPress={(event) => {
106 event.stopPropagation();
107 }}
109 - style={{ textDecorationStyle: "dotted" }}
108 >
109 {statusTraceId}
110 </Text>
@@ -140,17 +138,13 @@ export function ConnectionEnvironmentRow(props: {
138 ) : (
139 <>
140 <View className="gap-1.5">
143 - <Text
144 - className="text-2xs font-t3-bold uppercase text-foreground-muted"
145 - style={{ letterSpacing: 0.8 }}
146 - >
141 + <Text className="text-2xs font-t3-bold tracking-[0.8px] uppercase text-foreground-muted">
142 Label
143 </Text>
144 <TextInput
145 autoCapitalize="words"
146 autoCorrect={false}
147 placeholder="My MacBook"
153 - placeholderTextColor={placeholderColor}
148 value={label}
149 onChangeText={setLabel}
150 className="rounded-[14px] border border-input-border bg-input px-4 py-3 text-base text-foreground"
@@ -158,10 +152,7 @@ export function ConnectionEnvironmentRow(props: {
152 </View>
153
154 <View className="gap-1.5">
161 - <Text
162 - className="text-2xs font-t3-bold uppercase text-foreground-muted"
163 - style={{ letterSpacing: 0.8 }}
164 - >
155 + <Text className="text-2xs font-t3-bold tracking-[0.8px] uppercase text-foreground-muted">
156 URL
157 </Text>
158 <TextInput
@@ -169,7 +160,6 @@ export function ConnectionEnvironmentRow(props: {
160 autoCorrect={false}
161 keyboardType="url"
162 placeholder="192.168.1.100:8080"
172 - placeholderTextColor={placeholderColor}
163 value={url}
164 onChangeText={setUrl}
165 className="rounded-[14px] border border-input-border bg-input px-4 py-3 text-base text-foreground"
@@ -185,10 +175,7 @@ export function ConnectionEnvironmentRow(props: {
175 onPress={handleSave}
176 >
177 <SymbolView name="checkmark" size={13} tintColor={primaryFg} type="monochrome" />
188 - <Text
189 - className="text-xs font-t3-bold uppercase text-primary-foreground"
190 - style={{ letterSpacing: 0.8 }}
191 - >
178 + <Text className="text-xs font-t3-bold tracking-[0.8px] uppercase text-primary-foreground">
179 Save
180 </Text>
181 </Pressable>
apps/mobile/src/features/connection/ConnectionSheetButton.tsx
+17 -35
@@ -37,33 +37,11 @@ export function ConnectionSheetButton(props: {
37 }) {
38 const tone = props.tone ?? "secondary";
39
40 - const primaryBg = useThemeColor("--color-primary");
40 const primaryFg = useThemeColor("--color-primary-foreground");
42 - const dangerBg = useThemeColor("--color-danger");
43 - const dangerBorderColor = useThemeColor("--color-danger-border");
41 const dangerFg = useThemeColor("--color-danger-foreground");
45 - const secondaryBg = useThemeColor("--color-secondary");
42 const secondaryFg = useThemeColor("--color-secondary-foreground");
47 - const borderColor = useThemeColor("--color-border");
43
49 - const colors =
50 - tone === "primary"
51 - ? {
52 - backgroundColor: primaryBg,
53 - borderColor: "transparent",
54 - textColor: primaryFg,
55 - }
56 - : tone === "danger"
57 - ? {
58 - backgroundColor: dangerBg,
59 - borderColor: dangerBorderColor,
60 - textColor: dangerFg,
61 - }
62 - : {
63 - backgroundColor: secondaryBg,
64 - borderColor: borderColor,
65 - textColor: secondaryFg,
66 - };
44 + const textColor = tone === "primary" ? primaryFg : tone === "danger" ? dangerFg : secondaryFg;
45
46 const primaryShadow =
47 tone === "primary"
@@ -84,28 +62,32 @@ export function ConnectionSheetButton(props: {
62 props.compact
63 ? "min-h-[42px] flex-row items-center justify-center gap-1.5 rounded-[14px] px-3.5 py-2.5"
64 : "min-h-[48px] flex-row items-center justify-center gap-2 rounded-[16px] px-4 py-3",
65 + "disabled:opacity-50",
66 + tone === "primary"
67 + ? "bg-primary"
68 + : tone === "danger"
69 + ? "border border-danger-border bg-danger"
70 + : "border border-border bg-secondary",
71 )}
72 disabled={props.disabled}
73 onPress={props.onPress}
90 - style={[
91 - {
92 - backgroundColor: colors.backgroundColor,
93 - borderWidth: tone === "primary" ? 0 : 1,
94 - borderColor: colors.borderColor,
95 - opacity: props.disabled ? 0.5 : 1,
96 - },
97 - primaryShadow,
98 - ]}
74 + style={primaryShadow}
75 >
76 <SymbolView
77 name={props.icon}
78 size={props.compact ? 13 : 14}
103 - tintColor={colors.textColor}
79 + tintColor={textColor}
80 type="monochrome"
81 />
82 <Text
107 - className="text-xs font-t3-bold uppercase"
108 - style={{ color: colors.textColor, letterSpacing: 0.8 }}
83 + className={cn(
84 + "text-xs font-t3-bold tracking-[0.8px] uppercase",
85 + tone === "primary"
86 + ? "text-primary-foreground"
87 + : tone === "danger"
88 + ? "text-danger-foreground"
89 + : "text-secondary-foreground",
90 + )}
91 >
92 {props.label}
93 </Text>
apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx
+5 -20
@@ -38,7 +38,6 @@ export function ConnectionsNewRouteScreen({
38 const [scannerLocked, setScannerLocked] = useState(false);
39
40 const headerIconColor = useThemeColor("--color-icon");
41 - const placeholderColor = useThemeColor("--color-placeholder");
41
42 const connectDisabled = isSubmitting || hostInput.trim().length === 0;
43
@@ -158,7 +157,7 @@ export function ConnectionsNewRouteScreen({
157 <ScrollView
158 contentInsetAdjustmentBehavior="automatic"
159 showsVerticalScrollIndicator={false}
161 - style={{ flex: 1 }}
160 + className="flex-1"
161 contentInset={{ bottom: Math.max(insets.bottom, 18) + 18 }}
162 contentContainerStyle={{
163 paddingHorizontal: 20,
@@ -168,10 +167,7 @@ export function ConnectionsNewRouteScreen({
167 <View collapsable={false} className="gap-5">
168 {showScanner ? (
169 cameraPermission?.granted ? (
171 - <View
172 - className="overflow-hidden rounded-[24px]"
173 - style={{ borderCurve: "continuous" }}
174 - >
170 + <View className="overflow-hidden rounded-[24px] border-continuous">
171 <CameraView
172 barcodeScannerSettings={{ barcodeTypes: ["qr"] }}
173 onBarcodeScanned={handleQrScan}
@@ -179,10 +175,7 @@ export function ConnectionsNewRouteScreen({
175 />
176 </View>
177 ) : (
182 - <View
183 - className="items-center gap-3 rounded-[24px] bg-card px-5 py-8"
184 - style={{ borderCurve: "continuous" }}
185 - >
178 + <View className="items-center gap-3 rounded-[24px] border-continuous bg-card px-5 py-8">
179 <Text className="text-center text-sm leading-normal text-foreground-muted">
180 Camera permission is required to scan a QR code.
181 </Text>
@@ -200,10 +193,7 @@ export function ConnectionsNewRouteScreen({
193 ) : (
194 <View collapsable={false} className="gap-4 rounded-[24px] bg-card p-4">
195 <View collapsable={false} className="gap-1.5">
203 - <Text
204 - className="text-2xs font-t3-bold uppercase text-foreground-muted"
205 - style={{ letterSpacing: 0.8 }}
206 - >
196 + <Text className="text-2xs font-t3-bold tracking-[0.8px] uppercase text-foreground-muted">
197 Host
198 </Text>
199 <TextInput
@@ -211,7 +201,6 @@ export function ConnectionsNewRouteScreen({
201 autoCorrect={false}
202 keyboardType="url"
203 placeholder="192.168.1.100:8080"
214 - placeholderTextColor={placeholderColor}
204 value={hostInput}
205 onChangeText={handleHostChange}
206 className="rounded-[14px] border border-input-border bg-input px-4 py-3.5 text-base text-foreground"
@@ -219,17 +208,13 @@ export function ConnectionsNewRouteScreen({
208 </View>
209
210 <View collapsable={false} className="gap-1.5">
222 - <Text
223 - className="text-2xs font-t3-bold uppercase text-foreground-muted"
224 - style={{ letterSpacing: 0.8 }}
225 - >
211 + <Text className="text-2xs font-t3-bold tracking-[0.8px] uppercase text-foreground-muted">
212 Pairing code
213 </Text>
214 <TextInput
215 autoCapitalize="none"
216 autoCorrect={false}
217 placeholder="abc-123-xyz"
232 - placeholderTextColor={placeholderColor}
218 value={codeInput}
219 onChangeText={handleCodeChange}
220 className="rounded-[14px] border border-input-border bg-input px-4 py-3.5 text-base text-foreground"
apps/mobile/src/features/connection/ConnectionsRouteScreen.tsx
+2 -5
@@ -42,7 +42,7 @@ export function ConnectionsRouteScreen() {
42 <ScrollView
43 contentInsetAdjustmentBehavior="automatic"
44 showsVerticalScrollIndicator={false}
45 - style={{ flex: 1 }}
45 + className="flex-1"
46 contentInset={{ bottom: Math.max(insets.bottom, 18) + 18 }}
47 contentContainerStyle={{
48 paddingHorizontal: 20,
@@ -55,10 +55,7 @@ export function ConnectionsRouteScreen() {
55 <View
56 key={environment.environmentId}
57 collapsable={false}
58 - style={{
59 - borderTopWidth: index === 0 ? 0 : 1,
60 - }}
61 - className={cn(index !== 0 && "border-border")}
58 + className={cn(index !== 0 && "border-t border-border")}
59 >
60 <ConnectionEnvironmentRow
61 environment={environment}
apps/mobile/src/features/files/FileMarkdownPreview.tsx
+15 -8
@@ -8,6 +8,7 @@ import {
8 import { RefreshControl, ScrollView, Text as NativeText, View } from "react-native";
9
10 import { tryOpenExternalUrl } from "../../lib/openExternalUrl";
11 +import { useFontFamily } from "../../lib/useFontFamily";
12 import {
13 resolveMarkdownFontSizes,
14 resolveNativeMarkdownTypography,
@@ -45,11 +46,15 @@ function useMarkdownPreviewStyles(): MarkdownPreviewStyles {
46 const codeBackground = String(useThemeColor("--color-md-code-bg"));
47 const codeText = String(useThemeColor("--color-md-code-text"));
48 const horizontalRule = String(useThemeColor("--color-md-hr"));
49 + const regularFontFamily = useFontFamily("regular");
50 + const mediumFontFamily = useFontFamily("medium");
51 + const boldFontFamily = useFontFamily("bold");
52
53 return useMemo(() => {
54 const renderers: CustomRenderers = {
55 link: ({ href, children }) => (
56 <NativeText
57 + className="font-t3-medium"
58 onPress={() => {
59 if (href) {
60 void tryOpenExternalUrl(href, "markdown-link");
@@ -57,7 +62,6 @@ function useMarkdownPreviewStyles(): MarkdownPreviewStyles {
62 }}
63 style={{
64 color: link,
60 - fontFamily: "DMSans_500Medium",
65 textDecorationLine: "none",
66 }}
67 >
@@ -86,21 +90,21 @@ function useMarkdownPreviewStyles(): MarkdownPreviewStyles {
90 styles: {
91 text: {
92 color: body,
89 - fontFamily: "DMSans_400Regular",
93 + fontFamily: regularFontFamily,
94 fontSize: markdownFontSizes.m,
95 lineHeight: markdownFontSizes.bodyLineHeight,
96 },
97 heading: {
98 color: strong,
95 - fontFamily: "DMSans_700Bold",
99 + fontFamily: boldFontFamily,
100 },
101 strong: {
102 color: strong,
99 - fontFamily: "DMSans_700Bold",
103 + fontFamily: boldFontFamily,
104 },
105 link: {
106 color: link,
103 - fontFamily: "DMSans_500Medium",
107 + fontFamily: mediumFontFamily,
108 },
109 blockquote: {
110 backgroundColor: blockquoteBackground,
@@ -141,9 +145,9 @@ function useMarkdownPreviewStyles(): MarkdownPreviewStyles {
145 fontSize: nativeMarkdownTypography.fontSize,
146 lineHeight: nativeMarkdownTypography.lineHeight,
147 headingFontSizes: nativeMarkdownTypography.headingFontSizes,
144 - fontFamily: "DMSans_400Regular",
145 - headingFontFamily: "DMSans_700Bold",
146 - boldFontFamily: "DMSans_700Bold",
148 + fontFamily: regularFontFamily,
149 + headingFontFamily: boldFontFamily,
150 + boldFontFamily,
151 },
152 };
153 }, [
@@ -155,8 +159,11 @@ function useMarkdownPreviewStyles(): MarkdownPreviewStyles {
159 horizontalRule,
160 link,
161 markdownFontSizes,
162 + mediumFontFamily,
163 nativeMarkdownTypography,
164 + regularFontFamily,
165 strong,
166 + boldFontFamily,
167 ]);
168 }
169
apps/mobile/src/features/files/FileTreeBrowser.tsx
+1 -1
@@ -246,7 +246,7 @@ export function FileTreeBrowser(props: {
246 // flex-1 Views is ignored, which is why the tree rendered under the header with no blur.
247 return (
248 <FlatList
249 - style={{ flex: 1 }}
249 + className="flex-1"
250 data={visibleNodes}
251 keyExtractor={(item) => item.node.path}
252 contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"}
apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx
+1 -8
@@ -224,14 +224,7 @@ function FilesToolbarBottomFade() {
224 pointerEvents="none"
225 accessibilityElementsHidden
226 importantForAccessibility="no-hide-descendants"
227 - style={{
228 - bottom: 0,
229 - height: 112,
230 - left: 0,
231 - position: "absolute",
232 - right: 0,
233 - zIndex: 1,
234 - }}
227 + className="absolute inset-x-0 bottom-0 z-[1] h-28"
228 >
229 <Svg width="100%" height="100%">
230 <Defs>
apps/mobile/src/features/home/HomeScreen.tsx
+1 -1
@@ -412,7 +412,7 @@ export function HomeScreen(props: HomeScreenProps) {
412 {Platform.OS === "ios" ? null : <HomeTopContentSpacer topInset={insets.top} />}
413
414 {shouldShowConnectionStatus && Platform.OS === "ios" ? (
415 - <View style={{ paddingBottom: 16 }}>
415 + <View className="pb-4">
416 <WorkspaceConnectionStatus
417 state={props.catalogState}
418 onPress={props.onOpenEnvironments}
apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx
+4 -3
@@ -476,16 +476,17 @@ export function AdaptiveWorkspaceLayout(props: {
476 return (
477 <HomeListOptionsProvider>
478 <AdaptiveWorkspaceContext.Provider value={contextValue}>
479 - <View testID="adaptive-workspace-layout" style={{ flex: 1, flexDirection: "row" }}>
479 + <View testID="adaptive-workspace-layout" className="flex-1 flex-row">
480 {shouldRenderPrimarySidebar && layout.listPaneWidth !== null ? (
481 <Animated.View
482 + className="self-stretch overflow-hidden"
483 accessibilityElementsHidden={!panes.primarySidebarVisible}
484 collapsable={false}
485 importantForAccessibility={
486 panes.primarySidebarVisible ? "auto" : "no-hide-descendants"
487 }
488 pointerEvents={panes.primarySidebarVisible ? "auto" : "none"}
488 - style={[{ alignSelf: "stretch", overflow: "hidden" }, sidebarAnimatedStyle]}
489 + style={sidebarAnimatedStyle}
490 >
491 <ThreadNavigationSidebar
492 width={layout.listPaneWidth}
@@ -501,7 +502,7 @@ export function AdaptiveWorkspaceLayout(props: {
502 />
503 </Animated.View>
504 ) : null}
504 - <View className="bg-screen" collapsable={false} style={{ flex: 1, overflow: "hidden" }}>
505 + <View className="flex-1 overflow-hidden bg-screen" collapsable={false}>
506 <View
507 collapsable={false}
508 style={
apps/mobile/src/features/layout/workspace-inspector-pane.tsx
+3 -2
@@ -129,13 +129,14 @@ export function WorkspaceInspectorPane(props: {
129 ) : null}
130 {inspectorSupported ? (
131 <Animated.View
132 + className="shrink-0 overflow-hidden"
133 accessibilityElementsHidden={!inspectorVisible}
134 collapsable={false}
135 importantForAccessibility={inspectorVisible ? "auto" : "no-hide-descendants"}
136 pointerEvents={inspectorVisible ? "auto" : "none"}
136 - style={[{ flexShrink: 0, overflow: "hidden" }, inspectorStyle]}
137 + style={inspectorStyle}
138 >
138 - <Animated.View style={[{ flex: 1 }, inspectorContentStyle]}>
139 + <Animated.View className="flex-1" style={inspectorContentStyle}>
140 {props.renderInspector?.()}
141 </Animated.View>
142 </Animated.View>
apps/mobile/src/features/layout/workspace-pane-divider.tsx
+1 -10
@@ -69,6 +69,7 @@ export function WorkspacePaneDivider(props: WorkspacePaneDividerProps) {
69 return (
70 <GestureDetector gesture={resizeGesture}>
71 <Pressable
72 + className="relative z-[100] -mx-[22px] w-11 self-stretch cursor-pointer justify-center"
73 accessibilityActions={[
74 { name: "increment", label: "Make pane wider" },
75 { name: "decrement", label: "Make pane narrower" },
@@ -82,7 +83,6 @@ export function WorkspacePaneDivider(props: WorkspacePaneDividerProps) {
83 onAccessibilityAction={handleAccessibilityAction}
84 onHoverIn={() => setHovered(true)}
85 onHoverOut={() => setHovered(false)}
85 - style={styles.hitTarget}
86 >
87 <View style={[styles.line, (hovered || dragging) && styles.activeLine]} />
88 </Pressable>
@@ -91,15 +91,6 @@ export function WorkspacePaneDivider(props: WorkspacePaneDividerProps) {
91 }
92
93 const styles = StyleSheet.create({
94 - hitTarget: {
95 - alignSelf: "stretch",
96 - cursor: "pointer",
97 - justifyContent: "center",
98 - marginHorizontal: -22,
99 - position: "relative",
100 - width: 44,
101 - zIndex: 100,
102 - },
94 line: {
95 alignSelf: "center",
96 backgroundColor:
apps/mobile/src/features/projects/AddProjectScreen.tsx
+7 -11
@@ -31,6 +31,7 @@ import * as Arr from "effect/Array";
31 import * as Cause from "effect/Cause";
32 import * as Order from "effect/Order";
33 import { AsyncResult } from "effect/unstable/reactivity";
34 +import { cn } from "../../lib/cn";
35
36 import { useProjects, useServerConfigs } from "../../state/entities";
37 import { filesystemEnvironment } from "../../state/filesystem";
@@ -99,10 +100,7 @@ function sourceFromParam(value: string | string[] | undefined): AddProjectRemote
100
101 function SectionTitle(props: { readonly children: string }) {
102 return (
102 - <Text
103 - className="px-1 text-2xs font-t3-bold uppercase text-foreground-muted"
104 - style={{ letterSpacing: 0.7 }}
105 - >
103 + <Text className="px-1 text-2xs font-t3-bold tracking-[0.7px] uppercase text-foreground-muted">
104 {props.children}
105 </Text>
106 );
@@ -148,19 +146,17 @@ function ListRow(props: {
146 readonly right?: ReactNode;
147 readonly onPress?: () => void;
148 }) {
151 - const borderColor = useThemeColor("--color-border-subtle");
149 const chevronColor = useThemeColor("--color-chevron");
150
151 return (
152 <Pressable
153 disabled={props.disabled}
154 onPress={props.onPress}
158 - className="bg-card px-3.5 py-2.5 active:opacity-70"
159 - style={{
160 - opacity: props.disabled ? 0.45 : 1,
161 - borderTopWidth: props.isFirst ? 0 : 1,
162 - borderTopColor: borderColor,
163 - }}
155 + className={cn(
156 + "bg-card px-3.5 py-2.5 active:opacity-70",
157 + !props.isFirst && "border-t border-border-subtle",
158 + props.disabled && "opacity-[0.45]",
159 + )}
160 >
161 <View className="flex-row items-center gap-3">
162 <View
apps/mobile/src/features/review/ReviewCommentComposerSheet.tsx
+5 -10
@@ -144,15 +144,11 @@ export function ReviewCommentComposerSheet(props: ReviewCommentComposerSheetProp
144 }
145
146 return (
147 - <View style={{ flex: 1 }}>
148 - <KeyboardAvoidingView automaticOffset behavior="padding" style={{ flex: 1 }}>
147 + <View className="flex-1">
148 + <KeyboardAvoidingView automaticOffset behavior="padding" className="flex-1">
149 <View
150 - style={{
151 - flex: 1,
152 - paddingHorizontal: 20,
153 - paddingTop: 8,
154 - paddingBottom: target ? 0 : Math.max(insets.bottom, 18),
155 - }}
150 + className="flex-1 px-5 pt-2"
151 + style={{ paddingBottom: target ? 0 : Math.max(insets.bottom, 18) }}
152 >
153 <View className="flex-row items-center justify-between py-2">
154 <Pressable
@@ -253,8 +249,7 @@ export function ReviewCommentComposerSheet(props: ReviewCommentComposerSheetProp
249 textAlignVertical="top"
250 value={commentText}
251 onChangeText={setCommentText}
256 - className="h-full flex-1 border-0 bg-transparent px-0 py-0 font-sans text-base"
257 - style={{ flex: 1, minHeight: 0 }}
252 + className="h-full min-h-0 flex-1 border-0 bg-transparent px-0 py-0 font-sans text-base"
253 />
254 </TextInputWrapper>
255 </View>
apps/mobile/src/features/review/ReviewSheet.tsx
+2 -2
@@ -655,7 +655,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
655
656 <View className="flex-1 bg-sheet">
657 {showConnectionNotice ? (
658 - <View style={{ flex: 1, paddingTop: topContentInset }}>
658 + <View className="flex-1" style={{ paddingTop: topContentInset }}>
659 <EnvironmentConnectionNotice
660 environmentLabel={environment.presentation?.entry.target.label ?? "Environment"}
661 connection={
@@ -722,7 +722,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
722 bottom: Math.max(insets.bottom, 18) + 18,
723 }}
724 showsVerticalScrollIndicator={false}
725 - style={{ flex: 1 }}
725 + className="flex-1"
726 >
727 {listHeader}
728 {!selectedSection ? (
apps/mobile/src/features/review/reviewDiffRendering.tsx
+2 -2
@@ -48,8 +48,8 @@ export function ReviewChangeBar(props: {
48 <View>
49 {Array.from({ length: Math.ceil(height / 2) }, (_, index) => (
50 <View key={index}>
51 - <View className="w-[5px] bg-rose-400" style={{ height: 1 }} />
52 - <View style={{ height: 1 }} />
51 + <View className="h-px w-[5px] bg-rose-400" />
52 + <View className="h-px" />
53 </View>
54 ))}
55 </View>
apps/mobile/src/features/settings/SettingsAppearanceRouteScreen.tsx
+2 -4
@@ -13,12 +13,10 @@ export function SettingsAppearanceRouteScreen() {
13 <ScrollView
14 contentInsetAdjustmentBehavior="automatic"
15 showsVerticalScrollIndicator={false}
16 - style={{ flex: 1 }}
16 + className="flex-1"
17 + contentContainerClassName="gap-6 px-5 pt-4"
18 contentContainerStyle={{
18 - gap: 24,
19 paddingBottom: Math.max(insets.bottom, 18) + 18,
20 - paddingHorizontal: 20,
21 - paddingTop: 16,
20 }}
21 >
22 <TextAppearanceSection />
apps/mobile/src/features/settings/SettingsClientStorageRouteScreen.tsx
+3 -13
@@ -75,13 +75,8 @@ export function SettingsClientStorageRouteScreen() {
75 contentInsetAdjustmentBehavior="automatic"
76 contentInset={{ bottom: Math.max(insets.bottom, 18) }}
77 showsVerticalScrollIndicator={false}
78 - style={{ flex: 1 }}
79 - contentContainerStyle={{
80 - gap: 24,
81 - paddingBottom: 18,
82 - paddingHorizontal: 20,
83 - paddingTop: 16,
84 - }}
78 + className="flex-1"
79 + contentContainerClassName="gap-6 px-5 pt-4 pb-[18px]"
80 >
81 <SettingsSection title="Environment caches">
82 {AsyncResult.isFailure(summaryResult) ? (
@@ -180,7 +175,6 @@ function CacheEnvironmentRow(props: {
175 readonly onClear: () => void;
176 }) {
177 const iconColor = useThemeColor("--color-icon");
183 - const dangerForegroundColor = useThemeColor("--color-danger-foreground");
178 return (
179 <View
180 className={
@@ -206,11 +200,7 @@ function CacheEnvironmentRow(props: {
200 onPress={props.onClear}
201 className="rounded-full px-3 py-2 disabled:opacity-40"
202 >
209 - <Text
210 - className="font-t3-medium tabular-nums text-danger-foreground"
211 - numberOfLines={1}
212 - style={{ color: dangerForegroundColor }}
213 - >
203 + <Text className="font-t3-medium tabular-nums text-danger-foreground" numberOfLines={1}>
204 Clear {formatBytes(props.environment.payloadBytes)}
205 </Text>
206 </Pressable>
apps/mobile/src/features/settings/SettingsEnvironmentsRouteScreen.tsx
+3 -7
@@ -50,11 +50,10 @@ export function SettingsEnvironmentsRouteScreen() {
50 <ScrollView
51 contentInsetAdjustmentBehavior="automatic"
52 showsVerticalScrollIndicator={false}
53 - style={{ flex: 1 }}
53 + className="flex-1"
54 + contentContainerClassName="px-5 pt-4"
55 contentContainerStyle={{
56 paddingBottom: Math.max(insets.bottom, 18) + 18,
56 - paddingHorizontal: 20,
57 - paddingTop: 16,
57 }}
58 >
59 {hasLocalEnvironments ? (
@@ -63,10 +62,7 @@ export function SettingsEnvironmentsRouteScreen() {
62 <View
63 key={environment.environmentId}
64 collapsable={false}
66 - style={{
67 - borderTopWidth: index === 0 ? 0 : 1,
68 - }}
69 - className={cn(index !== 0 && "border-border")}
65 + className={cn(index !== 0 && "border-t border-border")}
66 >
67 <ConnectionEnvironmentRow
68 environment={environment}
apps/mobile/src/features/settings/SettingsRouteScreen.tsx
+4 -8
@@ -94,12 +94,10 @@ function LocalSettingsRouteScreen() {
94 <ScrollView
95 contentInsetAdjustmentBehavior="automatic"
96 showsVerticalScrollIndicator={false}
97 - style={{ flex: 1 }}
97 + className="flex-1"
98 + contentContainerClassName="gap-6 px-5 pt-4"
99 contentContainerStyle={{
99 - gap: 24,
100 paddingBottom: Math.max(insets.bottom, 18) + 18,
101 - paddingHorizontal: 20,
102 - paddingTop: 16,
101 }}
102 >
103 <SettingsSection title="Configuration">
@@ -430,12 +428,10 @@ function ConfiguredSettingsRouteScreen() {
428 <ScrollView
429 contentInsetAdjustmentBehavior="automatic"
430 showsVerticalScrollIndicator={false}
433 - style={{ flex: 1 }}
431 + className="flex-1"
432 + contentContainerClassName="gap-6 px-5 pt-4"
433 contentContainerStyle={{
435 - gap: 24,
434 paddingBottom: Math.max(insets.bottom, 18) + 18,
437 - paddingHorizontal: 20,
438 - paddingTop: 16,
435 }}
436 >
437 <View className="gap-3">
apps/mobile/src/features/settings/appearance/components/FontSizeSliderRow.tsx
+1 -1
@@ -136,7 +136,7 @@ export function FontSizeSliderRow(props: {
136 };
137
138 return (
139 - <View className="gap-1 p-4" style={{ opacity: disabled ? 0.45 : 1 }}>
139 + <View className={disabled ? "gap-1 p-4 opacity-[0.45]" : "gap-1 p-4"}>
140 <View className="flex-row items-center gap-4">
141 <SymbolView
142 name={props.icon}
apps/mobile/src/features/settings/components/SettingsRow.tsx
+5 -2
@@ -22,8 +22,11 @@ export function SettingsRow(props: {
22 const chevron = useThemeColor("--color-chevron");
23 const content = (
24 <View
25 - className="flex-row items-center gap-4 p-4"
26 - style={{ opacity: props.disabled ? 0.45 : 1 }}
25 + className={
26 + props.disabled
27 + ? "flex-row items-center gap-4 p-4 opacity-[0.45]"
28 + : "flex-row items-center gap-4 p-4"
29 + }
30 >
31 <SymbolView name={props.icon} size={22} tintColor={icon} type="monochrome" weight="regular" />
32 <Text className="shrink-0 text-lg text-foreground" numberOfLines={1}>
apps/mobile/src/features/settings/components/SettingsSection.tsx
+1 -4
@@ -7,10 +7,7 @@ export function SettingsSection(props: { readonly title: string; readonly childr
7 return (
8 <View className="gap-2">
9 <Text className="px-2 text-sm font-t3-medium text-foreground-muted">{props.title}</Text>
10 - <View
11 - className="overflow-hidden rounded-[28px] bg-card"
12 - style={{ borderCurve: "continuous" }}
13 - >
10 + <View className="overflow-hidden rounded-[28px] border-continuous bg-card">
11 {props.children}
12 </View>
13 </View>
apps/mobile/src/features/settings/components/SettingsSwitchRow.tsx
+5 -2
@@ -20,8 +20,11 @@ export function SettingsSwitchRow(props: {
20
21 return (
22 <View
23 - className="flex-row items-center gap-4 p-4"
24 - style={{ opacity: props.disabled ? 0.45 : 1 }}
23 + className={
24 + props.disabled
25 + ? "flex-row items-center gap-4 p-4 opacity-[0.45]"
26 + : "flex-row items-center gap-4 p-4"
27 + }
28 >
29 <SymbolView name={props.icon} size={22} tintColor={icon} type="monochrome" weight="regular" />
30 <Text className="flex-1 text-lg text-foreground">{props.label}</Text>
apps/mobile/src/features/terminal/NativeTerminalSurface.tsx
+7 -18
@@ -82,9 +82,9 @@ const FallbackTerminalSurface = memo(function FallbackTerminalSurface(props: Ter
82
83 return (
84 <View
85 + className="flex-1"
86 style={[
87 {
87 - flex: 1,
88 backgroundColor: theme.background,
89 borderRadius: 8,
90 overflow: "hidden",
@@ -93,19 +93,18 @@ const FallbackTerminalSurface = memo(function FallbackTerminalSurface(props: Ter
93 ]}
94 onLayout={handleLayout}
95 >
96 - <View style={{ flex: 1, paddingHorizontal: 10, paddingVertical: 8 }}>
96 + <View className="flex-1 px-2.5 py-2">
97 <Text
98 - className="text-2xs"
98 + className="pb-2 text-2xs"
99 style={{
100 color: theme.mutedForeground,
101 - paddingBottom: 8,
101 }}
102 >
103 {statusLabel}
104 </Text>
105 <ScrollView
107 - style={{ flex: 1 }}
108 - contentContainerStyle={{ paddingBottom: 12 }}
106 + className="flex-1"
107 + contentContainerClassName="pb-3"
108 showsVerticalScrollIndicator={false}
109 >
110 <Text
@@ -122,13 +121,9 @@ const FallbackTerminalSurface = memo(function FallbackTerminalSurface(props: Ter
121 </ScrollView>
122 </View>
123 <View
124 + className="flex-row items-center gap-2 border-t p-2"
125 style={{
126 - borderTopWidth: 1,
126 borderTopColor: theme.border,
128 - flexDirection: "row",
129 - alignItems: "center",
130 - gap: 8,
131 - padding: 8,
127 }}
128 >
129 <TextInput
@@ -165,13 +160,7 @@ const FallbackTerminalSurface = memo(function FallbackTerminalSurface(props: Ter
160 })}
161 onPress={() => props.onInput("\u0003")}
162 >
168 - <Text
169 - className="text-2xs"
170 - style={{
171 - color: theme.foreground,
172 - fontFamily: "DMSans_700Bold",
173 - }}
174 - >
163 + <Text className="text-2xs font-t3-bold" style={{ color: theme.foreground }}>
164 Ctrl-C
165 </Text>
166 </Pressable>
apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.tsx
+3 -3
@@ -929,7 +929,7 @@ export function ThreadTerminalRouteScreen(props: ThreadTerminalRouteScreenProps)
929 </NativeHeaderToolbar>
930 ) : null}
931
932 - <View style={{ flex: 1, backgroundColor: terminalTheme.background }}>
932 + <View className="flex-1" style={{ backgroundColor: terminalTheme.background }}>
933 {!isEnvironmentReady ? (
934 <EnvironmentConnectionNotice
935 environmentLabel={
@@ -949,7 +949,7 @@ export function ThreadTerminalRouteScreen(props: ThreadTerminalRouteScreenProps)
949 />
950 ) : (
951 <>
952 - <View style={{ flex: 1, paddingBottom: terminalBottomInset }}>
952 + <View className="flex-1" style={{ paddingBottom: terminalBottomInset }}>
953 <TerminalSurface
954 buffer={terminalSurfaceBuffer}
955 fontSize={fontSize}
@@ -968,10 +968,10 @@ export function ThreadTerminalRouteScreen(props: ThreadTerminalRouteScreenProps)
968 offset={{ closed: 0, opened: 0 }}
969 >
970 <View
971 + className="border-t"
972 style={{
973 backgroundColor: terminalTheme.background,
974 borderTopColor: terminalTheme.border,
974 - borderTopWidth: 1,
975 minHeight: TERMINAL_ACCESSORY_HEIGHT,
976 }}
977 >
apps/mobile/src/features/threads/ComposerCommandPopover.tsx
+6 -21
@@ -154,23 +154,11 @@ const CommandRow = memo(function CommandRow(props: {
154 ) : iconName ? (
155 <SymbolView name={iconName} size={14} tintColor={iconColor} type="monochrome" />
156 ) : null}
157 - <Text
158 - className="text-base font-t3-medium text-foreground"
159 - numberOfLines={1}
160 - style={{ flexShrink: 0 }}
161 - >
157 + <Text className="shrink-0 text-base font-t3-medium text-foreground" numberOfLines={1}>
158 {props.item.label}
159 </Text>
160 {props.item.description ? (
165 - <Text
166 - className="text-xs"
167 - numberOfLines={1}
168 - style={{
169 - flex: 1,
170 - minWidth: 0,
171 - color: "#a1a1aa",
172 - }}
173 - >
161 + <Text className="min-w-0 flex-1 text-xs text-zinc-400" numberOfLines={1}>
162 {props.item.description}
163 </Text>
164 ) : null}
@@ -187,18 +175,15 @@ export const ComposerCommandPopover = memo(function ComposerCommandPopover(
175 return (
176 <PopoverSurface isDarkMode={isDarkMode}>
177 {label ? (
190 - <View style={{ paddingHorizontal: 14, paddingTop: 10, paddingBottom: 4 }}>
191 - <Text
192 - className="text-3xs font-t3-bold text-foreground-muted"
193 - style={{ letterSpacing: 0.8, textTransform: "uppercase" }}
194 - >
178 + <View className="px-3.5 pt-2.5 pb-1">
179 + <Text className="text-3xs font-t3-bold tracking-[0.8px] uppercase text-foreground-muted">
180 {label}
181 </Text>
182 </View>
183 ) : null}
184 {props.items.length > 0 ? (
185 <ScrollView
201 - style={{ maxHeight: 180 }}
186 + className="max-h-[180px]"
187 keyboardShouldPersistTaps="always"
188 showsVerticalScrollIndicator={false}
189 >
@@ -212,7 +197,7 @@ export const ComposerCommandPopover = memo(function ComposerCommandPopover(
197 ))}
198 </ScrollView>
199 ) : (
215 - <View style={{ paddingHorizontal: 14, paddingVertical: 10 }}>
200 + <View className="px-3.5 py-2.5">
201 <Text className="text-xs text-foreground-tertiary">
202 {emptyText(props.triggerKind, props.isLoading)}
203 </Text>
apps/mobile/src/features/threads/GitActionProgressOverlay.tsx
+2 -1
@@ -47,7 +47,8 @@ export function GitActionProgressOverlay(props: {
47 <Animated.View
48 entering={FadeIn.duration(200)}
49 exiting={FadeOut.duration(150)}
50 - style={{ top: insets.top + 48, left: 12, right: 12, position: "absolute", zIndex: 100 }}
50 + className="absolute inset-x-3 z-[100]"
51 + style={{ top: insets.top + 48 }}
52 pointerEvents="box-none"
53 >
54 <Pressable onPress={handlePress}>
apps/mobile/src/features/threads/NewTaskDraftScreen.tsx
+4 -12
@@ -4,7 +4,6 @@ import { useCallback, useEffect, useMemo, useRef } from "react";
4 import { Alert, InteractionManager, View, useColorScheme } from "react-native";
5 import { KeyboardAvoidingView, useKeyboardState } from "react-native-keyboard-controller";
6 import { useSafeAreaInsets } from "react-native-safe-area-context";
7 -import { useThemeColor } from "../../lib/useThemeColor";
7
8 import { EnvironmentId } from "@t3tools/contracts";
9 import {
@@ -112,7 +111,6 @@ export function NewTaskDraftScreen(props: {
111 };
112 }, [props.pendingTaskId, cancelEditingPendingTask]);
113
115 - const borderColor = useThemeColor("--color-border");
114 const headlineText = useScaledTextRole("headline");
115 const sheetFadeOpaque = colorScheme === "dark" ? "rgba(14,14,14,0.98)" : "rgba(242,242,247,0.98)";
116 const sheetFadeTransparent = colorScheme === "dark" ? "rgba(14,14,14,0)" : "rgba(242,242,247,0)";
@@ -600,8 +598,8 @@ export function NewTaskDraftScreen(props: {
598 <View className="flex-1 bg-sheet">
599 <NativeStackScreenOptions options={{ title: selectedProject.title }} />
600
603 - <KeyboardAvoidingView automaticOffset behavior="padding" style={{ flex: 1 }}>
604 - <View style={{ flex: 1, minHeight: 0, paddingHorizontal: 20, paddingTop: 8 }}>
601 + <KeyboardAvoidingView automaticOffset behavior="padding" className="flex-1">
602 + <View className="min-h-0 flex-1 px-5 pt-2">
603 <ComposerEditor
604 ref={promptInputRef}
605 autoFocus
@@ -617,15 +615,9 @@ export function NewTaskDraftScreen(props: {
615 />
616 </View>
617
620 - <View
621 - style={{
622 - borderTopWidth: 1,
623 - borderTopColor: borderColor,
624 - paddingBottom: controlsBottomPadding,
625 - }}
626 - >
618 + <View className="border-t border-border" style={{ paddingBottom: controlsBottomPadding }}>
619 {flow.attachments.length > 0 ? (
628 - <View style={{ paddingHorizontal: 16, paddingTop: 12 }}>
620 + <View className="px-4 pt-3">
621 <ComposerAttachmentStrip
622 attachments={flow.attachments}
623 onRemove={flow.removeAttachment}
apps/mobile/src/features/threads/NewTaskRouteScreen.tsx
+8 -13
@@ -6,6 +6,7 @@ import { useMemo } from "react";
6 import { ActivityIndicator, Pressable, ScrollView, View } from "react-native";
7 import { useSafeAreaInsets } from "react-native-safe-area-context";
8 import { useThemeColor } from "../../lib/useThemeColor";
9 +import { cn } from "../../lib/cn";
10
11 import { AppText as Text } from "../../components/AppText";
12 import { ProjectFavicon } from "../../components/ProjectFavicon";
@@ -79,7 +80,6 @@ export function NewTaskRouteScreen() {
80 const insets = useSafeAreaInsets();
81 const chevronColor = useThemeColor("--color-chevron");
82 const accentColor = useThemeColor("--color-icon-muted");
82 - const borderSubtleColor = useThemeColor("--color-border-subtle");
83 const repositoryGroups = useMemo(
84 () => groupProjectsByRepository({ projects, threads }),
85 [projects, threads],
@@ -130,7 +130,7 @@ export function NewTaskRouteScreen() {
130 <ScrollView
131 contentInsetAdjustmentBehavior="automatic"
132 showsVerticalScrollIndicator={false}
133 - style={{ flex: 1 }}
133 + className="flex-1"
134 contentInset={{ bottom: Math.max(insets.bottom, 18) + 18 }}
135 contentContainerStyle={{
136 paddingHorizontal: 20,
@@ -175,7 +175,6 @@ export function NewTaskRouteScreen() {
175 return (
176 <Pressable
177 key={item.key}
178 - className="bg-card"
178 onPress={() =>
179 navigation.navigate("NewTaskSheet", {
180 screen: "NewTaskDraft",
@@ -186,16 +185,12 @@ export function NewTaskRouteScreen() {
185 },
186 })
187 }
189 - style={{
190 - paddingHorizontal: 16,
191 - paddingVertical: 14,
192 - borderTopWidth: isFirst ? 0 : 1,
193 - borderTopColor: borderSubtleColor,
194 - borderTopLeftRadius: isFirst ? 24 : 0,
195 - borderTopRightRadius: isFirst ? 24 : 0,
196 - borderBottomLeftRadius: isLast ? 24 : 0,
197 - borderBottomRightRadius: isLast ? 24 : 0,
198 - }}
188 + className={cn(
189 + "bg-card px-4 py-3.5",
190 + !isFirst && "border-t border-border-subtle",
191 + isFirst && "rounded-t-[24px]",
192 + isLast && "rounded-b-[24px]",
193 + )}
194 >
195 <View className="flex-row items-center justify-between gap-3">
196 <View className="h-7 w-7 items-center justify-center">
apps/mobile/src/features/threads/ThreadComposer.tsx
+10 -34
@@ -688,9 +688,9 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
688
689 return (
690 <Animated.View
691 + className="px-4"
692 layout={COMPOSER_LAYOUT_TRANSITION}
693 style={{
693 - paddingHorizontal: 16,
694 paddingTop: isExpanded ? 8 : 6,
695 paddingBottom: (props.bottomInset ?? 0) + (isExpanded ? 8 : 6),
696 experimental_backgroundImage: isDarkMode
@@ -699,21 +699,12 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
699 }}
700 >
701 <Animated.View
702 - className="w-full"
702 + className="relative w-full self-center"
703 layout={COMPOSER_LAYOUT_TRANSITION}
704 - style={{ alignSelf: "center", maxWidth: props.contentMaxWidth, position: "relative" }}
704 + style={{ maxWidth: props.contentMaxWidth }}
705 >
706 {composerTrigger && composerMenuItems.length > 0 ? (
707 - <View
708 - style={{
709 - position: "absolute",
710 - bottom: "100%",
711 - left: 0,
712 - right: 0,
713 - marginBottom: 8,
714 - zIndex: 10,
715 - }}
716 - >
707 + <View className="absolute inset-x-0 bottom-full z-10 mb-2">
708 <ComposerCommandPopover
709 items={composerMenuItems}
710 triggerKind={composerTrigger.kind}
@@ -754,9 +745,9 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
745 {/* Attachment strip — inside the card, above the text input */}
746 {isExpanded ? (
747 <Animated.View
748 + className={props.draftAttachments.length > 0 ? "pb-2.5" : undefined}
749 entering={FadeIn.duration(160)}
750 exiting={FadeOut.duration(120)}
759 - style={{ paddingBottom: props.draftAttachments.length > 0 ? 10 : 0 }}
751 >
752 <ComposerAttachmentStrip
753 attachments={props.draftAttachments}
@@ -766,7 +757,7 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
757 </Animated.View>
758 ) : null}
759
769 - <View style={isExpanded ? undefined : { flex: 1, minWidth: 0 }}>
760 + <View className={isExpanded ? undefined : "min-w-0 flex-1"}>
761 <ComposerEditor
762 ref={inputRef}
763 multiline
@@ -797,37 +788,22 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
788 textStyle={{
789 ...bodyText,
790 color: foregroundColor,
800 - fontFamily: "DMSans_400Regular",
791 }}
792 />
793 </View>
794 {!isExpanded && props.draftAttachments.length > 0 ? (
805 - <View style={{ flexDirection: "row", gap: 4, paddingLeft: 4 }}>
795 + <View className="flex-row gap-1 pl-1">
796 {props.draftAttachments.slice(0, 3).map((image) => (
797 <Pressable key={image.id} onPress={() => onPressImage(image.previewUri)}>
798 <Image
799 source={{ uri: image.previewUri }}
810 - className="bg-subtle"
811 - style={{
812 - width: 30,
813 - height: 30,
814 - borderRadius: 8,
815 - }}
800 + className="size-[30px] rounded-lg bg-subtle"
801 resizeMode="cover"
802 />
803 </Pressable>
804 ))}
805 {props.draftAttachments.length > 3 ? (
821 - <View
822 - className="bg-subtle-strong"
823 - style={{
824 - width: 30,
825 - height: 30,
826 - borderRadius: 8,
827 - alignItems: "center",
828 - justifyContent: "center",
829 - }}
830 - >
806 + <View className="size-[30px] items-center justify-center rounded-lg bg-subtle-strong">
807 <Text className="text-foreground-muted text-2xs font-t3-bold">
808 +{props.draftAttachments.length - 3}
809 </Text>
@@ -910,7 +886,7 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
886 {/* Queue count */}
887 {props.queueCount > 0 ? (
888 <Animated.View entering={FadeIn.duration(180)} exiting={FadeOut.duration(120)}>
913 - <Text className="text-xs text-foreground-muted" style={{ paddingTop: 8 }}>
889 + <Text className="pt-2 text-xs text-foreground-muted">
890 {props.queueCount} queued message{props.queueCount === 1 ? "" : "s"} will send
891 automatically.
892 </Text>
apps/mobile/src/features/threads/ThreadDetailScreen.tsx
+7 -8
@@ -193,10 +193,9 @@ const WorkingDurationPill = memo(function WorkingDurationPill(props: {
193
194 return (
195 <Animated.View
196 - className="px-4 pb-2 pt-2"
196 + className="shrink-0 px-4 pb-2 pt-2"
197 entering={FadeInDown.duration(200)}
198 exiting={FadeOut.duration(140)}
199 - style={{ flexShrink: 0 }}
199 >
200 <View className="self-start rounded-full border border-neutral-200/80 bg-neutral-50/90 px-3 py-2 dark:border-white/[0.08] dark:bg-white/[0.04]">
201 <View className="flex-row items-center gap-2">
@@ -390,7 +389,7 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
389 <View className="flex-1">
390 {showContent ? (
391 <View
393 - style={{ flex: 1 }}
392 + className="flex-1"
393 onTouchStart={handleFeedTouchStart}
394 onTouchMove={handleFeedTouchMove}
395 onTouchEnd={handleFeedTouchEnd}
@@ -419,7 +418,7 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
418 />
419 </View>
420 ) : (
422 - <View style={{ flex: 1 }} />
421 + <View className="flex-1" />
422 )}
423
424 {/* Floating composer — sticks to keyboard via KeyboardStickyView */}
@@ -431,10 +430,11 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
430 {/* No paddingTop here: the overlay's measured height becomes the
431 list's bottom inset, so any padding above the pill/composer
432 pushes the resting content floor up by the same amount. */}
434 - <View ref={composerOverlayRef} onLayout={onComposerLayout} style={{ width: "100%" }}>
433 + <View ref={composerOverlayRef} onLayout={onComposerLayout} className="w-full">
434 <Animated.View
435 + className="w-full self-center"
436 layout={LinearTransition.duration(220)}
437 - style={{ alignSelf: "center", maxWidth: contentMaxWidth, width: "100%" }}
437 + style={{ maxWidth: contentMaxWidth }}
438 >
439 {props.activeWorkStartedAt ? (
440 <WorkingDurationPill startedAt={props.activeWorkStartedAt} />
@@ -442,10 +442,9 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
442
443 {props.activePendingApproval || props.activePendingUserInput ? (
444 <Animated.View
445 - className="gap-3 px-4 pb-3"
445 + className="shrink-0 gap-3 px-4 pb-3"
446 entering={FadeInDown.duration(220)}
447 exiting={FadeOut.duration(140)}
448 - style={{ flexShrink: 0 }}
448 >
449 {props.activePendingApproval ? (
450 <PendingApprovalCard
apps/mobile/src/features/threads/ThreadFeed.tsx
+44 -53
@@ -52,6 +52,7 @@ import Animated, {
52 type SharedValue,
53 } from "react-native-reanimated";
54 import { useThemeColor } from "../../lib/useThemeColor";
55 +import { useFontFamily } from "../../lib/useFontFamily";
56 import { copyTextWithHaptic } from "../../lib/copyTextWithHaptic";
57 import {
58 hasNativeSelectableMarkdownText,
@@ -234,10 +235,6 @@ const markdownLinkStyles = StyleSheet.create({
235 favicon: {
236 borderRadius: 3,
237 },
237 - file: {
238 - fontFamily: "DMSans_700Bold",
239 - fontWeight: "700",
240 - },
238 });
239
240 const MarkdownExternalLink = memo(function MarkdownExternalLink(props: {
@@ -250,12 +247,12 @@ const MarkdownExternalLink = memo(function MarkdownExternalLink(props: {
247
248 return (
249 <NativeText
250 + className="font-sans"
251 onPress={() => {
252 void Linking.openURL(props.href);
253 }}
254 style={{
255 color: props.color,
258 - fontFamily: "DMSans_400Regular",
256 textDecorationLine: "none",
257 }}
258 >
@@ -314,6 +311,8 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
311 );
312 const colors = MARKDOWN_COLORS[colorScheme === "dark" ? "dark" : "light"];
313 const inlineSkillForeground = String(useThemeColor("--color-inline-skill-foreground"));
314 + const regularFontFamily = useFontFamily("regular");
315 + const boldFontFamily = useFontFamily("bold");
316
317 return useMemo(() => {
318 const markdownBodyColor = colors.body;
@@ -365,8 +364,8 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
364 h6: markdownFontSizes.h6,
365 },
366 fontFamilies: {
368 - regular: "DMSans_400Regular",
369 - heading: "DMSans_700Bold",
367 + regular: regularFontFamily,
368 + heading: boldFontFamily,
369 mono: "ui-monospace",
370 },
371 headingWeight: "700",
@@ -388,7 +387,7 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
387 bold: {
388 fontWeight: "700",
389 color: markdownStrongColor,
391 - fontFamily: "DMSans_700Bold",
390 + fontFamily: boldFontFamily,
391 },
392 italic: { fontStyle: "italic" },
393 link: {
@@ -404,7 +403,7 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
403 marginVertical: 10,
404 },
405 heading: {
407 - fontFamily: "DMSans_700Bold",
406 + fontFamily: boldFontFamily,
407 color: markdownStrongColor,
408 marginTop: 18,
409 marginBottom: 8,
@@ -428,8 +427,9 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
427 if (presentation.kind === "file") {
428 return (
429 <NativeText
430 + className="font-t3-bold"
431 onPress={() => onLinkPress(href)}
432 - style={[markdownLinkStyles.file, { color: inlineTextColor }]}
432 + style={{ color: inlineTextColor }}
433 >
434 <Image
435 source={markdownFileIconSource(presentation.icon)}
@@ -453,6 +453,7 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
453 const linkHref = presentation.href;
454 return (
455 <NativeText
456 + className="underline"
457 onPress={
458 linkHref
459 ? () => {
@@ -460,17 +461,14 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
461 }
462 : undefined
463 }
463 - style={{
464 - color: markdownLinkColor,
465 - textDecorationLine: "underline",
466 - }}
464 + style={{ color: markdownLinkColor }}
465 >
466 {children}
467 </NativeText>
468 );
469 },
470 list: ({ node, Renderer, ordered = false, start = 1 }) => (
473 - <View style={{ marginTop: 2, marginBottom: 8 }}>
471 + <View className="mt-0.5 mb-2">
472 {node.children?.map((child, index) => {
473 const childKey = `${child.type}:${child.beg ?? "unknown"}:${child.end ?? "unknown"}`;
474 if (child.type === "task_list_item") {
@@ -479,20 +477,13 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
477 );
478 }
479 return (
482 - <View
483 - key={childKey}
484 - style={{
485 - flexDirection: "row",
486 - alignItems: "flex-start",
487 - marginBottom: 3,
488 - }}
489 - >
480 + <View className="mb-[3px] flex-row items-start" key={childKey}>
481 <NativeText
482 + className="font-sans"
483 style={{
484 width: ordered ? 22 : 12,
485 marginRight: 5,
486 color: inlineTextColor,
495 - fontFamily: "DMSans_400Regular",
487 fontSize: markdownFontSizes.m,
488 lineHeight: markdownFontSizes.bodyLineHeight,
489 textAlign: ordered ? "right" : "center",
@@ -500,7 +491,7 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
491 >
492 {ordered ? `${start + index}.` : "•"}
493 </NativeText>
503 - <View style={{ flex: 1, minWidth: 0 }}>
494 + <View className="min-w-0 flex-1">
495 <Renderer node={child} depth={1} inListItem parentIsText={false} />
496 </View>
497 </View>
@@ -512,9 +503,9 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
503 const value = content ?? "";
504 return (
505 <NativeText
506 + className="font-mono"
507 style={{
508 color: inlineCodeTextColor,
517 - fontFamily: "ui-monospace",
509 fontSize: markdownFontSizes.codeBlockFontSize,
510 lineHeight: markdownFontSizes.bodyLineHeight,
511 }}
@@ -530,31 +521,24 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
521 : {}),
522 code_block: ({ content, language }) => (
523 <View
524 + className="my-3 overflow-hidden rounded-[10px] border"
525 style={{
526 backgroundColor: blockBackgroundColor,
535 - borderRadius: 10,
536 - borderWidth: 1,
527 borderColor: markdownHrColor,
538 - marginVertical: 12,
539 - overflow: "hidden",
528 }}
529 >
530 {language ? (
531 <View
532 + className="border-b px-3.5 py-2"
533 style={{
545 - borderBottomWidth: 1,
534 borderBottomColor: markdownHrColor,
547 - paddingHorizontal: 14,
548 - paddingVertical: 8,
535 }}
536 >
537 <NativeText
538 + className="font-mono uppercase opacity-70"
539 style={{
540 color: markdownBodyColor,
554 - fontFamily: "ui-monospace",
541 fontSize: markdownFontSizes.codeBlockFontSize,
556 - opacity: 0.7,
557 - textTransform: "uppercase",
542 }}
543 >
544 {language}
@@ -565,13 +549,13 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
549 horizontal
550 showsHorizontalScrollIndicator={false}
551 bounces={false}
568 - contentContainerStyle={{ paddingHorizontal: 14, paddingVertical: 12 }}
552 + contentContainerClassName="px-3.5 py-3"
553 >
554 <NativeText
555 selectable
556 + className="font-mono"
557 style={{
558 color: blockTextColor,
574 - fontFamily: "ui-monospace",
559 fontSize: markdownFontSizes.codeBlockFontSize,
560 lineHeight: markdownFontSizes.codeBlockLineHeight,
561 }}
@@ -601,7 +585,7 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
585 bold: {
586 fontWeight: "700",
587 color: markdownUserBodyColor,
604 - fontFamily: "DMSans_700Bold",
588 + fontFamily: boldFontFamily,
589 },
590 heading: {
591 ...baseStyles.heading,
@@ -655,9 +639,9 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
639 fontSize: nativeMarkdownTypography.fontSize,
640 lineHeight: nativeMarkdownTypography.lineHeight,
641 headingFontSizes: nativeMarkdownTypography.headingFontSizes,
658 - fontFamily: "DMSans_400Regular",
659 - headingFontFamily: "DMSans_700Bold",
660 - boldFontFamily: "DMSans_700Bold",
642 + fontFamily: regularFontFamily,
643 + headingFontFamily: boldFontFamily,
644 + boldFontFamily,
645 },
646 },
647 assistant: {
@@ -686,13 +670,21 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
670 fontSize: nativeMarkdownTypography.fontSize,
671 lineHeight: nativeMarkdownTypography.lineHeight,
672 headingFontSizes: nativeMarkdownTypography.headingFontSizes,
689 - fontFamily: "DMSans_400Regular",
690 - headingFontFamily: "DMSans_700Bold",
691 - boldFontFamily: "DMSans_700Bold",
673 + fontFamily: regularFontFamily,
674 + headingFontFamily: boldFontFamily,
675 + boldFontFamily,
676 },
677 },
678 };
695 - }, [colors, inlineSkillForeground, markdownFontSizes, nativeMarkdownTypography, onLinkPress]);
679 + }, [
680 + boldFontFamily,
681 + colors,
682 + inlineSkillForeground,
683 + markdownFontSizes,
684 + nativeMarkdownTypography,
685 + onLinkPress,
686 + regularFontFamily,
687 + ]);
688 }
689
690 function renderFeedEntry(
@@ -1019,11 +1011,10 @@ const ReviewCommentCard = memo(function ReviewCommentCard(props: {
1011
1012 return (
1013 <View
1022 - className="w-full overflow-hidden rounded-[16px] border"
1014 + className="w-full overflow-hidden rounded-[16px] border border-continuous"
1015 style={{
1016 backgroundColor: props.colors.background,
1017 borderColor: props.colors.border,
1026 - borderCurve: "continuous",
1018 }}
1019 >
1020 <View
@@ -1031,8 +1022,8 @@ const ReviewCommentCard = memo(function ReviewCommentCard(props: {
1022 style={{ borderColor: props.colors.border }}
1023 >
1024 <View
1034 - className="size-6 items-center justify-center rounded-[7px]"
1035 - style={{ backgroundColor: props.colors.mutedBackground, borderCurve: "continuous" }}
1025 + className="size-6 items-center justify-center rounded-[7px] border-continuous"
1026 + style={{ backgroundColor: props.colors.mutedBackground }}
1027 >
1028 <SymbolView
1029 name="doc.text"
@@ -1085,9 +1076,9 @@ const ReviewCommentCard = memo(function ReviewCommentCard(props: {
1076 >
1077 <NativeText
1078 selectable
1079 + className="font-mono"
1080 style={{
1081 color: props.colors.text,
1090 - fontFamily: "ui-monospace",
1082 fontSize: codeSurface.fontSize,
1083 lineHeight: codeSurface.rowHeight,
1084 }}
@@ -1559,8 +1550,8 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
1550
1551 return (
1552 <>
1562 - <View style={{ flex: 1 }} onLayout={handleViewportLayout}>
1563 - <View style={{ flex: 1 }}>
1553 + <View className="flex-1" onLayout={handleViewportLayout}>
1554 + <View className="flex-1">
1555 <KeyboardAwareLegendList
1556 ref={props.listRef}
1557 // The empty↔filled key remounts the list when messages first
apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
+27 -107
@@ -97,8 +97,6 @@ function SidebarHeaderButtonGroup(props: {
97
98 const SIDEBAR_STICKY_HEADER_HEIGHT = 106;
99 const SIDEBAR_STICKY_HEADER_FADE_HEIGHT = 44;
100 -const IOS_SEARCH_FILL_DARK = "rgba(118, 118, 128, 0.24)";
101 -const IOS_SEARCH_FILL_LIGHT = "rgba(118, 118, 128, 0.12)";
100 const SIDEBAR_HEADER_WASH_OPACITY = {
101 dark: [0.22, 0.14, 0.04],
102 light: [0.46, 0.3, 0.08],
@@ -140,15 +138,13 @@ function NativeSidebarContainer(props: ThreadNavigationSidebarProps) {
138 return (
139 <View
140 testID="thread-navigation-sidebar"
143 - style={[
144 - styles.container,
145 - {
146 - width: props.width,
147 - backgroundColor,
148 - borderRightColor: borderColor,
149 - borderRightWidth: StyleSheet.hairlineWidth,
150 - },
151 - ]}
141 + className="flex-1"
142 + style={{
143 + width: props.width,
144 + backgroundColor,
145 + borderRightColor: borderColor,
146 + borderRightWidth: StyleSheet.hairlineWidth,
147 + }}
148 >
149 <SidebarNavigationShell>
150 <ThreadNavigationSidebarPane {...props} nativeChrome />
@@ -338,11 +334,8 @@ function ThreadNavigationSidebarPane(
334
335 const backgroundColor = useThemeColor("--color-drawer");
336 const borderColor = useThemeColor("--color-border");
341 - const foregroundColor = useThemeColor("--color-foreground");
337 const mutedColor = useThemeColor("--color-foreground-muted");
338 const placeholderColor = useThemeColor("--color-placeholder");
344 - const searchBackgroundColor =
345 - colorScheme === "dark" ? IOS_SEARCH_FILL_DARK : IOS_SEARCH_FILL_LIGHT;
339 const headerFadeColor = String(backgroundColor);
340 const headerWashOpacity = SIDEBAR_HEADER_WASH_OPACITY[colorScheme];
341 const [measuredHeaderHeight, setMeasuredHeaderHeight] = useState<number | null>(null);
@@ -532,7 +525,7 @@ function ThreadNavigationSidebarPane(
525 [filterIcon, filterMenu, props.onOpenSettings],
526 );
527 const listEmpty = (
535 - <Text className="px-2 py-4 text-sm" style={{ color: mutedColor }}>
528 + <Text className="px-2 py-4 text-sm text-foreground-muted">
529 {catalogState.isLoadingConnections
530 ? "Loading threads…"
531 : props.searchQuery.trim().length > 0
@@ -566,7 +559,7 @@ function ThreadNavigationSidebarPane(
559 unstable_headerRightItems: () => nativeHeaderItems,
560 }}
561 />
569 - <View style={styles.container}>
562 + <View className="flex-1">
563 <SwipeableScrollGateProvider enabled={swipeEnabled}>
564 <GestureDetector gesture={sidebarScrollGesture}>
565 <LegendList
@@ -596,7 +589,7 @@ function ThreadNavigationSidebarPane(
589 style={styles.threadList}
590 ListHeaderComponent={
591 showsConnectionStatus ? (
599 - <View style={styles.connectionStatusNative}>
592 + <View className="px-1.5 pt-0.5 pb-2">
593 <WorkspaceConnectionStatus
594 onPress={props.onOpenEnvironmentSettings}
595 state={catalogState}
@@ -617,17 +610,15 @@ function ThreadNavigationSidebarPane(
610 return (
611 <View
612 testID="thread-navigation-sidebar"
620 - style={[
621 - styles.container,
622 - {
623 - width: props.width,
624 - backgroundColor,
625 - borderRightColor: borderColor,
626 - borderRightWidth: StyleSheet.hairlineWidth,
627 - },
628 - ]}
613 + className="flex-1"
614 + style={{
615 + width: props.width,
616 + backgroundColor,
617 + borderRightColor: borderColor,
618 + borderRightWidth: StyleSheet.hairlineWidth,
619 + }}
620 >
630 - <View style={{ flex: 1, paddingBottom: insets.bottom }}>
621 + <View className="flex-1" style={{ paddingBottom: insets.bottom }}>
622 <SwipeableScrollGateProvider enabled={swipeEnabled}>
623 <GestureDetector gesture={sidebarScrollGesture}>
624 <LegendList
@@ -660,25 +651,17 @@ function ThreadNavigationSidebarPane(
651 </View>
652
653 <View
654 + className="absolute inset-x-0 top-0 z-[4]"
655 onLayout={handleStickyHeaderLayout}
656 pointerEvents="box-none"
665 - style={[
666 - styles.stickyHeader,
667 - {
668 - paddingTop: insets.top,
669 - },
670 - ]}
657 + style={{ paddingTop: insets.top }}
658 >
659 <View
660 + className="absolute inset-x-0 top-0"
661 pointerEvents="none"
662 accessibilityElementsHidden
663 importantForAccessibility="no-hide-descendants"
676 - style={[
677 - styles.stickyHeaderWash,
678 - {
679 - height: stickyHeaderHeight + SIDEBAR_STICKY_HEADER_FADE_HEIGHT,
680 - },
681 - ]}
664 + style={{ height: stickyHeaderHeight + SIDEBAR_STICKY_HEADER_FADE_HEIGHT }}
665 >
666 <Svg width="100%" height="100%">
667 <Defs>
@@ -704,12 +687,8 @@ function ThreadNavigationSidebarPane(
687 <Rect width="100%" height="100%" fill="url(#sidebar-header-wash)" />
688 </Svg>
689 </View>
707 - <View style={styles.header}>
708 - <Text
709 - className="flex-1 text-[34px] font-t3-bold"
710 - numberOfLines={1}
711 - style={{ color: foregroundColor }}
712 - >
690 + <View className="h-[50px] flex-row items-end gap-0.5 pr-2 pl-5">
691 + <Text className="flex-1 text-[34px] font-t3-bold text-foreground" numberOfLines={1}>
692 Threads
693 </Text>
694 <SidebarHeaderButtonGroup colorScheme={colorScheme}>
@@ -724,14 +703,7 @@ function ThreadNavigationSidebarPane(
703 </SidebarHeaderButtonGroup>
704 </View>
705
727 - <View
728 - style={[
729 - styles.searchField,
730 - {
731 - backgroundColor: searchBackgroundColor,
732 - },
733 - ]}
734 - >
706 + <View className="mx-4 mt-[9px] h-[38px] flex-row items-center gap-1.5 rounded-xl bg-sidebar-search pr-2.5 pl-[11px]">
707 <SymbolView name="magnifyingglass" size={15} tintColor={mutedColor} type="monochrome" />
708 <TextInput
709 ref={searchInputRef}
@@ -743,14 +715,13 @@ function ThreadNavigationSidebarPane(
715 placeholder="Search"
716 placeholderTextColor={placeholderColor}
717 returnKeyType="search"
746 - className="text-base"
747 - style={[styles.searchInput, { color: foregroundColor }]}
718 + className="h-[34px] flex-1 px-0 py-0 font-sans text-base text-foreground"
719 value={props.searchQuery}
720 />
721 </View>
722
723 {showsConnectionStatus ? (
753 - <View style={styles.connectionStatus}>
724 + <View className="px-3.5 pt-2.5">
725 <WorkspaceConnectionStatus
726 onPress={props.onOpenEnvironmentSettings}
727 state={catalogState}
@@ -764,63 +735,12 @@ function ThreadNavigationSidebarPane(
735 }
736
737 const styles = StyleSheet.create({
767 - container: {
768 - flex: 1,
769 - },
770 - stickyHeader: {
771 - left: 0,
772 - position: "absolute",
773 - right: 0,
774 - top: 0,
775 - zIndex: 4,
776 - },
777 - stickyHeaderWash: {
778 - left: 0,
779 - position: "absolute",
780 - right: 0,
781 - top: 0,
782 - },
783 - header: {
784 - height: 50,
785 - paddingLeft: 20,
786 - paddingRight: 8,
787 - flexDirection: "row",
788 - alignItems: "flex-end",
789 - gap: 2,
790 - },
738 headerButtonGroup: {
739 alignItems: "center",
740 borderRadius: 22,
741 flexDirection: "row",
742 overflow: "hidden",
743 },
797 - connectionStatus: {
798 - paddingTop: 10,
799 - paddingHorizontal: 14,
800 - },
801 - connectionStatusNative: {
802 - paddingBottom: 8,
803 - paddingHorizontal: 6,
804 - paddingTop: 2,
805 - },
806 - searchField: {
807 - height: 38,
808 - marginTop: 9,
809 - marginHorizontal: 16,
810 - paddingLeft: 11,
811 - paddingRight: 10,
812 - borderRadius: 12,
813 - flexDirection: "row",
814 - alignItems: "center",
815 - gap: 6,
816 - },
817 - searchInput: {
818 - flex: 1,
819 - height: 34,
820 - paddingVertical: 0,
821 - paddingHorizontal: 0,
822 - fontFamily: "DMSans_400Regular",
823 - },
744 threadList: {
745 flex: 1,
746 },
apps/mobile/src/features/threads/git/GitBranchesSheet.tsx
+11 -45
@@ -3,9 +3,9 @@ import { useNavigation, type StaticScreenProps } from "@react-navigation/native"
3 import { useState } from "react";
4 import { Pressable, ScrollView, View } from "react-native";
5 import { useSafeAreaInsets } from "react-native-safe-area-context";
6 -import { useThemeColor } from "../../../lib/useThemeColor";
6
7 import { AppText as Text, AppTextInput as TextInput } from "../../../components/AppText";
8 +import { cn } from "../../../lib/cn";
9 import { useEnvironmentQuery } from "../../../state/query";
10 import { useThreadSelection } from "../../../state/use-thread-selection";
11 import { useSelectedThreadGitActions } from "../../../state/use-selected-thread-git-actions";
@@ -27,12 +27,6 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
27 const gitState = useSelectedThreadGitState();
28 const gitActions = useSelectedThreadGitActions();
29
30 - const borderColor = useThemeColor("--color-border");
31 - const inputBorderColor = useThemeColor("--color-input-border");
32 - const inputBg = useThemeColor("--color-input");
33 - const foregroundColor = useThemeColor("--color-foreground");
34 - const subtleStrongColor = useThemeColor("--color-subtle-strong");
35 -
30 const gitStatus = useEnvironmentQuery(
31 selectedThread !== null && selectedThreadCwd !== null
32 ? vcsEnvironment.status({
@@ -73,23 +67,14 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
67 }}
68 >
69 <View className="gap-2 rounded-[18px] border border-border bg-card px-4 py-4">
76 - <Text
77 - className="text-foreground-secondary text-2xs font-t3-bold uppercase"
78 - style={{ letterSpacing: 1 }}
79 - >
70 + <Text className="text-foreground-secondary text-2xs font-t3-bold tracking-[1px] uppercase">
71 New branch
72 </Text>
73 <TextInput
74 value={newBranchName}
75 onChangeText={setNewBranchName}
76 placeholder="feature/mobile-polish"
86 - className="rounded-[18px] px-3.5 py-3 font-sans text-base"
87 - style={{
88 - borderWidth: 1,
89 - borderColor: inputBorderColor,
90 - backgroundColor: inputBg,
91 - color: foregroundColor,
92 - }}
77 + className="rounded-[18px]"
78 />
79 <SheetActionButton
80 icon="plus"
@@ -108,35 +93,20 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
93 </View>
94
95 <View className="gap-2 rounded-[18px] border border-border bg-card px-4 py-4">
111 - <Text
112 - className="text-foreground-secondary text-2xs font-t3-bold uppercase"
113 - style={{ letterSpacing: 1 }}
114 - >
96 + <Text className="text-foreground-secondary text-2xs font-t3-bold tracking-[1px] uppercase">
97 New worktree
98 </Text>
99 <TextInput
100 value={worktreeBaseBranch}
101 onChangeText={setWorktreeBaseBranch}
102 placeholder="main"
121 - className="rounded-[18px] px-3.5 py-3 font-sans text-base"
122 - style={{
123 - borderWidth: 1,
124 - borderColor: inputBorderColor,
125 - backgroundColor: inputBg,
126 - color: foregroundColor,
127 - }}
103 + className="rounded-[18px]"
104 />
105 <TextInput
106 value={worktreeBranchName}
107 onChangeText={setWorktreeBranchName}
108 placeholder="feature/mobile-thread"
133 - className="rounded-[18px] px-3.5 py-3 font-sans text-base"
134 - style={{
135 - borderWidth: 1,
136 - borderColor: inputBorderColor,
137 - backgroundColor: inputBg,
138 - color: foregroundColor,
139 - }}
109 + className="rounded-[18px]"
110 />
111 <SheetActionButton
112 icon="square.split.2x1"
@@ -158,10 +128,7 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
128 </View>
129
130 <View className="gap-2">
161 - <Text
162 - className="text-foreground-secondary text-2xs font-t3-bold uppercase"
163 - style={{ letterSpacing: 1 }}
164 - >
131 + <Text className="text-foreground-secondary text-2xs font-t3-bold tracking-[1px] uppercase">
132 Existing branches
133 </Text>
134 {branchesLoading ? (
@@ -185,12 +152,11 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
152 return (
153 <Pressable
154 key={branch.name}
188 - className="gap-1 rounded-[18px] border px-4 py-3"
155 + className={cn(
156 + "gap-1 rounded-[18px] border px-4 py-3 disabled:opacity-[0.45]",
157 + branch.current ? "border-subtle-strong" : "border-border",
158 + )}
159 disabled={busy || disabled}
190 - style={{
191 - borderColor: branch.current ? subtleStrongColor : borderColor,
192 - opacity: busy || disabled ? 0.45 : 1,
193 - }}
160 onPress={() => {
161 void gitActions.onCheckoutSelectedThreadBranch(branch.name).then(() => {
162 navigation.goBack();
apps/mobile/src/features/threads/git/GitCommitSheet.tsx
+12 -35
@@ -1,10 +1,10 @@
1 import { useNavigation, type StaticScreenProps } from "@react-navigation/native";
2 import { useCallback, useState } from "react";
3 -import { Pressable, ScrollView, View, useColorScheme } from "react-native";
3 +import { Pressable, ScrollView, View } from "react-native";
4 import { useSafeAreaInsets } from "react-native-safe-area-context";
5 -import { useThemeColor } from "../../../lib/useThemeColor";
5
6 import { AppText as Text, AppTextInput as TextInput } from "../../../components/AppText";
7 +import { cn } from "../../../lib/cn";
8 import { useEnvironmentQuery } from "../../../state/query";
9 import { useThreadSelection } from "../../../state/use-thread-selection";
10 import { useSelectedThreadGitActions } from "../../../state/use-selected-thread-git-actions";
@@ -21,18 +21,11 @@ type GitCommitSheetProps = StaticScreenProps<{
21 export function GitCommitSheet(_props: GitCommitSheetProps) {
22 const navigation = useNavigation();
23 const insets = useSafeAreaInsets();
24 - const isDarkMode = useColorScheme() === "dark";
24 const { selectedThread } = useThreadSelection();
25 const { selectedThreadCwd } = useSelectedThreadWorktree();
26 const gitState = useSelectedThreadGitState();
27 const gitActions = useSelectedThreadGitActions();
28
30 - const borderColor = useThemeColor("--color-border");
31 - const borderSubtleColor = useThemeColor("--color-border-subtle");
32 - const inputBorderColor = useThemeColor("--color-input-border");
33 - const inputBg = useThemeColor("--color-input");
34 - const foregroundColor = useThemeColor("--color-foreground");
35 -
29 const gitStatus = useEnvironmentQuery(
30 selectedThread !== null && selectedThreadCwd !== null
31 ? vcsEnvironment.status({
@@ -90,10 +83,7 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
83 </Text>
84 </View>
85 {isDefaultRef ? (
93 - <Text
94 - className="text-xs leading-normal"
95 - style={{ color: isDarkMode ? "#fbbf24" : "#b45309" }}
96 - >
86 + <Text className="text-xs leading-normal text-amber-700 dark:text-amber-400">
87 Warning: this is the default branch.
88 </Text>
89 ) : null}
@@ -138,12 +128,8 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
128 <Text className="text-foreground flex-1 text-sm font-medium" numberOfLines={1}>
129 {file.path}
130 </Text>
141 - <Text className="text-xs font-t3-bold" style={{ color: "#10b981" }}>
142 - +{file.insertions}
143 - </Text>
144 - <Text className="text-xs font-t3-bold" style={{ color: "#f43f5e" }}>
145 - -{file.deletions}
146 - </Text>
131 + <Text className="text-xs font-t3-bold text-emerald-500">+{file.insertions}</Text>
132 + <Text className="text-xs font-t3-bold text-rose-500">-{file.deletions}</Text>
133 </View>
134 ))}
135 {selectedFiles.length > selectedFilePreview.length ? (
@@ -159,10 +145,10 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
145 return (
146 <Pressable
147 key={file.path}
162 - className="rounded-[18px] border px-4 py-3"
163 - style={{
164 - borderColor: included ? borderColor : borderSubtleColor,
165 - }}
148 + className={cn(
149 + "rounded-[18px] border px-4 py-3",
150 + included ? "border-border" : "border-border-subtle",
151 + )}
152 onPress={() => {
153 setExcludedFiles((current) => {
154 const next = new Set(current);
@@ -193,12 +179,10 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
179 ) : null}
180 </View>
181 <View className="items-end gap-1">
196 - <Text className="text-xs font-t3-bold" style={{ color: "#10b981" }}>
182 + <Text className="text-xs font-t3-bold text-emerald-500">
183 +{file.insertions}
184 </Text>
199 - <Text className="text-xs font-t3-bold" style={{ color: "#f43f5e" }}>
200 - -{file.deletions}
201 - </Text>
185 + <Text className="text-xs font-t3-bold text-rose-500">-{file.deletions}</Text>
186 </View>
187 </View>
188 </Pressable>
@@ -216,14 +200,7 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
200 onChangeText={setDialogCommitMessage}
201 placeholder="Leave empty to auto-generate"
202 textAlignVertical="top"
219 - className="min-h-[128px] rounded-[20px] px-4 py-3.5 font-sans text-base"
220 - style={{
221 - minHeight: 128,
222 - borderWidth: 1,
223 - borderColor: inputBorderColor,
224 - backgroundColor: inputBg,
225 - color: foregroundColor,
226 - }}
203 + className="min-h-[128px] rounded-[20px] px-4 py-3.5"
204 />
205 </View>
206
apps/mobile/src/features/threads/git/GitConfirmSheet.tsx
+3 -9
@@ -101,13 +101,10 @@ export function GitConfirmSheet(props: GitConfirmSheetProps) {
101
102 return (
103 <View collapsable={false} className="flex-1 bg-sheet">
104 - <View style={{ minHeight: 16, paddingTop: 8 }} />
104 + <View className="min-h-4 pt-2" />
105
106 <View className="items-center gap-1 px-5 pb-3 pt-4">
107 - <Text
108 - className="text-xs font-t3-bold uppercase text-foreground-muted"
109 - style={{ letterSpacing: 1 }}
110 - >
107 + <Text className="text-xs font-t3-bold tracking-[1px] uppercase text-foreground-muted">
108 Confirm
109 </Text>
110 <Text className="text-center text-3xl font-t3-bold">
@@ -118,10 +115,7 @@ export function GitConfirmSheet(props: GitConfirmSheetProps) {
115 </Text>
116 </View>
117
121 - <View
122 - className="gap-3 px-5"
123 - style={{ paddingBottom: Math.max(insets.bottom, 18) + 8, paddingTop: 8 }}
124 - >
118 + <View className="gap-3 px-5 pt-2" style={{ paddingBottom: Math.max(insets.bottom, 18) + 8 }}>
119 <SheetActionButton
120 icon="arrow.right.circle"
121 label={copy?.continueLabel ?? "Continue"}
apps/mobile/src/features/threads/git/GitOverviewSheet.tsx
+11 -14
@@ -47,7 +47,6 @@ export function GitOverviewSheet(props: GitOverviewSheetProps) {
47 const gitActions = useSelectedThreadGitActions();
48
49 const iconColor = useThemeColor("--color-icon");
50 - const borderColor = useThemeColor("--color-border");
50 const foregroundColor = String(useThemeColor("--color-foreground"));
51 const sheetColor = String(useThemeColor("--color-sheet"));
52
@@ -205,9 +204,9 @@ export function GitOverviewSheet(props: GitOverviewSheetProps) {
204
205 const content = (
206 <ScrollView
207 + className="flex-1 bg-screen"
208 contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"}
209 showsVerticalScrollIndicator={false}
210 - style={{ flex: 1, backgroundColor: sheetColor }}
210 contentInset={{ bottom: Math.max(insets.bottom, 18) + 18 }}
211 contentContainerStyle={{
212 paddingHorizontal: isInspector ? 12 : 20,
@@ -227,9 +226,7 @@ export function GitOverviewSheet(props: GitOverviewSheetProps) {
226 >
227 {sheetMenuItems.map(({ item, disabledReason }, index) => (
228 <View key={`${item.id}-${item.label}`}>
230 - {index > 0 ? (
231 - <View className="ml-12 h-px" style={{ backgroundColor: borderColor }} />
232 - ) : null}
229 + {index > 0 ? <View className="ml-12 h-px bg-border" /> : null}
230 <SheetListRow
231 icon={menuItemIconName(item.icon)}
232 title={item.label}
@@ -241,7 +238,7 @@ export function GitOverviewSheet(props: GitOverviewSheetProps) {
238 ))}
239 {behindCount > 0 ? (
240 <>
244 - <View className="ml-12 h-px" style={{ backgroundColor: borderColor }} />
241 + <View className="ml-12 h-px bg-border" />
242 <SheetListRow
243 icon="arrow.down.circle"
244 title="Pull latest"
@@ -251,7 +248,7 @@ export function GitOverviewSheet(props: GitOverviewSheetProps) {
248 />
249 </>
250 ) : null}
254 - <View className="ml-12 h-px" style={{ backgroundColor: borderColor }} />
251 + <View className="ml-12 h-px bg-border" />
252 <SheetListRow
253 icon="text.bubble"
254 title="Review changes"
@@ -259,7 +256,7 @@ export function GitOverviewSheet(props: GitOverviewSheetProps) {
256 disabled={busy || !isRepo}
257 onPress={() => navigation.navigate("ThreadReview", { environmentId, threadId })}
258 />
262 - <View className="ml-12 h-px" style={{ backgroundColor: borderColor }} />
259 + <View className="ml-12 h-px bg-border" />
260 <SheetListRow
261 icon="point.topleft.down.curvedto.point.bottomright.up"
262 title="Branches & worktrees"
@@ -365,8 +362,11 @@ export function GitOverviewSheet(props: GitOverviewSheetProps) {
362 }
363 >
364 <Pressable
368 - className="absolute right-3 top-4 h-9 w-9 items-center justify-center rounded-full bg-subtle"
369 - style={{ zIndex: 1, opacity: busy ? 0.45 : 1 }}
365 + className={
366 + busy
367 + ? "absolute right-3 top-4 z-[1] h-9 w-9 items-center justify-center rounded-full bg-subtle opacity-[0.45]"
368 + : "absolute right-3 top-4 z-[1] h-9 w-9 items-center justify-center rounded-full bg-subtle"
369 + }
370 disabled={busy}
371 onPress={() => void gitActions.refreshSelectedThreadGitStatus()}
372 >
@@ -378,10 +378,7 @@ export function GitOverviewSheet(props: GitOverviewSheetProps) {
378 weight="medium"
379 />
380 </Pressable>
381 - <Text
382 - className="text-xs font-t3-bold uppercase text-foreground-muted"
383 - style={{ letterSpacing: 1 }}
384 - >
381 + <Text className="text-xs font-t3-bold tracking-[1px] uppercase text-foreground-muted">
382 {isInspector ? "Repository" : "Branch"}
383 </Text>
384 <Text className={isInspector ? "pr-10 text-xl font-t3-bold" : "text-3xl font-t3-bold"}>
apps/mobile/src/features/threads/git/gitSheetComponents.tsx
+21 -39
@@ -3,6 +3,7 @@ import type { ComponentProps } from "react";
3 import { Pressable, View } from "react-native";
4 import { useThemeColor } from "../../../lib/useThemeColor";
5 import { AppText as Text } from "../../../components/AppText";
6 +import { cn } from "../../../lib/cn";
7
8 /* ─── Shared sheet components ──────────────────────────────────────── */
9
@@ -13,51 +14,36 @@ export function SheetActionButton(props: {
14 readonly tone?: "primary" | "secondary" | "danger";
15 readonly onPress: () => void;
16 }) {
16 - const primaryBg = useThemeColor("--color-primary");
17 const primaryFg = useThemeColor("--color-primary-foreground");
18 - const dangerBg = useThemeColor("--color-danger");
19 - const dangerBorder = useThemeColor("--color-danger-border");
18 const dangerFg = useThemeColor("--color-danger-foreground");
21 - const secondaryBg = useThemeColor("--color-secondary");
22 - const secondaryBorder = useThemeColor("--color-secondary-border");
19 const secondaryFg = useThemeColor("--color-secondary-foreground");
20
21 const tone = props.tone ?? "secondary";
26 - const colors =
27 - tone === "primary"
28 - ? {
29 - backgroundColor: primaryBg,
30 - borderColor: "transparent",
31 - textColor: primaryFg,
32 - }
33 - : tone === "danger"
34 - ? {
35 - backgroundColor: dangerBg,
36 - borderColor: dangerBorder,
37 - textColor: dangerFg,
38 - }
39 - : {
40 - backgroundColor: secondaryBg,
41 - borderColor: secondaryBorder,
42 - textColor: secondaryFg,
43 - };
22 + const textColor = tone === "primary" ? primaryFg : tone === "danger" ? dangerFg : secondaryFg;
23
24 return (
25 <Pressable
47 - className="min-h-[48px] flex-1 flex-row items-center justify-center gap-2 rounded-[18px] px-4 py-3"
26 + className={cn(
27 + "min-h-[48px] flex-1 flex-row items-center justify-center gap-2 rounded-[18px] px-4 py-3 disabled:opacity-[0.45]",
28 + tone === "primary"
29 + ? "bg-primary"
30 + : tone === "danger"
31 + ? "border border-danger-border bg-danger"
32 + : "border border-secondary-border bg-secondary",
33 + )}
34 disabled={props.disabled}
49 - style={{
50 - backgroundColor: colors.backgroundColor,
51 - borderWidth: tone === "primary" ? 0 : 1,
52 - borderColor: colors.borderColor,
53 - opacity: props.disabled ? 0.45 : 1,
54 - }}
35 onPress={props.onPress}
36 >
57 - <SymbolView name={props.icon} size={16} tintColor={colors.textColor} type="monochrome" />
37 + <SymbolView name={props.icon} size={16} tintColor={textColor} type="monochrome" />
38 <Text
59 - className="text-xs font-t3-bold uppercase"
60 - style={{ color: colors.textColor, letterSpacing: 0.9 }}
39 + className={cn(
40 + "text-xs font-t3-bold tracking-[0.9px] uppercase",
41 + tone === "primary"
42 + ? "text-primary-foreground"
43 + : tone === "danger"
44 + ? "text-danger-foreground"
45 + : "text-secondary-foreground",
46 + )}
47 >
48 {props.label}
49 </Text>
@@ -68,10 +54,7 @@ export function SheetActionButton(props: {
54 export function MetaCard(props: { readonly label: string; readonly value: string }) {
55 return (
56 <View className="rounded-[18px] border border-border bg-card px-4 py-3">
71 - <Text
72 - className="text-foreground-muted text-2xs font-t3-bold uppercase"
73 - style={{ letterSpacing: 0.9 }}
74 - >
57 + <Text className="text-foreground-muted text-2xs font-t3-bold tracking-[0.9px] uppercase">
58 {props.label}
59 </Text>
60 <Text selectable className="text-foreground text-sm font-medium" numberOfLines={1}>
@@ -93,9 +76,8 @@ export function SheetListRow(props: {
76
77 return (
78 <Pressable
96 - className="flex-row items-center gap-3 px-1 py-3"
79 + className="flex-row items-center gap-3 px-1 py-3 disabled:opacity-[0.45]"
80 disabled={props.disabled}
98 - style={{ opacity: props.disabled ? 0.45 : 1 }}
81 onPress={props.onPress}
82 >
83 <View className="bg-subtle h-9 w-9 items-center justify-center rounded-full">
apps/mobile/src/features/threads/sidebar-filter-button.tsx
+2 -15
@@ -22,16 +22,17 @@ export function SidebarFilterButton(props: {
22
23 return (
24 <Pressable
25 + className="h-11 w-[50px] cursor-pointer items-center justify-center rounded-[22px]"
26 accessibilityLabel={props.accessibilityLabel}
27 accessibilityRole="button"
28 hitSlop={4}
29 style={({ pressed }) => [
29 - styles.button,
30 props.grouped
31 ? { backgroundColor: pressed ? pressedBackgroundColor : "transparent", borderWidth: 0 }
32 : {
33 backgroundColor: pressed ? pressedBackgroundColor : idleBackgroundColor,
34 borderColor,
35 + borderWidth: StyleSheet.hairlineWidth,
36 },
37 ]}
38 >
@@ -39,17 +40,3 @@ export function SidebarFilterButton(props: {
40 </Pressable>
41 );
42 }
42 -
43 -const styles = StyleSheet.create({
44 - button: {
45 - // Match the native glass UIBarButtonItem group metrics (~50pt slots,
46 - // 44pt bar height, label-colored ~20pt glyphs).
47 - width: 50,
48 - height: 44,
49 - borderRadius: 22,
50 - borderWidth: StyleSheet.hairlineWidth,
51 - alignItems: "center",
52 - justifyContent: "center",
53 - cursor: "pointer",
54 - },
55 -});
apps/mobile/src/features/threads/sidebar-header-actions.tsx
+3 -19
@@ -24,17 +24,18 @@ function FallbackHeaderButton(props: {
24
25 return (
26 <Pressable
27 + className="h-11 w-[50px] items-center justify-center rounded-[22px]"
28 accessibilityLabel={props.accessibilityLabel}
29 accessibilityRole="button"
30 hitSlop={4}
31 onPress={props.onPress}
32 style={({ pressed }) => [
32 - styles.button,
33 props.grouped
34 ? { backgroundColor: pressed ? pressedBackgroundColor : "transparent", borderWidth: 0 }
35 : {
36 backgroundColor: pressed ? pressedBackgroundColor : idleBackgroundColor,
37 borderColor,
38 + borderWidth: StyleSheet.hairlineWidth,
39 },
40 ]}
41 >
@@ -45,7 +46,7 @@ function FallbackHeaderButton(props: {
46
47 export function SidebarHeaderActions(props: SidebarHeaderActionsProps) {
48 return (
48 - <View style={styles.actions}>
49 + <View className="flex-row items-center gap-0.5">
50 <FallbackHeaderButton
51 accessibilityLabel="Open settings"
52 grouped={props.grouped}
@@ -55,20 +56,3 @@ export function SidebarHeaderActions(props: SidebarHeaderActionsProps) {
56 </View>
57 );
58 }
58 -
59 -const styles = StyleSheet.create({
60 - actions: {
61 - flexDirection: "row",
62 - alignItems: "center",
63 - gap: 2,
64 - },
65 - button: {
66 - // Match the native glass UIBarButtonItem group metrics.
67 - width: 50,
68 - height: 44,
69 - borderRadius: 22,
70 - borderWidth: StyleSheet.hairlineWidth,
71 - alignItems: "center",
72 - justifyContent: "center",
73 - },
74 -});
apps/mobile/src/features/threads/thread-inspector-content-stack.tsx
+1 -1
@@ -75,7 +75,7 @@ export function ThreadInspectorContentStack(props: {
75 const Route = props.Route;
76
77 return (
78 - <View style={{ flex: 1 }}>
78 + <View className="flex-1">
79 <InspectorContentPane
80 mounted={mountedModes.has("files") || props.mode === "files"}
81 visible={props.mode === "files"}
apps/mobile/src/features/threads/thread-list-items.tsx
+32 -49
@@ -12,6 +12,7 @@ import type { SwipeableMethods } from "react-native-gesture-handler/ReanimatedSw
12 import { AppText as Text } from "../../components/AppText";
13 import { ControlPillMenu } from "../../components/ControlPill";
14 import { ProjectFavicon } from "../../components/ProjectFavicon";
15 +import { cn } from "../../lib/cn";
16 import { relativeTime } from "../../lib/time";
17 import { useThemeColor } from "../../lib/useThemeColor";
18 import type { PendingNewTask } from "../../state/use-pending-new-tasks";
@@ -101,10 +102,9 @@ export const ThreadListGroupHeader = memo(function ThreadListGroupHeader(props:
102 <Text
103 className={
104 compact
104 - ? "flex-shrink text-base font-t3-bold text-foreground-muted"
105 - : "flex-shrink text-sm font-t3-bold text-foreground-muted"
105 + ? "flex-shrink text-base font-t3-bold tracking-[0.2px] text-foreground-muted"
106 + : "flex-shrink text-sm font-t3-bold tracking-[0.2px] text-foreground-muted"
107 }
107 - style={{ letterSpacing: 0.2 }}
108 numberOfLines={1}
109 >
110 {props.title}
@@ -236,7 +236,6 @@ export const PendingTaskListRow = memo(function PendingTaskListRow(props: {
236 const compact = props.variant === "compact";
237 const separatorColor = useThemeColor("--color-separator");
238 const iconSubtleColor = useThemeColor("--color-icon-subtle");
239 - const foregroundColor = useThemeColor("--color-foreground");
239 const mutedColor = useThemeColor("--color-foreground-muted");
240 const pressedBackgroundColor = useThemeColor("--color-subtle");
241
@@ -254,17 +253,14 @@ export const PendingTaskListRow = memo(function PendingTaskListRow(props: {
253 );
254
255 const statusPill = (
257 - <View
258 - className="bg-zinc-500/12 dark:bg-zinc-500/16"
259 - style={{ borderRadius: 99, paddingHorizontal: 6, paddingVertical: 2 }}
260 - >
256 + <View className="rounded-full bg-zinc-500/12 px-1.5 py-0.5 dark:bg-zinc-500/16">
257 <Text className="text-3xs font-t3-bold text-zinc-600 dark:text-zinc-300">Pending</Text>
258 </View>
259 );
260
261 const subtitleRow =
262 subtitleParts.length > 0 ? (
267 - <View className="flex-row items-center gap-1.5" style={{ marginTop: 1 }}>
263 + <View className="mt-px flex-row items-center gap-1.5">
264 <SymbolView
265 name="tray.and.arrow.up"
266 size={10}
@@ -272,9 +268,12 @@ export const PendingTaskListRow = memo(function PendingTaskListRow(props: {
268 type="monochrome"
269 />
270 <Text
275 - className={compact ? "text-sm text-foreground-muted" : "text-xs"}
271 + className={
272 + compact
273 + ? "shrink text-sm text-foreground-muted"
274 + : "shrink text-xs text-foreground-muted"
275 + }
276 numberOfLines={1}
277 - style={compact ? { flexShrink: 1 } : { flexShrink: 1, color: mutedColor }}
277 >
278 {subtitleParts.join(" · ")}
279 </Text>
@@ -311,12 +310,7 @@ export const PendingTaskListRow = memo(function PendingTaskListRow(props: {
310 </Text>
311 <View className="flex-row items-center gap-2">
312 {statusPill}
314 - <Text
315 - className="text-base text-foreground-tertiary"
316 - style={{ fontVariant: ["tabular-nums"] }}
317 - >
318 - {timestamp}
319 - </Text>
313 + <Text className="text-base tabular-nums text-foreground-tertiary">{timestamp}</Text>
314 <SymbolView
315 name="chevron.right"
316 size={13}
@@ -345,22 +339,14 @@ export const PendingTaskListRow = memo(function PendingTaskListRow(props: {
339 paddingVertical: 10,
340 })}
341 >
348 - <View style={{ gap: 3 }}>
342 + <View className="gap-[3px]">
343 <View className="flex-row items-center justify-between gap-2">
350 - <Text
351 - className="flex-1 text-base font-t3-medium"
352 - numberOfLines={1}
353 - style={{ color: foregroundColor }}
354 - >
344 + <Text className="flex-1 text-base font-t3-medium text-foreground" numberOfLines={1}>
345 {pendingTask.title}
346 </Text>
347 <View className="flex-row items-center gap-2">
348 {statusPill}
359 - <Text
360 - className="text-xs"
361 - numberOfLines={1}
362 - style={{ color: mutedColor, fontVariant: ["tabular-nums"] }}
363 - >
349 + <Text className="text-xs tabular-nums text-foreground-muted" numberOfLines={1}>
350 {timestamp}
351 </Text>
352 </View>
@@ -418,11 +404,9 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
404 const iconSubtleColor = useThemeColor("--color-icon-subtle");
405 const screenColor = useThemeColor("--color-screen");
406 const drawerColor = useThemeColor("--color-drawer");
421 - const foregroundColor = useThemeColor("--color-foreground");
407 const mutedColor = useThemeColor("--color-foreground-muted");
408 const pressedBackgroundColor = useThemeColor("--color-subtle");
409 const selectedBackgroundColor = useThemeColor("--color-user-bubble");
425 - const selectedForegroundColor = useThemeColor("--color-user-bubble-foreground");
410 const selectedMutedColor = useThemeColor("--color-user-bubble-foreground-muted");
411
412 const { thread, onSelectThread, onArchiveThread, onDeleteThread } = props;
@@ -436,7 +420,6 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
420 );
421
422 const backgroundColor = compact ? screenColor : drawerColor;
439 - const effectiveForeground = selected ? selectedForegroundColor : foregroundColor;
423 const effectiveMuted = selected ? selectedMutedColor : mutedColor;
424 const effectivePressedBackground = selected ? "rgba(255,255,255,0.16)" : pressedBackgroundColor;
425 const effectiveStatus =
@@ -464,10 +447,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
447 );
448
449 const statusPill = effectiveStatus ? (
467 - <View
468 - className={effectiveStatus.pillClassName}
469 - style={{ borderRadius: 99, paddingHorizontal: 6, paddingVertical: 2 }}
470 - >
450 + <View className={`${effectiveStatus.pillClassName} rounded-full px-1.5 py-0.5`}>
451 <Text className={`text-3xs font-t3-bold ${effectiveStatus.textClassName}`}>
452 {effectiveStatus.label}
453 </Text>
@@ -476,7 +456,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
456
457 const subtitleRow =
458 subtitleParts.length > 0 || pr !== null ? (
479 - <View className="flex-row items-center gap-1.5" style={{ marginTop: 1 }}>
459 + <View className="mt-px flex-row items-center gap-1.5">
460 {subtitleParts.length > 0 ? (
461 <>
462 <SymbolView
@@ -486,9 +466,13 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
466 type="monochrome"
467 />
468 <Text
489 - className={compact ? "text-sm text-foreground-muted" : "text-xs"}
469 + className={cn(
470 + "shrink",
471 + compact ? "text-sm text-foreground-muted" : "text-xs",
472 + !compact &&
473 + (selected ? "text-user-bubble-foreground-muted" : "text-foreground-muted"),
474 + )}
475 numberOfLines={1}
491 - style={compact ? { flexShrink: 1 } : { flexShrink: 1, color: effectiveMuted }}
476 >
477 {subtitleParts.join(" · ")}
478 </Text>
@@ -540,12 +524,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
524 </Text>
525 <View className="flex-row items-center gap-2">
526 {statusPill}
543 - <Text
544 - className="text-base text-foreground-tertiary"
545 - style={{ fontVariant: ["tabular-nums"] }}
546 - >
547 - {timestamp}
548 - </Text>
527 + <Text className="text-base tabular-nums text-foreground-tertiary">{timestamp}</Text>
528 <SymbolView
529 name="chevron.right"
530 size={13}
@@ -584,21 +563,25 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
563 paddingVertical: 10,
564 })}
565 >
587 - <View style={{ gap: 3 }}>
566 + <View className="gap-[3px]">
567 <View className="flex-row items-center justify-between gap-2">
568 <Text
590 - className="flex-1 text-base font-t3-medium"
569 + className={cn(
570 + "flex-1 text-base font-t3-medium",
571 + selected ? "text-user-bubble-foreground" : "text-foreground",
572 + )}
573 numberOfLines={1}
592 - style={{ color: effectiveForeground }}
574 >
575 {thread.title}
576 </Text>
577 <View className="flex-row items-center gap-2">
578 {statusPill}
579 <Text
599 - className="text-xs"
580 + className={cn(
581 + "text-xs tabular-nums",
582 + selected ? "text-user-bubble-foreground-muted" : "text-foreground-muted",
583 + )}
584 numberOfLines={1}
601 - style={{ color: effectiveMuted, fontVariant: ["tabular-nums"] }}
585 >
586 {timestamp}
587 </Text>
apps/mobile/src/features/threads/thread-work-log.tsx
+2 -3
@@ -206,13 +206,12 @@ export function ThreadWorkLog(props: {
206 nestedScrollEnabled
207 directionalLockEnabled
208 showsVerticalScrollIndicator
209 - style={{ maxHeight: 240 }}
209 + className="max-h-60"
210 contentContainerStyle={{ paddingRight: 8 }}
211 >
212 <Text
213 selectable
214 - className="text-2xs leading-normal text-foreground-muted"
215 - style={{ fontFamily: "ui-monospace" }}
214 + className="font-mono text-2xs leading-normal text-foreground-muted"
215 >
216 {row.fullDetail}
217 </Text>
apps/mobile/src/lib/useFontFamily.ts new
+15
@@ -0,0 +1,15 @@
1 +import { useCSSVariable } from "uniwind";
2 +
3 +const FONT_FAMILY_VARIABLES = {
4 + regular: "--font-sans",
5 + medium: "--font-medium",
6 + bold: "--font-bold",
7 +} as const;
8 +
9 +/**
10 + * Resolves a font family for APIs that require a style object or native prop.
11 + * Prefer Uniwind font classes when the target component accepts `className`.
12 + */
13 +export function useFontFamily(weight: keyof typeof FONT_FAMILY_VARIABLES): string {
14 + return useCSSVariable(FONT_FAMILY_VARIABLES[weight]) as string;
15 +}
apps/mobile/src/native/T3ComposerEditor.ios.tsx
+3 -3
@@ -15,6 +15,7 @@ import { Image, StyleSheet } from "react-native";
15 import { markdownFileIconSource } from "@t3tools/mobile-markdown-text/file-icons";
16 import { resolveMarkdownFileIcon } from "@t3tools/mobile-markdown-text/links";
17 import { useThemeColor } from "../lib/useThemeColor";
18 +import { useFontFamily } from "../lib/useFontFamily";
19 import { useScaledTextRole } from "../features/settings/appearance/useScaledTextRole";
20 import {
21 acknowledgeComposerNativeEvent,
@@ -117,6 +118,7 @@ export function ComposerEditor({
118 const skillBorder = useThemeColor("--color-inline-skill-border");
119 const skillText = useThemeColor("--color-inline-skill-foreground");
120 const fileTint = useThemeColor("--color-icon-muted");
121 + const fontFamily = useFontFamily("regular");
122
123 useImperativeHandle(
124 ref,
@@ -226,9 +228,7 @@ export function ComposerEditor({
228 themeJson={themeJson}
229 placeholder={props.placeholder ?? ""}
230 fontFamily={
229 - typeof resolvedTextStyle.fontFamily === "string"
230 - ? resolvedTextStyle.fontFamily
231 - : "DMSans_400Regular"
231 + typeof resolvedTextStyle.fontFamily === "string" ? resolvedTextStyle.fontFamily : fontFamily
232 }
233 fontSize={
234 typeof resolvedTextStyle.fontSize === "number"
apps/mobile/src/native/T3ComposerEditor.tsx
+3 -1
@@ -3,6 +3,7 @@ import { useImperativeHandle, useRef } from "react";
3 import { TextInput, type TextInput as RNTextInput } from "react-native";
4
5 import { useThemeColor } from "../lib/useThemeColor";
6 +import { useFontFamily } from "../lib/useFontFamily";
7 import { useScaledTextRole } from "../features/settings/appearance/useScaledTextRole";
8 import { useNativePaste } from "../lib/useNativePaste";
9 import type { ComposerEditorProps } from "./T3ComposerEditor.types";
@@ -21,6 +22,7 @@ export function ComposerEditor({
22 const bodyText = useScaledTextRole("body");
23 const foregroundColor = useThemeColor("--color-foreground");
24 const placeholderColor = useThemeColor("--color-placeholder");
25 + const fontFamily = useFontFamily("regular");
26 const handlePaste = useNativePaste((uris) => onPasteImages?.(uris));
27
28 useImperativeHandle(
@@ -48,7 +50,7 @@ export function ComposerEditor({
50 flex: 1,
51 minHeight: 0,
52 color: foregroundColor,
51 - fontFamily: "DMSans_400Regular",
53 + fontFamily,
54 ...bodyText,
55 paddingVertical: contentInsetVertical,
56 },
apps/mobile/src/native/T3KeyboardCommands.tsx
+1 -1
@@ -9,5 +9,5 @@ export function T3KeyboardCommands(
9 readonly onCommand: (command: HardwareKeyboardCommand) => void;
10 }>,
11 ) {
12 - return <View style={{ flex: 1 }}>{props.children}</View>;
12 + return <View className="flex-1">{props.children}</View>;
13 }
pnpm-lock.yaml
+21
@@ -306,6 +306,9 @@ importers:
306 expo-haptics:
307 specifier: ~56.0.3
308 version: 56.0.3(expo@56.0.12)
309 + expo-image:
310 + specifier: ~56.0.11
311 + version: 56.0.11(expo@56.0.12)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3)
312 expo-image-picker:
313 specifier: ~56.0.18
314 version: 56.0.18(expo@56.0.12)
@@ -6562,6 +6565,17 @@ packages:
6565 peerDependencies:
6566 expo: '*'
6567
6568 + expo-image@56.0.11:
6569 + resolution: {integrity: sha512-k2xwxGk14xi6zxmEGAU4rUTb1lK5qf0y0Qb8+Jaggnul0KaJJxcq9qvyDp9iyJBW35cp9isONAUnNtIiooZ/Pw==}
6570 + peerDependencies:
6571 + expo: '*'
6572 + react: '*'
6573 + react-native: '*'
6574 + react-native-web: '*'
6575 + peerDependenciesMeta:
6576 + react-native-web:
6577 + optional: true
6578 +
6579 expo-json-utils@56.0.0:
6580 resolution: {integrity: sha512-lUqyv9aIGDbYTQ5Nux2FnH2/Dz0w5uJ8Pr080eS0StXi2jr5OmuMNErpzUnpfnYOU55xKotd4AHv68PfV/ludg==}
6581
@@ -16695,6 +16709,13 @@ snapshots:
16709 expo: 56.0.12(8895228379997a2a064f9644cda56ed0)
16710 expo-image-loader: 56.0.3(expo@56.0.12)
16711
16712 + expo-image@56.0.11(expo@56.0.12)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3):
16713 + dependencies:
16714 + expo: 56.0.12(8895228379997a2a064f9644cda56ed0)
16715 + react: 19.2.3
16716 + react-native: 0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6)
16717 + sf-symbols-typescript: 2.2.0
16718 +
16719 expo-json-utils@56.0.0: {}
16720
16721 expo-keep-awake@56.0.3(expo@56.0.12)(react@19.2.3):