Skip to content

Commit ea95e48

Browse files
authored
Merge branch 'main' into feature/default-permission-mode
2 parents 2b46d00 + f61fa94 commit ea95e48

119 files changed

Lines changed: 5431 additions & 1882 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.macroscope/check-run-agents/effect-service-conventions.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ Review changed TypeScript and directly affected call sites for the conventions b
4343
- Keep implementation-specific names when an abstract port module contains one of several possible implementations, for example `makeCloudflaredRelayClient` and `layerCloudflared` in `RelayClient.ts`.
4444
- `infra/relay/src/db.ts` is an intentional exception: an inline `Layer.succeed(RelayDb, db)` is acceptable without generic `make`/`layer` exports.
4545

46+
## Dependency acquisition and runtime boundaries
47+
48+
- Production service construction must acquire Effect service dependencies from the environment with `yield* Foo.Foo`, and its `make`/`layer` types must expose those requirements. Flag factories or constructors that accept `Foo["Service"]` (or a plain object whose methods return `Effect`) when that value is an implementation dependency owned by the service. Passing service instances explicitly is acceptable in tests and integration harnesses; passing pure configuration, immutable domain values, or deliberate callback strategies is not service injection.
49+
- Do not hide dependencies in module globals, closures over singleton services, or `Layer.succeed` implementations that call runtime-backed or imperative APIs. Trace helpers used by a supposedly synchronous layer far enough to verify that asynchronous services are represented in the Effect environment.
50+
- `ManagedRuntime.make`, `runPromise`, and `runPromiseExit` belong at explicit application/framework boundaries such as React, native callback, CLI, or HTTP adapters. Flag their use in domain services, repositories, persistence implementations, and service constructors. A clearly named imperative adapter may bridge an Effect service into a Promise API, but it must not become a dependency of another Effect service.
51+
- Do not create per-feature managed runtimes or Atom runtimes to smuggle the same owned resource into multiple consumers. Compose the resource once in an application-owned layer/runtime and provide its context to integration runtimes.
52+
- When acquisition can fail but a caller must retain fallback behavior, keep the failure typed in Effect rather than bypassing the layer through an imperative runtime. Model unavailability in service operations or with an explicit optional-service layer so downstream recovery remains visible and testable.
53+
- During review, search touched code and affected call sites for service-instance parameters, `Layer.succeed`, `ManagedRuntime.make`, and `.runPromise`/`.runPromiseExit`. Verify that each occurrence is a legitimate test seam, pure value injection, or application boundary—not fake dependency injection or a hidden runtime.
54+
4655
## Errors and predicates
4756

4857
- Define service failures with `Schema.TaggedErrorClass` and structured attributes. Derive `message` from those attributes rather than storing an unstructured message as the only data.

