.github/workflows/ci.yml | 27 + .oxfmtrc.json | 3 + .oxlintrc.json | 6 +- AGENTS.md | 1 + apps/mobile/.editorconfig | 12 + apps/mobile/.gitignore | 41 + apps/mobile/.swiftlint.yml | 58 + apps/mobile/Brewfile | 3 + apps/mobile/README.md | 81 ++ apps/mobile/app.config.ts | 140 ++ apps/mobile/assets.d.ts | 1 + apps/mobile/assets/android-icon-background.png | Bin 0 -> 330462 bytes apps/mobile/assets/android-icon-foreground.png | Bin 0 -> 330462 bytes apps/mobile/assets/android-icon-monochrome.png | Bin 0 -> 330462 bytes apps/mobile/assets/favicon.png | Bin 0 -> 75497 bytes apps/mobile/assets/icon-composer-dev.icon/Assets/T3.svg | 3 + apps/mobile/assets/icon-composer-dev.icon/Assets/Texturelabs_Paper_381XL.jpg | Bin 0 -> 10664573 bytes apps/mobile/assets/icon-composer-dev.icon/Assets/gpt-image-1.5-jd70szmrd03p36z4zv48ycsbax81egvr.png | Bin 0 -> 1768777 bytes apps/mobile/assets/icon-composer-dev.icon/icon.json | 45 + apps/mobile/assets/icon-composer-prod.icon/Assets/T3.svg | 3 + apps/mobile/assets/icon-composer-prod.icon/icon.json | 31 + apps/mobile/assets/icon.png | Bin 0 -> 2134558 bytes apps/mobile/assets/splash-icon.png | Bin 0 -> 2134558 bytes apps/mobile/babel.config.js | 6 + apps/mobile/deps/react-native-nitro-markdown-0.5.0.tgz | Bin 0 -> 180007 bytes apps/mobile/detekt.yml | 19 + apps/mobile/eas.json | 37 + apps/mobile/global.css | 202 +++ apps/mobile/index.ts | 2 + apps/mobile/metro.config.js | 45 + apps/mobile/modules/t3-review-diff/T3ReviewDiffNative.podspec | 19 + apps/mobile/modules/t3-review-diff/expo-module.config.json | 7 + apps/mobile/modules/t3-review-diff/ios/T3ReviewDiffModule.swift | 63 + apps/mobile/modules/t3-review-diff/ios/T3ReviewDiffView.swift | 2311 ++++++++++++++++++++++++++++++++ apps/mobile/modules/t3-review-diff/package.json | 12 + apps/mobile/modules/t3-terminal/README.md | 38 + apps/mobile/modules/t3-terminal/T3TerminalNative.podspec | 21 + apps/mobile/modules/t3-terminal/THIRD_PARTY_NOTICES.md | 16 + apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/Info.plist | 47 + apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty.h | 1218 +++++++++++++++++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt.h | 87 ++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt/allocator.h | 196 +++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt/color.h | 96 ++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt/key.h | 80 ++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt/key/encoder.h | 221 +++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt/key/event.h | 474 +++++++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt/osc.h | 233 ++++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt/paste.h | 75 ++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt/result.h | 22 + apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt/sgr.h | 394 ++++++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/ghostty/vt/wasm.h | 159 +++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/Headers/module.modulemap | 7 + apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64-simulator/libghostty-fat.a | Bin 0 -> 22931312 bytes apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty.h | 1218 +++++++++++++++++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt.h | 87 ++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt/allocator.h | 196 +++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt/color.h | 96 ++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt/key.h | 80 ++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt/key/encoder.h | 221 +++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt/key/event.h | 474 +++++++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt/osc.h | 233 ++++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt/paste.h | 75 ++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt/result.h | 22 + apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt/sgr.h | 394 ++++++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/ghostty/vt/wasm.h | 159 +++ apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/Headers/module.modulemap | 7 + apps/mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework/ios-arm64/libghostty-fat.a | Bin 0 -> 22938544 bytes apps/mobile/modules/t3-terminal/Vendor/libghostty/VERSION | 1 + apps/mobile/modules/t3-terminal/android/build.gradle | 19 + apps/mobile/modules/t3-terminal/android/src/main/AndroidManifest.xml | 1 + apps/mobile/modules/t3-terminal/android/src/main/java/expo/modules/t3terminal/T3TerminalModule.kt | 46 + apps/mobile/modules/t3-terminal/android/src/main/java/expo/modules/t3terminal/T3TerminalView.kt | 211 +++ apps/mobile/modules/t3-terminal/expo-module.config.json | 10 + apps/mobile/modules/t3-terminal/ios/T3TerminalModule.swift | 43 + apps/mobile/modules/t3-terminal/ios/T3TerminalView.swift | 560 ++++++++ apps/mobile/modules/t3-terminal/package.json | 17 + apps/mobile/modules/t3-terminal/scripts/build-libghostty-ios16.sh | 106 ++ apps/mobile/package.json | 104 ++ apps/mobile/plugins/withAndroidCleartextTraffic.cjs | 18 + apps/mobile/src/app/+not-found.tsx | 43 + apps/mobile/src/app/_layout.tsx | 104 ++ apps/mobile/src/app/connections/_layout.tsx | 30 + apps/mobile/src/app/connections/index.tsx | 103 ++ apps/mobile/src/app/connections/new.tsx | 252 ++++ apps/mobile/src/app/index.tsx | 117 ++ apps/mobile/src/app/new/_layout.tsx | 29 + apps/mobile/src/app/new/add-project/_layout.tsx | 17 + apps/mobile/src/app/new/add-project/destination.tsx | 12 + apps/mobile/src/app/new/add-project/index.tsx | 12 + apps/mobile/src/app/new/add-project/local.tsx | 12 + apps/mobile/src/app/new/add-project/repository.tsx | 12 + apps/mobile/src/app/new/draft.tsx | 24 + apps/mobile/src/app/new/index.tsx | 232 ++++ apps/mobile/src/app/threads/[environmentId]/[threadId]/_layout.tsx | 80 ++ apps/mobile/src/app/threads/[environmentId]/[threadId]/git-confirm.tsx | 5 + apps/mobile/src/app/threads/[environmentId]/[threadId]/git/_layout.tsx | 58 + apps/mobile/src/app/threads/[environmentId]/[threadId]/git/branches.tsx | 5 + apps/mobile/src/app/threads/[environmentId]/[threadId]/git/commit.tsx | 5 + apps/mobile/src/app/threads/[environmentId]/[threadId]/git/index.tsx | 5 + apps/mobile/src/app/threads/[environmentId]/[threadId]/git/review.tsx | 18 + apps/mobile/src/app/threads/[environmentId]/[threadId]/index.tsx | 5 + apps/mobile/src/app/threads/[environmentId]/[threadId]/review-comment.tsx | 5 + apps/mobile/src/app/threads/[environmentId]/[threadId]/review.tsx | 10 + apps/mobile/src/app/threads/[environmentId]/[threadId]/terminal.tsx | 5 + apps/mobile/src/components/AppText.tsx | 50 + apps/mobile/src/components/BrandMark.tsx | 48 + apps/mobile/src/components/ComposerAttachmentStrip.tsx | 96 ++ apps/mobile/src/components/ControlPill.tsx | 89 ++ apps/mobile/src/components/EmptyState.tsx | 29 + apps/mobile/src/components/ErrorBanner.tsx | 12 + apps/mobile/src/components/GlassSafeAreaView.tsx | 59 + apps/mobile/src/components/GlassSurface.tsx | 73 + apps/mobile/src/components/LoadingScreen.tsx | 27 + apps/mobile/src/components/ProjectFavicon.tsx | 70 + apps/mobile/src/components/ProviderIcon.tsx | 32 + apps/mobile/src/components/SourceControlIcon.tsx | 99 ++ apps/mobile/src/components/StatusPill.tsx | 37 + apps/mobile/src/features/connection/ConnectionEnvironmentRow.tsx | 190 +++ apps/mobile/src/features/connection/ConnectionSheetButton.tsx | 114 ++ apps/mobile/src/features/connection/ConnectionStatusDot.tsx | 112 ++ apps/mobile/src/features/connection/connectionTone.ts | 37 + apps/mobile/src/features/connection/pairing.test.ts | 38 + apps/mobile/src/features/connection/pairing.ts | 67 + apps/mobile/src/features/diffs/nativeReviewDiffHighlighter.ts | 405 ++++++ apps/mobile/src/features/diffs/nativeReviewDiffSurface.test.ts | 67 + apps/mobile/src/features/diffs/nativeReviewDiffSurface.ts | 155 +++ apps/mobile/src/features/diffs/nativeReviewDiffTypes.ts | 17 + apps/mobile/src/features/home/HomeScreen.tsx | 426 ++++++ apps/mobile/src/features/projects/AddProjectScreen.tsx | 827 ++++++++++++ apps/mobile/src/features/review/ReviewCommentComposerSheet.tsx | 318 +++++ apps/mobile/src/features/review/ReviewHighlighterProvider.tsx | 24 + apps/mobile/src/features/review/ReviewSheet.tsx | 432 ++++++ apps/mobile/src/features/review/diffParser.ts | 158 +++ apps/mobile/src/features/review/nativeReviewDiffAdapter.ts | 431 ++++++ apps/mobile/src/features/review/reviewCommentSelection.test.ts | 81 ++ apps/mobile/src/features/review/reviewCommentSelection.ts | 317 +++++ apps/mobile/src/features/review/reviewDiffPreviewState.ts | 110 ++ apps/mobile/src/features/review/reviewDiffRendering.tsx | 128 ++ apps/mobile/src/features/review/reviewFileVisibility.test.ts | 50 + apps/mobile/src/features/review/reviewFileVisibility.ts | 116 ++ apps/mobile/src/features/review/reviewHighlighterEngine.test.ts | 34 + apps/mobile/src/features/review/reviewHighlighterEngine.ts | 31 + apps/mobile/src/features/review/reviewHighlighterState.test.ts | 75 ++ apps/mobile/src/features/review/reviewHighlighterState.ts | 154 +++ apps/mobile/src/features/review/reviewModel.test.ts | 354 +++++ apps/mobile/src/features/review/reviewModel.ts | 639 +++++++++ apps/mobile/src/features/review/reviewPerf.ts | 83 ++ apps/mobile/src/features/review/reviewState.test.ts | 27 + apps/mobile/src/features/review/reviewState.ts | 296 ++++ apps/mobile/src/features/review/reviewWordDiffs.test.ts | 93 ++ apps/mobile/src/features/review/reviewWordDiffs.ts | 266 ++++ apps/mobile/src/features/review/shikiReviewHighlighter.test.ts | 121 ++ apps/mobile/src/features/review/shikiReviewHighlighter.ts | 1037 ++++++++++++++ apps/mobile/src/features/review/useNativeReviewDiffBridge.test.ts | 27 + apps/mobile/src/features/review/useNativeReviewDiffBridge.ts | 152 +++ apps/mobile/src/features/review/useNativeReviewDiffHighlighting.ts | 136 ++ apps/mobile/src/features/review/useReviewCommentSelectionController.ts | 199 +++ apps/mobile/src/features/review/useReviewDiffData.ts | 109 ++ apps/mobile/src/features/review/useReviewSections.ts | 252 ++++ apps/mobile/src/features/terminal/NativeTerminalSurface.tsx | 271 ++++ apps/mobile/src/features/terminal/ThreadTerminalPanel.tsx | 175 +++ apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.test.ts | 108 ++ apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.tsx | 1334 ++++++++++++++++++ apps/mobile/src/features/terminal/nativeTerminalModule.test.ts | 52 + apps/mobile/src/features/terminal/nativeTerminalModule.ts | 65 + apps/mobile/src/features/terminal/terminalBufferReplay.test.ts | 43 + apps/mobile/src/features/terminal/terminalBufferReplay.ts | 29 + apps/mobile/src/features/terminal/terminalDebugLog.ts | 24 + apps/mobile/src/features/terminal/terminalLaunchContext.test.ts | 130 ++ apps/mobile/src/features/terminal/terminalLaunchContext.ts | 90 ++ apps/mobile/src/features/terminal/terminalMenu.test.ts | 165 +++ apps/mobile/src/features/terminal/terminalMenu.ts | 139 ++ apps/mobile/src/features/terminal/terminalPreferences.test.ts | 28 + apps/mobile/src/features/terminal/terminalPreferences.ts | 12 + apps/mobile/src/features/terminal/terminalRouteBootstrap.ts | 35 + apps/mobile/src/features/terminal/terminalTheme.test.ts | 36 + apps/mobile/src/features/terminal/terminalTheme.ts | 86 ++ apps/mobile/src/features/terminal/terminalUiState.test.ts | 53 + apps/mobile/src/features/terminal/terminalUiState.ts | 52 + apps/mobile/src/features/threads/ComposerCommandPopover.tsx | 211 +++ apps/mobile/src/features/threads/GitActionProgressOverlay.tsx | 121 ++ apps/mobile/src/features/threads/NewTaskDraftScreen.tsx | 494 +++++++ apps/mobile/src/features/threads/NewTaskSheetHeader.tsx | 46 + apps/mobile/src/features/threads/PendingApprovalCard.tsx | 57 + apps/mobile/src/features/threads/PendingUserInputCard.tsx | 105 ++ apps/mobile/src/features/threads/ThreadComposer.tsx | 821 ++++++++++++ apps/mobile/src/features/threads/ThreadDetailScreen.tsx | 347 +++++ apps/mobile/src/features/threads/ThreadFeed.tsx | 989 ++++++++++++++ apps/mobile/src/features/threads/ThreadGitControls.tsx | 277 ++++ apps/mobile/src/features/threads/ThreadNavigationDrawer.tsx | 261 ++++ apps/mobile/src/features/threads/ThreadRouteScreen.tsx | 418 ++++++ apps/mobile/src/features/threads/claudeEffortOptions.ts | 10 + apps/mobile/src/features/threads/git/GitBranchesSheet.tsx | 201 +++ apps/mobile/src/features/threads/git/GitCommitSheet.tsx | 241 ++++ apps/mobile/src/features/threads/git/GitConfirmSheet.tsx | 124 ++ apps/mobile/src/features/threads/git/GitOverviewSheet.tsx | 248 ++++ apps/mobile/src/features/threads/git/gitSheetComponents.tsx | 161 +++ apps/mobile/src/features/threads/new-task-flow-provider.tsx | 513 +++++++ apps/mobile/src/features/threads/threadPresentation.ts | 53 + apps/mobile/src/features/threads/use-project-actions.ts | 262 ++++ apps/mobile/src/lib/cn.ts | 6 + apps/mobile/src/lib/commandMetadata.test.ts | 36 + apps/mobile/src/lib/commandMetadata.ts | 25 + apps/mobile/src/lib/composerImages.ts | 249 ++++ apps/mobile/src/lib/connection.test.ts | 28 + apps/mobile/src/lib/connection.ts | 68 + apps/mobile/src/lib/mobileLayout.ts | 37 + apps/mobile/src/lib/modelOptions.ts | 97 ++ apps/mobile/src/lib/repositoryGroups.test.ts | 197 +++ apps/mobile/src/lib/repositoryGroups.ts | 134 ++ apps/mobile/src/lib/routes.ts | 81 ++ apps/mobile/src/lib/runtime.ts | 5 + apps/mobile/src/lib/scopedEntities.ts | 16 + apps/mobile/src/lib/storage.ts | 184 +++ apps/mobile/src/lib/threadActivity.test.ts | 172 +++ apps/mobile/src/lib/threadActivity.ts | 942 +++++++++++++ apps/mobile/src/lib/time.ts | 19 + apps/mobile/src/lib/useNativePaste.ts | 21 + apps/mobile/src/lib/useThemeColor.ts | 12 + apps/mobile/src/lib/uuid.ts | 3 + apps/mobile/src/state/atom-registry.ts | 3 + apps/mobile/src/state/environment-session-registry.ts | 48 + apps/mobile/src/state/remote-runtime-types.ts | 26 + apps/mobile/src/state/use-checkpoint-diff.ts | 16 + apps/mobile/src/state/use-composer-path-search.ts | 46 + apps/mobile/src/state/use-environment-runtime.ts | 76 ++ apps/mobile/src/state/use-filesystem-browse.ts | 82 ++ apps/mobile/src/state/use-remote-catalog.ts | 198 +++ apps/mobile/src/state/use-remote-environment-registry.ts | 618 +++++++++ apps/mobile/src/state/use-selected-thread-commands.ts | 187 +++ apps/mobile/src/state/use-selected-thread-git-actions.ts | 341 +++++ apps/mobile/src/state/use-selected-thread-git-state.ts | 48 + apps/mobile/src/state/use-selected-thread-requests.ts | 176 +++ apps/mobile/src/state/use-selected-thread-worktree.ts | 24 + apps/mobile/src/state/use-shell-snapshot.ts | 111 ++ apps/mobile/src/state/use-source-control-discovery.ts | 78 ++ apps/mobile/src/state/use-terminal-session.ts | 84 ++ apps/mobile/src/state/use-thread-composer-state.ts | 469 +++++++ apps/mobile/src/state/use-thread-detail.ts | 82 ++ apps/mobile/src/state/use-thread-selection.ts | 95 ++ apps/mobile/src/state/use-vcs-action-state.ts | 162 +++ apps/mobile/src/state/use-vcs-refs.ts | 51 + apps/mobile/src/state/use-vcs-status.ts | 62 + apps/mobile/tsconfig.json | 7 + apps/mobile/uniwind-types.d.ts | 10 + apps/server/src/project/Layers/ProjectSetupScriptRunner.test.ts | 5 + apps/server/src/review/ReviewService.test.ts | 76 ++ apps/server/src/review/ReviewService.ts | 101 ++ apps/server/src/server.test.ts | 70 +- apps/server/src/server.ts | 7 + apps/server/src/terminal/Layers/Manager.test.ts | 368 ++++- apps/server/src/terminal/Layers/Manager.ts | 811 ++++++++--- apps/server/src/terminal/Services/Manager.ts | 22 + apps/server/src/vcs/GitVcsDriver.ts | 5 + apps/server/src/vcs/GitVcsDriverCore.test.ts | 25 + apps/server/src/vcs/GitVcsDriverCore.ts | 190 ++- apps/server/src/vcs/VcsDriver.ts | 5 + apps/server/src/ws.ts | 31 + apps/web/src/components/BranchToolbarBranchSelector.tsx | 74 +- apps/web/src/components/ChatView.browser.tsx | 208 ++- apps/web/src/components/ChatView.tsx | 547 +++++--- apps/web/src/components/CommandPalette.tsx | 6 +- apps/web/src/components/DiffPanel.tsx | 114 +- apps/web/src/components/GitActionsControl.browser.tsx | 99 +- apps/web/src/components/GitActionsControl.tsx | 144 +- apps/web/src/components/KeybindingsToast.browser.tsx | 38 +- apps/web/src/components/PullRequestThreadDialog.tsx | 80 +- apps/web/src/components/Sidebar.tsx | 23 +- apps/web/src/components/ThreadStatusIndicators.tsx | 17 +- apps/web/src/components/ThreadTerminalDrawer.browser.tsx | 144 +- apps/web/src/components/ThreadTerminalDrawer.test.ts | 62 - apps/web/src/components/ThreadTerminalDrawer.tsx | 414 +++--- apps/web/src/components/chat/ChatComposer.tsx | 37 +- apps/web/src/components/chat/MessagesTimeline.test.tsx | 58 + apps/web/src/components/chat/MessagesTimeline.tsx | 73 + apps/web/src/components/settings/ConnectionsSettings.tsx | 2 +- apps/web/src/environmentApi.ts | 9 +- apps/web/src/environments/remote/api.test.ts | 248 ---- apps/web/src/environments/remote/api.ts | 149 -- apps/web/src/environments/remote/target.ts | 97 -- apps/web/src/environments/runtime/connection.test.ts | 66 +- apps/web/src/environments/runtime/connection.ts | 189 +-- apps/web/src/environments/runtime/index.ts | 1 + apps/web/src/environments/runtime/service.addSavedEnvironment.test.ts | 55 +- apps/web/src/environments/runtime/service.savedEnvironments.test.ts | 40 +- apps/web/src/environments/runtime/service.test.ts | 148 -- apps/web/src/environments/runtime/service.threadSubscriptions.test.ts | 148 +- apps/web/src/environments/runtime/service.ts | 207 +-- apps/web/src/hooks/useThreadActions.ts | 15 +- apps/web/src/lib/archivedThreadsState.ts | 95 +- apps/web/src/lib/checkpointDiffState.ts | 63 + apps/web/src/lib/composerPathSearchState.ts | 57 + apps/web/src/lib/diffRendering.ts | 73 + apps/web/src/lib/gitReactQuery.test.ts | 135 -- apps/web/src/lib/gitReactQuery.ts | 327 ----- apps/web/src/lib/gitStatusState.test.ts | 327 ----- apps/web/src/lib/gitStatusState.ts | 287 ---- apps/web/src/lib/projectPaths.ts | 276 +--- apps/web/src/lib/projectReactQuery.ts | 52 - apps/web/src/lib/providerReactQuery.test.ts | 224 ---- apps/web/src/lib/providerReactQuery.ts | 139 -- apps/web/src/lib/runtime.ts | 5 + apps/web/src/lib/sourceControlActions.ts | 477 +++++++ apps/web/src/lib/sourceControlDiscoveryState.ts | 28 +- apps/web/src/lib/terminalFocus.test.ts | 19 +- apps/web/src/lib/terminalFocus.ts | 4 +- apps/web/src/lib/terminalStateCleanup.test.ts | 65 - apps/web/src/lib/terminalStateCleanup.ts | 33 - apps/web/src/lib/terminalUiStateCleanup.test.ts | 65 + apps/web/src/lib/terminalUiStateCleanup.ts | 33 + apps/web/src/lib/vcsRefState.ts | 48 + apps/web/src/lib/vcsStatusState.ts | 63 + apps/web/src/localApi.test.ts | 56 +- apps/web/src/localApi.ts | 6 +- apps/web/src/orchestrationEventEffects.test.ts | 6 +- apps/web/src/orchestrationEventEffects.ts | 20 +- apps/web/src/pairingUrl.ts | 38 +- apps/web/src/reviewCommentContext.test.ts | 77 ++ apps/web/src/reviewCommentContext.ts | 154 +++ apps/web/src/routes/_chat.tsx | 6 +- apps/web/src/rpc/protocol.ts | 328 ----- apps/web/src/rpc/serverState.ts | 2 +- apps/web/src/rpc/transportError.test.ts | 24 - apps/web/src/rpc/transportError.ts | 27 +- apps/web/src/rpc/wsConnectionState.ts | 18 +- apps/web/src/rpc/wsRpcClient.test.ts | 105 -- apps/web/src/rpc/wsRpcClient.ts | 323 ----- apps/web/src/rpc/wsTransport.test.ts | 827 +----------- apps/web/src/rpc/wsTransport.ts | 398 +----- apps/web/src/store.ts | 12 + apps/web/src/terminalActivity.test.ts | 72 - apps/web/src/terminalActivity.ts | 14 - apps/web/src/terminalSessionState.ts | 77 ++ apps/web/src/terminalStateStore.test.ts | 396 ------ apps/web/src/terminalStateStore.ts | 847 ------------ apps/web/src/terminalUiStateStore.test.ts | 254 ++++ apps/web/src/terminalUiStateStore.ts | 641 +++++++++ apps/web/src/types.ts | 2 +- apps/web/test/wsRpcHarness.ts | 3 + apps/web/vitest.config.ts | 16 + bun.lock | 1246 ++++++++++++++++- package.json | 5 +- packages/client-runtime/package.json | 8 +- packages/client-runtime/src/addProject.test.ts | 146 ++ packages/client-runtime/src/addProject.ts | 224 ++++ packages/client-runtime/src/archivedThreadsState.test.ts | 96 ++ packages/client-runtime/src/archivedThreadsState.ts | 138 ++ packages/client-runtime/src/checkpointDiffState.test.ts | 135 ++ packages/client-runtime/src/checkpointDiffState.ts | 313 +++++ packages/client-runtime/src/composerPathSearchState.test.ts | 185 +++ packages/client-runtime/src/composerPathSearchState.ts | 346 +++++ packages/client-runtime/src/environmentConnection.ts | 244 ++++ packages/client-runtime/src/environmentRuntimeState.test.ts | 75 ++ packages/client-runtime/src/environmentRuntimeState.ts | 104 ++ packages/client-runtime/src/filesystemBrowseState.test.ts | 119 ++ packages/client-runtime/src/filesystemBrowseState.ts | 339 +++++ packages/client-runtime/src/gitActions.ts | 440 ++++++ packages/client-runtime/src/index.ts | 24 + packages/client-runtime/src/projectPaths.ts | 221 +++ packages/client-runtime/src/reconnectBackoff.test.ts | 65 + packages/client-runtime/src/reconnectBackoff.ts | 47 + packages/client-runtime/src/remote.test.ts | 251 ++++ packages/client-runtime/src/remote.ts | 269 ++++ packages/client-runtime/src/scoped.ts | 25 +- packages/client-runtime/src/shellSnapshotReducer.test.ts | 163 +++ packages/client-runtime/src/shellSnapshotReducer.ts | 44 + packages/client-runtime/src/shellSnapshotState.test.ts | 128 ++ packages/client-runtime/src/shellSnapshotState.ts | 140 ++ packages/client-runtime/src/shellTypes.ts | 38 + packages/client-runtime/src/sourceControlDiscoveryState.test.ts | 202 +++ packages/client-runtime/src/sourceControlDiscoveryState.ts | 241 +++- packages/client-runtime/src/terminalSessionState.test.ts | 558 ++++++++ packages/client-runtime/src/terminalSessionState.ts | 605 +++++++++ packages/client-runtime/src/threadDetailReducer.test.ts | 568 ++++++++ packages/client-runtime/src/threadDetailReducer.ts | 523 ++++++++ packages/client-runtime/src/threadDetailState.test.ts | 322 +++++ packages/client-runtime/src/threadDetailState.ts | 444 ++++++ packages/client-runtime/src/transportError.test.ts | 53 + packages/client-runtime/src/transportError.ts | 33 + packages/client-runtime/src/vcsActionState.test.ts | 292 ++++ packages/client-runtime/src/vcsActionState.ts | 458 +++++++ packages/client-runtime/src/vcsRefState.test.ts | 399 ++++++ packages/client-runtime/src/vcsRefState.ts | 451 +++++++ packages/client-runtime/src/vcsStatusState.test.ts | 330 +++++ packages/client-runtime/src/vcsStatusState.ts | 292 ++++ packages/client-runtime/src/wsRpcClient.test.ts | 186 +++ packages/client-runtime/src/wsRpcClient.ts | 348 +++++ packages/client-runtime/src/wsRpcProtocol.ts | 374 ++++++ packages/client-runtime/src/wsTransport.test.ts | 959 +++++++++++++ packages/client-runtime/src/wsTransport.ts | 370 +++++ packages/client-runtime/vitest.config.ts | 8 + packages/contracts/src/index.ts | 1 + packages/contracts/src/ipc.ts | 34 +- packages/contracts/src/review.ts | 35 + packages/contracts/src/rpc.ts | 40 + packages/contracts/src/terminal.test.ts | 81 +- packages/contracts/src/terminal.ts | 94 +- packages/shared/package.json | 16 + packages/shared/src/composerTrigger.ts | 117 ++ packages/shared/src/orchestrationTiming.ts | 54 + packages/shared/src/remote.test.ts | 68 + packages/shared/src/remote.ts | 151 +++ packages/shared/src/terminalLabels.test.ts | 54 + packages/shared/src/terminalLabels.ts | 40 + patches/@pierre%2Fdiffs@1.1.20.patch | 23 + patches/react-native-nitro-modules@0.35.4.patch | 16 + scripts/mobile-native-static-check.ts | 208 +++ 407 files changed, 55906 insertions(+), 7497 deletions(-)