Skip to content

Commit d7c0079

Browse files
committed
Merge remote-tracking branch 'github/main' into maria/takeover-pr-23764
# Conflicts: # apps/mobile/vite.config.ts
2 parents 1e198f4 + 32bf48f commit d7c0079

669 files changed

Lines changed: 34168 additions & 15023 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.

‎.github/scripts/ci-changes.cjs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const RUST = /^native\/(resource-monitor|kde-snap-shot|hyprland-snap-shot)\//;
3232

3333
// These tests read other packages without declaring dependencies.
3434
const TEST_ONLY_DEPS = {
35+
// Evals import the server's source to test its real model-facing text.
36+
"@t3tools/evals": ["t3"],
3537
"@t3tools/provider-pi": ["@t3tools/client-runtime"],
3638
"@t3tools/scripts": [
3739
"@t3tools/desktop",

‎AGENTS.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ An empty database is a bad test. Seed your worktree's `.t3` with a copy of real
136136

137137
For authorized mobile verification, a missing or outdated native client is an install step, not a blocker. Run `vp run mobile:install <ios|android> [device-id]` on the device host before starting Metro; it targets the only booted simulator or connected Android device when the id is omitted. It installs the dev client for this checkout's native fingerprint from the shared cache in seconds and builds only when no machine has built it yet, so prefer it over `expo run:*`, `xcodebuild`, or `gradlew`, which rebuild from scratch. Its stdout is one JSON line; build output goes to the log it names. See `test-t3-mobile` for the full workflow.
138138

139+
## Evals
140+
141+
`evals/` checks how real models behave with T3 Code's model-facing text: agent instructions, MCP tool descriptions and schemas, and generated titles. Before you change that text, read [evals/README.md](evals/README.md) and run the evals it names. When you fix a model behavior bug, add a case that fails before the fix.
142+
139143
## Pull requests
140144

141145
- Never make a PR unless the developer explicitly asks you to do so.

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ We are (mostly) not accepting contributions yet. Small fixes may be considered.
9494

9595
Full docs live in [docs/](./docs). There's no docs site yet.
9696

97+
- [FAQ](./docs/user/faq.md)
9798
- [Install and first run](./docs/user/install.md)
9899
- [Permission modes](./docs/user/permission-modes.md)
99100
- [Keyboard shortcuts](./docs/user/keybindings.md)

‎apps/desktop/src/backend/DesktopBackendPool.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const layer = Layer.effect(
132132
});
133133
yield* electronDialog.showErrorBox(
134134
"WSL backend couldn't start",
135-
`${reason}\n\nFalling back to the Windows backend so T3 Code can open. Re-enable the WSL backend from Settings > Connections once the WSL distro is fixed.`,
135+
`${reason}\n\nFalling back to the Windows backend so T3 Code can open. Re-enable the WSL backend from Settings > Sharing & access once the WSL distro is fixed.`,
136136
);
137137
// Clear wslOnly too so enabling WSL cannot restore a failed mode.
138138
// Keep the in-memory fallback if persistence fails.
-771 KB
Binary file not shown.
771 KB
Binary file not shown.

‎apps/mobile/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"@t3tools/provider-acp-registry": "workspace:*",
7777
"@t3tools/provider-core": "workspace:*",
7878
"@t3tools/provider-cursor": "workspace:*",
79+
"@t3tools/provider-fx": "workspace:*",
7980
"@t3tools/provider-grok": "workspace:*",
8081
"@t3tools/provider-muse": "workspace:*",
8182
"@t3tools/provider-opencode": "workspace:*",
@@ -134,7 +135,7 @@
134135
"react-native-pdf-jsi": "5.0.0",
135136
"react-native-reanimated": "4.7.1",
136137
"react-native-safe-area-context": "~5.10.1",
137-
"react-native-screens": "file:deps/react-native-screens-5.0.0-t3.44.tgz",
138+
"react-native-screens": "file:deps/react-native-screens-5.0.0-t3.45.tgz",
138139
"react-native-svg": "15.16.0",
139140
"react-native-webview": "14.0.1",
140141
"react-native-worklets": "0.13.0",

‎apps/mobile/src/App.tsx‎

Lines changed: 51 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { installPermissionUpdateNotice } from "./features/connection/permissionUpdateNotice";
2+
import { installComposerAttachmentUploads } from "./state/composer-attachment-uploads";
3+
import { installThreadOutboxDelivery } from "./state/threadOutboxDelivery";
24
import * as Linking from "expo-linking";
35
import * as SplashScreen from "expo-splash-screen";
46
import { useEffect } from "react";
@@ -7,10 +9,10 @@ import { GestureHandlerRootView } from "react-native-gesture-handler";
79
import { KeyboardProvider } from "react-native-keyboard-controller";
810
import { SafeAreaProvider } from "react-native-safe-area-context";
911
import {
10-
createNavigationContainerRef,
1112
createStaticNavigation,
1213
getActionFromState,
1314
getStateFromPath,
15+
type NavigationState,
1416
} from "@react-navigation/native";
1517

1618
import { RegistryContext } from "@effect/atom-react";
@@ -38,9 +40,9 @@ import {
3840
type FoundationHotModule,
3941
} from "./lib/foundation-fast-refresh";
4042
import { useMobileNavigationTheme } from "./lib/useMobileNavigationTheme";
41-
import { useUiRuntimeMemoryWarningGc } from "./lib/useUiRuntimeMemoryWarningGc";
43+
import { installUiRuntimeMemoryWarningGc } from "./lib/useUiRuntimeMemoryWarningGc";
4244
import { SubscriptionUsageCoordinator } from "./widgets/SubscriptionUsageCoordinator";
43-
import { VoiceInputProvider } from "./features/voice-input/VoiceInputProvider";
45+
import { installSubscriptionUsageRefresh } from "./widgets/useSubscriptionUsage";
4446
import { GlobalVoiceInputControl } from "./features/voice-input/GlobalVoiceInputControl";
4547
import { restoreSettingsLinkState } from "./features/settings/settings-navigation";
4648
import {
@@ -51,6 +53,8 @@ import {
5153
} from "./features/workspace/workspace-selection-store";
5254
import { workspaceDetailLinkAction } from "./features/workspace/workspace-detail-selection";
5355
import { NativeLayoutMetricsProvider } from "./native/native-layout-metrics";
56+
import { attachRootNavigation, rootNavigationRef } from "./lib/rootNavigation";
57+
import { pruneNewTaskBranchCheckouts } from "./features/threads/NewTaskDraftRouteScreen";
5458

5559
import "../global.css";
5660

@@ -83,15 +87,34 @@ const appLinking = {
8387
};
8488

8589
const Navigation = createStaticNavigation(RootStack);
86-
const navigationRef = createNavigationContainerRef();
90+
91+
function handleNavigationStateChange(state: NavigationState | undefined): void {
92+
recordWorkspaceSelections(state);
93+
if (state) pruneNewTaskBranchCheckouts(state);
94+
}
95+
96+
function handleNavigationReady(): void {
97+
handleNavigationStateChange(rootNavigationRef.getRootState());
98+
}
8799

88100
declare const module: { readonly hot?: FoundationHotModule } | undefined;
89101

90-
const disposePermissionUpdateNotice = installPermissionUpdateNotice();
91-
disposeOnFoundationReplace(
92-
typeof module === "undefined" ? undefined : module.hot,
93-
disposePermissionUpdateNotice,
94-
);
102+
const appServiceDisposers = [
103+
installUiRuntimeMemoryWarningGc(),
104+
subscribeComposerDraftModelReconciliation({
105+
registry: appAtomRegistry,
106+
threadShellAtom: environmentThreadShells.threadShellAtom,
107+
threadRefsAtom: environmentThreadShells.threadRefsAtom,
108+
shellStateAtom: environmentShell.stateAtom,
109+
}),
110+
installSubscriptionUsageRefresh(),
111+
installPermissionUpdateNotice(),
112+
installThreadOutboxDelivery(),
113+
installComposerAttachmentUploads(),
114+
];
115+
disposeOnFoundationReplace(typeof module === "undefined" ? undefined : module.hot, () => {
116+
for (const dispose of appServiceDisposers) dispose();
117+
});
95118

96119
function SplashScreenCoordinator() {
97120
const { isReady } = useAppearancePreferences();
@@ -104,18 +127,6 @@ function SplashScreenCoordinator() {
104127
}
105128

106129
export default function App() {
107-
useUiRuntimeMemoryWarningGc();
108-
useEffect(
109-
() =>
110-
subscribeComposerDraftModelReconciliation({
111-
registry: appAtomRegistry,
112-
threadShellAtom: environmentThreadShells.threadShellAtom,
113-
threadRefsAtom: environmentThreadShells.threadRefsAtom,
114-
shellStateAtom: environmentShell.stateAtom,
115-
}),
116-
[],
117-
);
118-
119130
return (
120131
<RegistryContext.Provider value={appAtomRegistry}>
121132
<CloudAuthProvider>
@@ -138,27 +149,25 @@ function AppContent() {
138149
<GestureHandlerRootView className="flex-1">
139150
<KeyboardProvider statusBarTranslucent>
140151
<SafeAreaProvider>
141-
<VoiceInputProvider>
142-
<StatusBar barStyle={themeAppearance === "dark" ? "light-content" : "dark-content"} />
143-
{/* native-stack needs the theme's dark flag to select dark native headers. */}
144-
<GlobalVoiceInputControl>
145-
<NativeLayoutMetricsProvider>
146-
<IncomingShareProvider>
147-
<Navigation
148-
ref={navigationRef}
149-
linking={appLinking}
150-
onReady={() => recordWorkspaceSelections(navigationRef.getRootState())}
151-
theme={navigationTheme}
152-
onStateChange={recordWorkspaceSelections}
153-
/>
154-
</IncomingShareProvider>
155-
<Dialog.Host />
156-
<ThreadArrangementHost />
157-
<ProjectChipIconRasterizer />
158-
</NativeLayoutMetricsProvider>
159-
</GlobalVoiceInputControl>
160-
<OverlayPortalHost />
161-
</VoiceInputProvider>
152+
<StatusBar barStyle={themeAppearance === "dark" ? "light-content" : "dark-content"} />
153+
{/* native-stack needs the theme's dark flag to select dark native headers. */}
154+
<GlobalVoiceInputControl>
155+
<NativeLayoutMetricsProvider>
156+
<IncomingShareProvider>
157+
<Navigation
158+
ref={attachRootNavigation}
159+
linking={appLinking}
160+
onReady={handleNavigationReady}
161+
theme={navigationTheme}
162+
onStateChange={handleNavigationStateChange}
163+
/>
164+
</IncomingShareProvider>
165+
<Dialog.Host />
166+
<ThreadArrangementHost />
167+
<ProjectChipIconRasterizer />
168+
</NativeLayoutMetricsProvider>
169+
</GlobalVoiceInputControl>
170+
<OverlayPortalHost />
162171
</SafeAreaProvider>
163172
</KeyboardProvider>
164173
</GestureHandlerRootView>

0 commit comments

Comments
 (0)