‎apps/mobile/app.config.ts‎

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ function resolveAppVariant(value: string | undefined): AppVariant {
6363

6464
const variant = VARIANT_CONFIG[APP_VARIANT];
6565

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+
6676
const config: ExpoConfig = {
6777
name: variant.appName,
6878
slug: "t3-code",
@@ -121,8 +131,32 @@ const config: ExpoConfig = {
121131
favicon: "./assets/favicon.png",
122132
},
123133
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+
],
125158
"expo-secure-store",
159+
"expo-sqlite",
126160
["@clerk/expo", { theme: "./clerk-theme.json" }],
127161
"expo-web-browser",
128162
[

‎apps/mobile/eas.json‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"development": {
99
"corepack": true,
1010
"env": {
11-
"APP_VARIANT": "development"
11+
"APP_VARIANT": "development",
12+
"NODE_OPTIONS": "--max-old-space-size=4096"
1213
},
1314
"channel": "development",
1415
"developmentClient": true,
@@ -17,7 +18,8 @@
1718
"preview": {
1819
"corepack": true,
1920
"env": {
20-
"APP_VARIANT": "preview"
21+
"APP_VARIANT": "preview",
22+
"NODE_OPTIONS": "--max-old-space-size=4096"
2123
},
2224
"channel": "preview",
2325
"environment": "preview",
@@ -27,7 +29,8 @@
2729
"corepack": true,
2830
"env": {
2931
"APP_VARIANT": "preview",
30-
"MOBILE_VERSION_POLICY": "fingerprint"
32+
"MOBILE_VERSION_POLICY": "fingerprint",
33+
"NODE_OPTIONS": "--max-old-space-size=4096"
3134
},
3235
"channel": "preview",
3336
"environment": "preview",
@@ -40,7 +43,8 @@
4043
"production": {
4144
"corepack": true,
4245
"env": {
43-
"APP_VARIANT": "production"
46+
"APP_VARIANT": "production",
47+
"NODE_OPTIONS": "--max-old-space-size=4096"
4448
},
4549
"channel": "production",
4650
"environment": "production",

‎apps/mobile/global.css‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
/* Inputs */
5252
--color-input: #ffffff;
5353
--color-input-border: rgba(0, 0, 0, 0.1);
54+
--color-sidebar-search: rgba(118, 118, 128, 0.12);
5455
--color-placeholder: #a3a3a3;
5556

5657
/* Icons */
@@ -144,6 +145,7 @@
144145
/* Inputs */
145146
--color-input: #141414;
146147
--color-input-border: rgba(255, 255, 255, 0.08);
148+
--color-sidebar-search: rgba(118, 118, 128, 0.24);
147149
--color-placeholder: #8e8e93;
148150

149151
/* Icons */
@@ -194,9 +196,10 @@
194196

195197
/* ─── Typography ────────────────────────────────────────────────────── */
196198
@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";
200203

201204
/* Keep this scale aligned with src/lib/typography.ts for native style props. */
202205
--text-3xs: 11px;
@@ -221,14 +224,14 @@
221224

222225
/* ─── Custom utilities ──────────────────────────────────────────────── */
223226
@utility font-t3-medium {
224-
font-family: "DMSans_500Medium";
227+
font-family: var(--font-medium);
225228
}
226229

227230
@utility font-t3-bold {
228-
font-family: "DMSans_700Bold";
231+
font-family: var(--font-bold);
229232
}
230233

231234
@utility font-t3-extrabold {
232-
font-family: "DMSans_700Bold";
235+
font-family: var(--font-bold);
233236
font-weight: 800;
234237
}

‎apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate {
300300
skillText: "#a21caf",
301301
fileTint: "#737373"
302302
)
303-
private var fontFamily = "DMSans_400Regular"
303+
private var fontFamily = "DMSans-Regular"
304304
private var fontSize: CGFloat = 14
305305
private var lineHeight: CGFloat = 20
306306
private var contentInsetVertical: CGFloat = 0
@@ -608,7 +608,7 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate {
608608
iconImage: UIImage?,
609609
style: ComposerChipStyle
610610
) -> 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))
612612
?? UIFont.systemFont(ofSize: max(12, fontSize - 2), weight: .medium)
613613
let fallbackIcon = UIImage(
614614
systemName: iconName,

‎apps/mobile/package.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"dev": "expo start --clear",
88
"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 --lan'",
910
"start": "expo start",
1011
"start:dev": "APP_VARIANT=development expo start",
1112
"start:preview": "APP_VARIANT=preview expo start",
@@ -79,13 +80,15 @@
7980
"expo-font": "~56.0.7",
8081
"expo-glass-effect": "~56.0.4",
8182
"expo-haptics": "~56.0.3",
83+
"expo-image": "~56.0.11",
8284
"expo-image-picker": "~56.0.18",
8385
"expo-linking": "~56.0.14",
8486
"expo-network": "~56.0.5",
8587
"expo-notifications": "~56.0.18",
8688
"expo-paste-input": "^0.1.15",
8789
"expo-secure-store": "~56.0.4",
8890
"expo-splash-screen": "~56.0.10",
91+
"expo-sqlite": "~56.0.5",
8992
"expo-symbols": "~56.0.6",
9093
"expo-updates": "~56.0.19",
9194
"expo-web-browser": "~56.0.5",

‎apps/mobile/src/App.tsx‎

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
import {
2-
DMSans_400Regular,
3-
DMSans_500Medium,
4-
DMSans_700Bold,
5-
useFonts,
6-
} from "@expo-google-fonts/dm-sans";
71
import * as Linking from "expo-linking";
82
import * as SplashScreen from "expo-splash-screen";
3+
import { useEffect } from "react";
94
import { StatusBar, useColorScheme } from "react-native";
105
import { GestureHandlerRootView } from "react-native-gesture-handler";
116
import { KeyboardProvider } from "react-native-keyboard-controller";
127
import { SafeAreaProvider } from "react-native-safe-area-context";
138
import { createStaticNavigation, DarkTheme, DefaultTheme } from "@react-navigation/native";
149

1510
import { RegistryContext } from "@effect/atom-react";
16-
import { useEffect } from "react";
1711
import { CloudAuthProvider } from "./features/cloud/CloudAuthProvider";
1812
import { AppearancePreferencesProvider } from "./features/settings/appearance/AppearancePreferencesProvider";
1913
import { RootStack } from "./Stack";
@@ -29,17 +23,12 @@ const appLinking = {
2923
const Navigation = createStaticNavigation(RootStack);
3024

3125
export default function App() {
32-
const [fontsLoaded] = useFonts({
33-
DMSans_400Regular,
34-
DMSans_500Medium,
35-
DMSans_700Bold,
36-
});
3726
const colorScheme = useColorScheme();
3827
const statusBarBg = useThemeColor("--color-status-bar");
3928

4029
useEffect(() => {
41-
if (fontsLoaded) SplashScreen.hide();
42-
}, [fontsLoaded]);
30+
SplashScreen.hide();
31+
}, []);
4332

4433
return (
4534
<RegistryContext.Provider value={appAtomRegistry}>

‎apps/mobile/src/Stack.tsx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { NewTaskDraftRouteScreen } from "./features/threads/NewTaskDraftRouteScr
4141
import { NewTaskFlowProvider } from "./features/threads/new-task-flow-provider";
4242
import { NewTaskRouteScreen } from "./features/threads/NewTaskRouteScreen";
4343
import { SettingsAppearanceRouteScreen } from "./features/settings/SettingsAppearanceRouteScreen";
44+
import { SettingsClientStorageRouteScreen } from "./features/settings/SettingsClientStorageRouteScreen";
4445
import { SettingsAuthRouteScreen } from "./features/settings/SettingsAuthRouteScreen";
4546
import { SettingsEnvironmentsRouteScreen } from "./features/settings/SettingsEnvironmentsRouteScreen";
4647
import { SettingsRouteScreen } from "./features/settings/SettingsRouteScreen";
@@ -147,6 +148,13 @@ const SettingsSheetStack = createNativeStackNavigator({
147148
title: "Appearance",
148149
},
149150
}),
151+
SettingsClientStorage: createNativeStackScreen({
152+
screen: SettingsClientStorageRouteScreen,
153+
linking: "client-storage",
154+
options: {
155+
title: "Client Storage",
156+
},
157+
}),
150158
SettingsAuth: createNativeStackScreen({
151159
screen: SettingsAuthRouteScreen,
152160
linking: "auth",

‎apps/mobile/src/components/AppText.tsx‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
type TextInputProps as RNTextInputProps,
55
type TextProps as RNTextProps,
66
} from "react-native";
7-
import { useThemeColor } from "../lib/useThemeColor";
87

98
import { cn } from "../lib/cn";
109

@@ -18,7 +17,7 @@ export function AppText({ className, ...props }: AppTextProps) {
1817
return <RNText className={cn("font-sans text-foreground", className)} {...props} />;
1918
}
2019

21-
export type AppTextInputProps = RNTextInputProps & {
20+
export type AppTextInputProps = Omit<RNTextInputProps, "placeholderTextColor"> & {
2221
readonly className?: string;
2322
readonly ref?: React.Ref<RNTextInput>;
2423
};
@@ -27,22 +26,15 @@ export type AppTextInputProps = RNTextInputProps & {
2726
* Thin wrapper around RN TextInput with default input styling.
2827
* Uses Uniwind className — no manual style parsing.
2928
*/
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) {
3830
return (
3931
<RNTextInput
4032
ref={ref}
4133
className={cn(
4234
"min-h-13.5 rounded-2xl border border-input-border bg-input px-3.5 py-3 font-sans text-base text-foreground",
4335
className,
4436
)}
45-
placeholderTextColor={placeholderTextColor ?? placeholderColor}
37+
placeholderTextColorClassName="accent-placeholder"
4638
{...props}
4739
/>
4840
);

‎apps/mobile/src/components/BrandMark.tsx‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,9 @@ export function BrandMark(props: { readonly compact?: boolean; readonly stageLab
2222
/>
2323
<View className="gap-1">
2424
<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>
2826
<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">
3328
{stageLabel}
3429
</Text>
3530
</View>

0 commit comments

Comments
 (0)