Merge origin/main into orchestrator v2
Port current mainline fixes onto the orchestrator v2 architecture. Co-authored-by: codex <[email protected]>
This commit is contained in:
commit
309fcabe1f
880 files changed
+82635
-12286
No files matched your search
@@ -60,11 +60,11 @@ sequenceDiagram
|
||||
Transport-->>Browser: Hydrate initial state
|
||||
```
|
||||
|
||||
1. The browser boots [`WsTransport`][1] and registers typed listeners in [`wsNativeApi`][2].
|
||||
2. The server accepts the connection in [`wsServer`][3] and brings up the runtime graph defined in [`serverLayers`][7].
|
||||
3. [`ServerReadiness`][4] waits until the key startup barriers are complete.
|
||||
4. Once the server is ready, [`wsServer`][3] sends `server.welcome` from the contracts in [`ws.ts`][6] through [`ServerPushBus`][5].
|
||||
5. The browser receives that ordered push through [`WsTransport`][1], and [`wsNativeApi`][2] uses it to seed local client state.
|
||||
1. The browser boots `WsTransport` and registers typed listeners in `wsNativeApi`.
|
||||
2. The server accepts the connection in `wsServer` and brings up the runtime graph defined in `serverLayers`.
|
||||
3. `ServerReadiness` waits until the key startup barriers are complete.
|
||||
4. Once the server is ready, `wsServer` sends `server.welcome` from the contracts in `ws.ts` through `ServerPushBus`.
|
||||
5. The browser receives that ordered push through `WsTransport`, and `wsNativeApi` uses it to seed local client state.
|
||||
|
||||
### User turn flow
|
||||
|
||||
@@ -90,12 +90,12 @@ sequenceDiagram
|
||||
Push-->>Browser: Typed push
|
||||
```
|
||||
|
||||
1. A user action in the browser becomes a typed request through [`WsTransport`][1] and the browser API layer in [`nativeApi`][12].
|
||||
2. [`wsServer`][3] decodes that request using the shared WebSocket contracts in [`ws.ts`][6] and routes it to the right service.
|
||||
1. A user action in the browser becomes a typed request through `WsTransport` and the browser API layer in `nativeApi`.
|
||||
2. `wsServer` decodes that request using the shared WebSocket contracts in `ws.ts` and routes it to the right service.
|
||||
3. [`ProviderService`][8] starts or resumes a session and talks to `codex app-server` over JSON-RPC on stdio.
|
||||
4. Provider-native events are pulled back into the server by [`ProviderRuntimeIngestion`][9], which converts them into orchestration events.
|
||||
5. [`OrchestrationEngine`][10] persists those events, updates the read model, and exposes them as domain events.
|
||||
6. [`wsServer`][3] pushes those updates to the browser through [`ServerPushBus`][5] on channels defined in [`orchestration.ts`][11].
|
||||
6. `wsServer` pushes those updates to the browser through `ServerPushBus` on channels defined in [`orchestration.ts`][11].
|
||||
|
||||
### Async completion flow
|
||||
|
||||
@@ -123,21 +123,13 @@ sequenceDiagram
|
||||
2. These flows run as queue-backed workers using [`DrainableWorker`][16], which helps keep side effects ordered and test synchronization deterministic.
|
||||
3. When a milestone completes, the server emits a typed receipt on [`RuntimeReceiptBus`][15], such as checkpoint completion or turn quiescence.
|
||||
4. Tests and orchestration code wait on those receipts instead of polling git state, projections, or timers.
|
||||
5. Any user-visible state changes produced by that async work still go back through [`wsServer`][3] and [`ServerPushBus`][5].
|
||||
5. Any user-visible state changes produced by that async work still go back through `wsServer` and `ServerPushBus`.
|
||||
|
||||
[1]: ../apps/web/src/wsTransport.ts
|
||||
[2]: ../apps/web/src/wsNativeApi.ts
|
||||
[3]: ../apps/server/src/wsServer.ts
|
||||
[4]: ../apps/server/src/wsServer/readiness.ts
|
||||
[5]: ../apps/server/src/wsServer/pushBus.ts
|
||||
[6]: ../packages/contracts/src/ws.ts
|
||||
[7]: ../apps/server/src/serverLayers.ts
|
||||
[8]: ../apps/server/src/provider/Layers/ProviderService.ts
|
||||
[9]: ../apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
|
||||
[10]: ../apps/server/src/orchestration/Layers/OrchestrationEngine.ts
|
||||
[11]: ../packages/contracts/src/orchestration.ts
|
||||
[12]: ../apps/web/src/nativeApi.ts
|
||||
[13]: ../apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
|
||||
[14]: ../apps/server/src/orchestration/Layers/CheckpointReactor.ts
|
||||
[15]: ../apps/server/src/orchestration/Layers/RuntimeReceiptBus.ts
|
||||
[16]: ../packages/shared/src/DrainableWorker.ts
|
||||
[8]: ../../apps/server/src/provider/Layers/ProviderService.ts
|
||||
[9]: ../../apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
|
||||
[10]: ../../apps/server/src/orchestration/Layers/OrchestrationEngine.ts
|
||||
[11]: ../../packages/contracts/src/orchestration.ts
|
||||
[13]: ../../apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
|
||||
[14]: ../../apps/server/src/orchestration/Layers/CheckpointReactor.ts
|
||||
[15]: ../../apps/server/src/orchestration/Layers/RuntimeReceiptBus.ts
|
||||
[16]: ../../packages/shared/src/DrainableWorker.ts
|
||||
@@ -1,6 +1,6 @@
|
||||
# CI quality gates
|
||||
|
||||
- `.github/workflows/ci.yml` runs `bun run lint`, `bun run typecheck`, and `bun run test` on pull requests and pushes to `main`.
|
||||
- `.github/workflows/ci.yml` runs `vp check` (lint + typecheck), `vpr typecheck`, and `vp run test` on pull requests and pushes to `main`.
|
||||
- `.github/workflows/release.yml` builds macOS (`arm64` and `x64`), Linux (`x64`), and Windows (`x64`) desktop artifacts from a single `v*.*.*` tag and publishes one GitHub release.
|
||||
- The release workflow auto-enables signing only when platform credentials are present. macOS passkey builds additionally require `APPLE_TEAM_ID` and the `MACOS_PROVISIONING_PROFILE` secret; Windows uses Azure Trusted Signing. Without the core signing credentials, it still releases unsigned artifacts.
|
||||
- See [Release Checklist](./release.md) for the full release/signing setup checklist.
|
||||
@@ -56,43 +56,43 @@ Effect.fn("name")(
|
||||
|
||||
### `apps/server/src/provider/Layers/ClaudeAdapter.ts` (`62`)
|
||||
|
||||
- [x] [buildUserMessageEffect](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ClaudeAdapter.ts#L554)
|
||||
- [x] [makeClaudeAdapter](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ClaudeAdapter.ts#L913)
|
||||
- [x] [startSession](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ClaudeAdapter.ts#L2414)
|
||||
- [x] [sendTurn](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ClaudeAdapter.ts#L2887)
|
||||
- [x] [interruptTurn](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ClaudeAdapter.ts#L2975)
|
||||
- [x] [readThread](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ClaudeAdapter.ts#L2984)
|
||||
- [x] [rollbackThread](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ClaudeAdapter.ts#L2990)
|
||||
- [x] [stopSession](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ClaudeAdapter.ts#L3039)
|
||||
- [x] [buildUserMessageEffect](../../apps/server/src/provider/Layers/ClaudeAdapter.ts#L554)
|
||||
- [x] [makeClaudeAdapter](../../apps/server/src/provider/Layers/ClaudeAdapter.ts#L913)
|
||||
- [x] [startSession](../../apps/server/src/provider/Layers/ClaudeAdapter.ts#L2414)
|
||||
- [x] [sendTurn](../../apps/server/src/provider/Layers/ClaudeAdapter.ts#L2887)
|
||||
- [x] [interruptTurn](../../apps/server/src/provider/Layers/ClaudeAdapter.ts#L2975)
|
||||
- [x] [readThread](../../apps/server/src/provider/Layers/ClaudeAdapter.ts#L2984)
|
||||
- [x] [rollbackThread](../../apps/server/src/provider/Layers/ClaudeAdapter.ts#L2990)
|
||||
- [x] [stopSession](../../apps/server/src/provider/Layers/ClaudeAdapter.ts#L3039)
|
||||
- [x] Internal helpers and callback wrappers in this file
|
||||
|
||||
### `apps/server/src/git/Layers/GitCore.ts` (`58`)
|
||||
|
||||
- [x] [makeGitCore](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitCore.ts#L513)
|
||||
- [x] [handleTraceLine](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitCore.ts#L324)
|
||||
- [x] [emitCompleteLines](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitCore.ts#L455)
|
||||
- [x] [commit](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitCore.ts#L1190)
|
||||
- [x] [pushCurrentBranch](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitCore.ts#L1223)
|
||||
- [x] [pullCurrentBranch](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitCore.ts#L1323)
|
||||
- [x] [checkoutBranch](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitCore.ts#L1727)
|
||||
- [x] [makeGitCore](../../apps/server/src/git/Layers/GitCore.ts#L513)
|
||||
- [x] [handleTraceLine](../../apps/server/src/git/Layers/GitCore.ts#L324)
|
||||
- [x] [emitCompleteLines](../../apps/server/src/git/Layers/GitCore.ts#L455)
|
||||
- [x] [commit](../../apps/server/src/git/Layers/GitCore.ts#L1190)
|
||||
- [x] [pushCurrentBranch](../../apps/server/src/git/Layers/GitCore.ts#L1223)
|
||||
- [x] [pullCurrentBranch](../../apps/server/src/git/Layers/GitCore.ts#L1323)
|
||||
- [x] [checkoutBranch](../../apps/server/src/git/Layers/GitCore.ts#L1727)
|
||||
- [x] Service methods and callback wrappers in this file
|
||||
|
||||
### `apps/server/src/git/Layers/GitManager.ts` (`28`)
|
||||
|
||||
- [x] [configurePullRequestHeadUpstream](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitManager.ts#L387)
|
||||
- [x] [materializePullRequestHeadBranch](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitManager.ts#L428)
|
||||
- [x] [findOpenPr](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitManager.ts#L576)
|
||||
- [x] [findLatestPr](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitManager.ts#L602)
|
||||
- [x] [runCommitStep](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitManager.ts#L728)
|
||||
- [x] [runPrStep](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitManager.ts#L842)
|
||||
- [x] [runFeatureBranchStep](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/GitManager.ts#L1106)
|
||||
- [x] [configurePullRequestHeadUpstream](../../apps/server/src/git/Layers/GitManager.ts#L387)
|
||||
- [x] [materializePullRequestHeadBranch](../../apps/server/src/git/Layers/GitManager.ts#L428)
|
||||
- [x] [findOpenPr](../../apps/server/src/git/Layers/GitManager.ts#L576)
|
||||
- [x] [findLatestPr](../../apps/server/src/git/Layers/GitManager.ts#L602)
|
||||
- [x] [runCommitStep](../../apps/server/src/git/Layers/GitManager.ts#L728)
|
||||
- [x] [runPrStep](../../apps/server/src/git/Layers/GitManager.ts#L842)
|
||||
- [x] [runFeatureBranchStep](../../apps/server/src/git/Layers/GitManager.ts#L1106)
|
||||
- [x] Remaining helpers and nested callback wrappers in this file
|
||||
|
||||
### `apps/server/src/orchestration/Layers/ProjectionPipeline.ts` (`25`)
|
||||
|
||||
- [x] [runProjectorForEvent](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/ProjectionPipeline.ts#L1161)
|
||||
- [x] [applyProjectsProjection](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/ProjectionPipeline.ts#L357)
|
||||
- [x] [applyThreadsProjection](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/ProjectionPipeline.ts#L415)
|
||||
- [x] [runProjectorForEvent](../../apps/server/src/orchestration/Layers/ProjectionPipeline.ts#L1161)
|
||||
- [x] [applyProjectsProjection](../../apps/server/src/orchestration/Layers/ProjectionPipeline.ts#L357)
|
||||
- [x] [applyThreadsProjection](../../apps/server/src/orchestration/Layers/ProjectionPipeline.ts#L415)
|
||||
- [x] `Effect.forEach(..., threadId => Effect.gen(...))` callbacks around `L250`
|
||||
- [x] `Effect.forEach(..., entry => Effect.gen(...))` callbacks around `L264`
|
||||
- [x] `Effect.forEach(..., entry => Effect.gen(...))` callbacks around `L305`
|
||||
@@ -100,98 +100,98 @@ Effect.fn("name")(
|
||||
|
||||
### `apps/server/src/provider/Layers/ProviderService.ts` (`24`)
|
||||
|
||||
- [ ] [makeProviderService](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L134)
|
||||
- [ ] [recoverSessionForThread](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L196)
|
||||
- [ ] [resolveRoutableSession](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L255)
|
||||
- [ ] [startSession](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L284)
|
||||
- [ ] [sendTurn](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L347)
|
||||
- [ ] [interruptTurn](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L393)
|
||||
- [ ] [respondToRequest](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L411)
|
||||
- [ ] [respondToUserInput](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L430)
|
||||
- [ ] [stopSession](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L445)
|
||||
- [ ] [listSessions](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L466)
|
||||
- [ ] [rollbackConversation](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L516)
|
||||
- [ ] [runStopAll](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderService.ts#L538)
|
||||
- [ ] [makeProviderService](../../apps/server/src/provider/Layers/ProviderService.ts#L134)
|
||||
- [ ] [recoverSessionForThread](../../apps/server/src/provider/Layers/ProviderService.ts#L196)
|
||||
- [ ] [resolveRoutableSession](../../apps/server/src/provider/Layers/ProviderService.ts#L255)
|
||||
- [ ] [startSession](../../apps/server/src/provider/Layers/ProviderService.ts#L284)
|
||||
- [ ] [sendTurn](../../apps/server/src/provider/Layers/ProviderService.ts#L347)
|
||||
- [ ] [interruptTurn](../../apps/server/src/provider/Layers/ProviderService.ts#L393)
|
||||
- [ ] [respondToRequest](../../apps/server/src/provider/Layers/ProviderService.ts#L411)
|
||||
- [ ] [respondToUserInput](../../apps/server/src/provider/Layers/ProviderService.ts#L430)
|
||||
- [ ] [stopSession](../../apps/server/src/provider/Layers/ProviderService.ts#L445)
|
||||
- [ ] [listSessions](../../apps/server/src/provider/Layers/ProviderService.ts#L466)
|
||||
- [ ] [rollbackConversation](../../apps/server/src/provider/Layers/ProviderService.ts#L516)
|
||||
- [ ] [runStopAll](../../apps/server/src/provider/Layers/ProviderService.ts#L538)
|
||||
|
||||
### `apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts` (`14`)
|
||||
|
||||
- [x] [finalizeAssistantMessage](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts#L680)
|
||||
- [x] [upsertProposedPlan](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts#L722)
|
||||
- [x] [finalizeBufferedProposedPlan](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts#L761)
|
||||
- [x] [clearTurnStateForSession](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts#L800)
|
||||
- [x] [processRuntimeEvent](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts#L908)
|
||||
- [x] [finalizeAssistantMessage](../../apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts#L680)
|
||||
- [x] [upsertProposedPlan](../../apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts#L722)
|
||||
- [x] [finalizeBufferedProposedPlan](../../apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts#L761)
|
||||
- [x] [clearTurnStateForSession](../../apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts#L800)
|
||||
- [x] [processRuntimeEvent](../../apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts#L908)
|
||||
- [x] Nested callback wrappers in this file
|
||||
|
||||
### `apps/server/src/provider/Layers/CodexAdapter.ts` (`12`)
|
||||
|
||||
- [x] [makeCodexAdapter](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/CodexAdapter.ts#L1317)
|
||||
- [x] [sendTurn](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/CodexAdapter.ts#L1399)
|
||||
- [x] [writeNativeEvent](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/CodexAdapter.ts#L1546)
|
||||
- [x] [listener](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/CodexAdapter.ts#L1555)
|
||||
- [x] [makeCodexAdapter](../../apps/server/src/provider/Layers/CodexAdapter.ts#L1317)
|
||||
- [x] [sendTurn](../../apps/server/src/provider/Layers/CodexAdapter.ts#L1399)
|
||||
- [x] [writeNativeEvent](../../apps/server/src/provider/Layers/CodexAdapter.ts#L1546)
|
||||
- [x] [listener](../../apps/server/src/provider/Layers/CodexAdapter.ts#L1555)
|
||||
- [x] Remaining nested callback wrappers in this file
|
||||
|
||||
### `apps/server/src/checkpointing/CheckpointStore.ts` (`10`)
|
||||
|
||||
- [ ] [captureCheckpoint](/Users/julius/Development/Work/codething-mvp/apps/server/src/checkpointing/CheckpointStore.ts#L123)
|
||||
- [ ] [restoreCheckpoint](/Users/julius/Development/Work/codething-mvp/apps/server/src/checkpointing/CheckpointStore.ts#L137)
|
||||
- [ ] [diffCheckpoints](/Users/julius/Development/Work/codething-mvp/apps/server/src/checkpointing/CheckpointStore.ts#L144)
|
||||
- [ ] [deleteCheckpointRefs](/Users/julius/Development/Work/codething-mvp/apps/server/src/checkpointing/CheckpointStore.ts#L151)
|
||||
- [ ] [captureCheckpoint](../../apps/server/src/checkpointing/CheckpointStore.ts#L123)
|
||||
- [ ] [restoreCheckpoint](../../apps/server/src/checkpointing/CheckpointStore.ts#L137)
|
||||
- [ ] [diffCheckpoints](../../apps/server/src/checkpointing/CheckpointStore.ts#L144)
|
||||
- [ ] [deleteCheckpointRefs](../../apps/server/src/checkpointing/CheckpointStore.ts#L151)
|
||||
- [ ] Nested callback wrappers in this file
|
||||
|
||||
### `apps/server/src/provider/Layers/EventNdjsonLogger.ts` (`9`)
|
||||
|
||||
- [ ] [toLogMessage](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/EventNdjsonLogger.ts#L77)
|
||||
- [ ] [makeThreadWriter](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/EventNdjsonLogger.ts#L102)
|
||||
- [ ] [makeEventNdjsonLogger](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/EventNdjsonLogger.ts#L174)
|
||||
- [ ] [write](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/EventNdjsonLogger.ts#L231)
|
||||
- [ ] [close](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/EventNdjsonLogger.ts#L247)
|
||||
- [ ] [toLogMessage](../../apps/server/src/provider/Layers/EventNdjsonLogger.ts#L77)
|
||||
- [ ] [makeThreadWriter](../../apps/server/src/provider/Layers/EventNdjsonLogger.ts#L102)
|
||||
- [ ] [makeEventNdjsonLogger](../../apps/server/src/provider/Layers/EventNdjsonLogger.ts#L174)
|
||||
- [ ] [write](../../apps/server/src/provider/Layers/EventNdjsonLogger.ts#L231)
|
||||
- [ ] [close](../../apps/server/src/provider/Layers/EventNdjsonLogger.ts#L247)
|
||||
- [ ] Flush and writer-resolution callback wrappers in this file
|
||||
|
||||
### `apps/server/scripts/cli.ts` (`8`)
|
||||
|
||||
- [ ] Command handlers around [cli.ts](/Users/julius/Development/Work/codething-mvp/apps/server/scripts/cli.ts#L125)
|
||||
- [ ] Command handlers around [cli.ts](/Users/julius/Development/Work/codething-mvp/apps/server/scripts/cli.ts#L170)
|
||||
- [ ] Resource callbacks around [cli.ts](/Users/julius/Development/Work/codething-mvp/apps/server/scripts/cli.ts#L221)
|
||||
- [ ] Resource callbacks around [cli.ts](/Users/julius/Development/Work/codething-mvp/apps/server/scripts/cli.ts#L239)
|
||||
- [ ] Command handlers around [cli.ts](../../apps/server/scripts/cli.ts#L125)
|
||||
- [ ] Command handlers around [cli.ts](../../apps/server/scripts/cli.ts#L170)
|
||||
- [ ] Resource callbacks around [cli.ts](../../apps/server/scripts/cli.ts#L221)
|
||||
- [ ] Resource callbacks around [cli.ts](../../apps/server/scripts/cli.ts#L239)
|
||||
|
||||
### `apps/server/src/orchestration/Layers/OrchestrationEngine.ts` (`7`)
|
||||
|
||||
- [ ] [processEnvelope](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/OrchestrationEngine.ts#L64)
|
||||
- [ ] [dispatch](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/OrchestrationEngine.ts#L218)
|
||||
- [ ] Catch/stream callback wrappers around [OrchestrationEngine.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/OrchestrationEngine.ts#L162)
|
||||
- [ ] Catch/stream callback wrappers around [OrchestrationEngine.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/OrchestrationEngine.ts#L200)
|
||||
- [ ] [processEnvelope](../../apps/server/src/orchestration/Layers/OrchestrationEngine.ts#L64)
|
||||
- [ ] [dispatch](../../apps/server/src/orchestration/Layers/OrchestrationEngine.ts#L218)
|
||||
- [ ] Catch/stream callback wrappers around [OrchestrationEngine.ts](../../apps/server/src/orchestration/Layers/OrchestrationEngine.ts#L162)
|
||||
- [ ] Catch/stream callback wrappers around [OrchestrationEngine.ts](../../apps/server/src/orchestration/Layers/OrchestrationEngine.ts#L200)
|
||||
|
||||
### `apps/server/src/orchestration/projector.ts` (`5`)
|
||||
|
||||
- [ ] `switch` branch wrapper at [projector.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/projector.ts#L242)
|
||||
- [ ] `switch` branch wrapper at [projector.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/projector.ts#L336)
|
||||
- [ ] `switch` branch wrapper at [projector.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/projector.ts#L397)
|
||||
- [ ] `switch` branch wrapper at [projector.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/projector.ts#L446)
|
||||
- [ ] `switch` branch wrapper at [projector.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/projector.ts#L478)
|
||||
- [ ] `switch` branch wrapper at [projector.ts](../../apps/server/src/orchestration/projector.ts#L242)
|
||||
- [ ] `switch` branch wrapper at [projector.ts](../../apps/server/src/orchestration/projector.ts#L336)
|
||||
- [ ] `switch` branch wrapper at [projector.ts](../../apps/server/src/orchestration/projector.ts#L397)
|
||||
- [ ] `switch` branch wrapper at [projector.ts](../../apps/server/src/orchestration/projector.ts#L446)
|
||||
- [ ] `switch` branch wrapper at [projector.ts](../../apps/server/src/orchestration/projector.ts#L478)
|
||||
|
||||
### Smaller clusters
|
||||
|
||||
- [ ] [packages/shared/src/DrainableWorker.ts](/Users/julius/Development/Work/codething-mvp/packages/shared/src/DrainableWorker.ts) (`4`)
|
||||
- [ ] [apps/server/src/wsServer/pushBus.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/wsServer/pushBus.ts) (`4`)
|
||||
- [ ] [apps/server/src/wsServer.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/wsServer.ts) (`4`)
|
||||
- [ ] [apps/server/src/provider/Layers/ProviderRegistry.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderRegistry.ts) (`4`)
|
||||
- [ ] [apps/server/src/persistence/Layers/Sqlite.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/persistence/Layers/Sqlite.ts) (`4`)
|
||||
- [ ] [apps/server/src/orchestration/Layers/ProviderCommandReactor.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/orchestration/Layers/ProviderCommandReactor.ts) (`4`)
|
||||
- [ ] [apps/server/src/main.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/main.ts) (`4`)
|
||||
- [ ] [apps/server/src/keybindings.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/keybindings.ts) (`4`)
|
||||
- [ ] [apps/server/src/git/Layers/CodexTextGeneration.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/CodexTextGeneration.ts) (`4`)
|
||||
- [ ] [apps/server/src/serverLayers.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/serverLayers.ts) (`3`)
|
||||
- [ ] [apps/server/src/telemetry/Layers/AnalyticsService.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/telemetry/Layers/AnalyticsService.ts) (`2`)
|
||||
- [ ] [apps/server/src/telemetry/Identify.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/telemetry/Identify.ts) (`2`)
|
||||
- [ ] [apps/server/src/provider/Layers/ProviderAdapterRegistry.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ProviderAdapterRegistry.ts) (`2`)
|
||||
- [ ] [apps/server/src/provider/Layers/CodexProvider.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/CodexProvider.ts) (`2`)
|
||||
- [ ] [apps/server/src/provider/Layers/ClaudeProvider.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/Layers/ClaudeProvider.ts) (`2`)
|
||||
- [ ] [apps/server/src/persistence/NodeSqliteClient.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/persistence/NodeSqliteClient.ts) (`2`)
|
||||
- [ ] [apps/server/src/persistence/Migrations.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/persistence/Migrations.ts) (`2`)
|
||||
- [ ] [apps/server/src/open.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/open.ts) (`2`)
|
||||
- [ ] [apps/server/src/git/Layers/ClaudeTextGeneration.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/git/Layers/ClaudeTextGeneration.ts) (`2`)
|
||||
- [ ] [apps/server/src/checkpointing/CheckpointDiffQuery.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/checkpointing/CheckpointDiffQuery.ts) (`2`)
|
||||
- [ ] [apps/server/src/provider/makeManagedServerProvider.ts](/Users/julius/Development/Work/codething-mvp/apps/server/src/provider/makeManagedServerProvider.ts) (`1`)
|
||||
- [ ] [packages/shared/src/DrainableWorker.ts](../../packages/shared/src/DrainableWorker.ts) (`4`)
|
||||
- [ ] [apps/server/src/wsServer/pushBus.ts](../../apps/server/src/wsServer/pushBus.ts) (`4`)
|
||||
- [ ] [apps/server/src/wsServer.ts](../../apps/server/src/wsServer.ts) (`4`)
|
||||
- [ ] [apps/server/src/provider/Layers/ProviderRegistry.ts](../../apps/server/src/provider/Layers/ProviderRegistry.ts) (`4`)
|
||||
- [ ] [apps/server/src/persistence/Layers/Sqlite.ts](../../apps/server/src/persistence/Layers/Sqlite.ts) (`4`)
|
||||
- [ ] [apps/server/src/orchestration/Layers/ProviderCommandReactor.ts](../../apps/server/src/orchestration/Layers/ProviderCommandReactor.ts) (`4`)
|
||||
- [ ] [apps/server/src/main.ts](../../apps/server/src/main.ts) (`4`)
|
||||
- [ ] [apps/server/src/keybindings.ts](../../apps/server/src/keybindings.ts) (`4`)
|
||||
- [ ] [apps/server/src/git/Layers/CodexTextGeneration.ts](../../apps/server/src/git/Layers/CodexTextGeneration.ts) (`4`)
|
||||
- [ ] [apps/server/src/serverLayers.ts](../../apps/server/src/serverLayers.ts) (`3`)
|
||||
- [ ] [apps/server/src/telemetry/Layers/AnalyticsService.ts](../../apps/server/src/telemetry/Layers/AnalyticsService.ts) (`2`)
|
||||
- [ ] [apps/server/src/telemetry/Identify.ts](../../apps/server/src/telemetry/Identify.ts) (`2`)
|
||||
- [ ] [apps/server/src/provider/Layers/ProviderAdapterRegistry.ts](../../apps/server/src/provider/Layers/ProviderAdapterRegistry.ts) (`2`)
|
||||
- [ ] [apps/server/src/provider/Layers/CodexProvider.ts](../../apps/server/src/provider/Layers/CodexProvider.ts) (`2`)
|
||||
- [ ] [apps/server/src/provider/Layers/ClaudeProvider.ts](../../apps/server/src/provider/Layers/ClaudeProvider.ts) (`2`)
|
||||
- [ ] [apps/server/src/persistence/NodeSqliteClient.ts](../../apps/server/src/persistence/NodeSqliteClient.ts) (`2`)
|
||||
- [ ] [apps/server/src/persistence/Migrations.ts](../../apps/server/src/persistence/Migrations.ts) (`2`)
|
||||
- [ ] [apps/server/src/open.ts](../../apps/server/src/open.ts) (`2`)
|
||||
- [ ] [apps/server/src/git/Layers/ClaudeTextGeneration.ts](../../apps/server/src/git/Layers/ClaudeTextGeneration.ts) (`2`)
|
||||
- [ ] [apps/server/src/checkpointing/CheckpointDiffQuery.ts](../../apps/server/src/checkpointing/CheckpointDiffQuery.ts) (`2`)
|
||||
- [ ] [apps/server/src/provider/makeManagedServerProvider.ts](../../apps/server/src/provider/makeManagedServerProvider.ts) (`1`)
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
# Mobile app-store screenshot harness
|
||||
|
||||
The screenshot harness runs the real mobile application against three disposable local T3
|
||||
environments. It creates an isolated base directory and server for each environment, real Git
|
||||
projects with deterministic content, seeded orchestration projections, and persisted terminal
|
||||
history. The app pairs with every server through its normal connection flow and React Navigation
|
||||
opens the production Home, Thread, ThreadTerminal, ThreadReview, and SettingsEnvironments routes.
|
||||
|
||||
No screenshot-specific screen recreates application UI. `EXPO_PUBLIC_SHOWCASE=1` only enables the
|
||||
non-rendering pairing/readiness coordinator, disables terminal autofocus so captures do not contain
|
||||
the software keyboard, and supplies deterministic T3 Connect discovery rows to the real
|
||||
Environments screen. The local environment cards always come from real paired servers.
|
||||
|
||||
## Capture the default matrix
|
||||
|
||||
From the repository root:
|
||||
|
||||
pnpm screenshots:mobile
|
||||
|
||||
The command:
|
||||
|
||||
1. Creates three temporary T3 base directories and starts a local server for each on an available
|
||||
port.
|
||||
2. Creates T3 Code, React, and Linux Git repositories with recognizable favicons, feature branches,
|
||||
and a deterministic T3 Code review diff.
|
||||
3. Seeds each server's migrated SQLite database with playful threads, messages, activities, and
|
||||
terminal history, then adds two persisted mobile-outbox tasks waiting to send.
|
||||
4. Starts an isolated Metro server, builds the selected native apps, and boots each device.
|
||||
5. Pairs each clean app installation with Moonbase Terminal, Suspense Station, and Kernel Cabin.
|
||||
6. Navigates to the real application route for every requested scene.
|
||||
7. Sets the requested system appearance and normalizes status bars, converts captures to 24-bit RGB PNGs without alpha, and
|
||||
validates dimensions, aspect ratio, file size, and screenshot count before succeeding.
|
||||
8. Writes store-ready folders beneath `artifacts/app-store/screenshots/` that can be uploaded
|
||||
directly to App Store Connect or Google Play Console.
|
||||
|
||||
The servers, Metro, temporary root directory, and devices started by the runner are cleaned up after
|
||||
capture. Pass `--keep-running` to retain them for inspection; the runner prints the base-directory
|
||||
paths and server ports.
|
||||
|
||||
Captures wait for the real environment snapshot to hydrate and for the requested route to become
|
||||
active. Both platforms record readiness in the simulator/emulator app container. A final settle
|
||||
delay allows native terminal and Git review data to finish rendering.
|
||||
|
||||
A full capture regenerates the selected native project with Expo's clean development prebuild before
|
||||
building it. Use --skip-build for repeated captures after the first build.
|
||||
|
||||
The harness uses its own Metro port (8199 by default), so an ordinary mobile server or another
|
||||
worktree cannot accidentally provide the bundle being photographed.
|
||||
|
||||
The default matrix is:
|
||||
|
||||
| Output folder | Capture target | Upload dimensions | Store slot |
|
||||
| ------------------------------------- | ------------------------- | ----------------- | ----------------------------------------- |
|
||||
| `apple/iphone-6.9/{light,dark}/` | iPhone 17 Pro Max | 1320×2868 | App Store Connect iPhone 6.9-inch |
|
||||
| `apple/iphone-6.5/{light,dark}/` | disposable iPhone 14 Plus | 1284×2778 | App Store Connect iPhone 6.5-inch |
|
||||
| `apple/ipad-13/{light,dark}/` | iPad Pro 13-inch (M5) | 2064×2752 | App Store Connect iPad 13-inch |
|
||||
| `google-play/phone/{light,dark}/` | Pixel AVD at 420 dpi | 1080×1920 | Google Play phone, portrait 9:16 |
|
||||
| `google-play/tablet-7/{light,dark}/` | Pixel AVD at 600dp width | 1080×1920 | Google Play 7-inch tablet, portrait 9:16 |
|
||||
| `google-play/tablet-10/{light,dark}/` | Pixel AVD at 800dp width | 1440×2560 | Google Play 10-inch tablet, portrait 9:16 |
|
||||
|
||||
Each target captures thread, terminal, review, thread list, and environments, producing 30 PNG
|
||||
files for one appearance or 60 for both. Each appearance folder's five screenshots satisfy the configured Apple limit of 1–10, Google
|
||||
phone requirement of 2–8, and Google tablet recommendation/slot minimum of 4 with a maximum of 8.
|
||||
|
||||
The generated tree is deliberately aligned with the store upload fields:
|
||||
|
||||
artifacts/app-store/screenshots/
|
||||
├── apple/
|
||||
│ ├── iphone-6.9/{light,dark}/{thread,terminal,review,threads,environments}.png
|
||||
│ ├── iphone-6.5/{light,dark}/{thread,terminal,review,threads,environments}.png
|
||||
│ └── ipad-13/{light,dark}/{thread,terminal,review,threads,environments}.png
|
||||
└── google-play/
|
||||
├── phone/{light,dark}/{thread,terminal,review,threads,environments}.png
|
||||
├── tablet-7/{light,dark}/{thread,terminal,review,threads,environments}.png
|
||||
└── tablet-10/{light,dark}/{thread,terminal,review,threads,environments}.png
|
||||
|
||||
Edit [mobile-showcase.config.ts](../../scripts/mobile-showcase.config.ts) to change simulator or AVD
|
||||
names, light/dark appearance, scenes, output directory, capture delay, Android ABI, or viewport.
|
||||
|
||||
## Capture in GitHub Actions
|
||||
|
||||
Run the `Mobile Showcase Screenshots` workflow from GitHub's Actions tab, choose `all`, `ios`, or
|
||||
`android`, and select `light`, `dark`, or `both`. The default dispatch captures both appearances and
|
||||
runs iOS and Android concurrently: iPhone and iPad capture on a
|
||||
12-vCPU Blacksmith macOS runner, while Android phone, 7-inch tablet, and 10-inch tablet capture on a
|
||||
16-vCPU Blacksmith Linux runner with a KVM-accelerated x86_64 emulator.
|
||||
|
||||
Every job uploads its PNGs even when a later capture fails, which makes partial runs useful for
|
||||
diagnosis. Download `app-store-connect-screenshots` and `google-play-screenshots` from the workflow
|
||||
run's Artifacts section. Each job runs validation again immediately before upload. Artifacts are
|
||||
retained for 14 days.
|
||||
|
||||
The workflow uses the same checked-in device and scene matrix as local capture. Android remains
|
||||
ARM64 by default for local Apple Silicon development; CI sets `T3_SHOWCASE_ANDROID_ABI=x86_64` so the
|
||||
debug APK matches its accelerated emulator.
|
||||
|
||||
## Fast iteration
|
||||
|
||||
Capture one scene or device:
|
||||
|
||||
pnpm screenshots:mobile --device iphone-6.9 --scene thread
|
||||
pnpm screenshots:mobile --platform android --scene review
|
||||
|
||||
Override the configured appearance or capture both variants:
|
||||
|
||||
pnpm screenshots:mobile --appearance light
|
||||
pnpm screenshots:mobile --appearance dark
|
||||
pnpm screenshots:mobile --appearance both
|
||||
|
||||
Reuse the native build and retain the disposable environment:
|
||||
|
||||
pnpm screenshots:mobile --device ipad-13 --skip-build --keep-running
|
||||
|
||||
Run Metro separately:
|
||||
|
||||
pnpm --filter @t3tools/mobile showcase
|
||||
pnpm screenshots:mobile --skip-build --skip-metro --device iphone-6.9
|
||||
|
||||
List the matrix and flags:
|
||||
|
||||
pnpm screenshots:mobile --list
|
||||
|
||||
Validate existing files without starting Metro, servers, simulators, or emulators:
|
||||
|
||||
pnpm screenshots:mobile --validate-only
|
||||
pnpm screenshots:mobile --platform ios --validate-only
|
||||
|
||||
## Customize the seeded environment
|
||||
|
||||
- Project repository, thread projections, conversation, terminal transcript, and Git changes:
|
||||
[mobile-showcase-environment.ts](../../scripts/mobile-showcase-environment.ts)
|
||||
- Device and capture matrix:
|
||||
[mobile-showcase.config.ts](../../scripts/mobile-showcase.config.ts)
|
||||
- Simulator/emulator orchestration:
|
||||
[mobile-showcase.ts](../../scripts/mobile-showcase.ts)
|
||||
|
||||
Fixture timestamps are generated relative to capture startup so every route shows stable relative
|
||||
labels while the server still receives valid current data. The same deterministic three-environment
|
||||
ensemble serves iPhone, iPad, Android phone, and Android tablet captures; responsive differences
|
||||
come entirely from the production app layout.
|
||||
|
||||
The Pending rows use the production offline outbox and point at the real T3 Code and React fixture
|
||||
projects. Showcase coordination holds those two entries in the outbox for capture, just like a task
|
||||
currently open for editing, so reconnecting the seeded environments cannot deliver and remove them
|
||||
before the screenshot is taken.
|
||||
|
||||
The Environments capture presents the three local fixture transports as a Tailscale HTTPS hostname,
|
||||
a Helsinki VPS hostname, and a Tailnet IPv4 address. This display-only substitution keeps the cards
|
||||
remote-first while the harness retains reliable loopback connections to its ephemeral servers.
|
||||
|
||||
## Local prerequisites
|
||||
|
||||
- iOS: Xcode command-line tools, the configured simulator runtimes, and installed CocoaPods.
|
||||
- Android: ANDROID_HOME (or the default macOS SDK path), adb, emulator, and the configured AVD.
|
||||
|
||||
The harness is the source of truth for upload dimensions; do not resize its output. If store rules
|
||||
change, update the target's `storeAsset` specification. Capture fails when a PNG is the wrong size,
|
||||
has alpha, is not 8-bit RGB, exceeds the configured file-size limit, violates Google Play's 9:16
|
||||
shape/bounds, or leaves a full output set below its store minimum.
|
||||
@@ -165,16 +165,24 @@ The backend reads observability config at process start. If you change OTLP env
|
||||
|
||||
The trace file is the fastest way to inspect raw span data.
|
||||
|
||||
Resolve the production or explicitly configured trace file once. Runtime state lives under the
|
||||
base directory's `userdata` folder:
|
||||
|
||||
```bash
|
||||
TRACE_FILE="${T3CODE_HOME:-$HOME/.t3}/userdata/logs/server.trace.ndjson"
|
||||
```
|
||||
|
||||
Tail it:
|
||||
|
||||
```bash
|
||||
tail -f "$T3CODE_HOME/userdata/logs/server.trace.ndjson"
|
||||
tail -f "$TRACE_FILE"
|
||||
```
|
||||
|
||||
In monorepo dev, use:
|
||||
For an implicit monorepo dev server, use:
|
||||
|
||||
```bash
|
||||
tail -f ./dev/logs/server.trace.ndjson
|
||||
TRACE_FILE="$HOME/.t3/dev/logs/server.trace.ndjson"
|
||||
tail -f "$TRACE_FILE"
|
||||
```
|
||||
|
||||
Show failed spans:
|
||||
@@ -185,7 +193,7 @@ jq -c 'select(.exit._tag != "Success") | {
|
||||
durationMs,
|
||||
exit,
|
||||
attributes
|
||||
}' "$T3CODE_HOME/userdata/logs/server.trace.ndjson"
|
||||
}' "$TRACE_FILE"
|
||||
```
|
||||
|
||||
Show slow spans:
|
||||
@@ -196,7 +204,7 @@ jq -c 'select(.durationMs > 1000) | {
|
||||
durationMs,
|
||||
traceId,
|
||||
spanId
|
||||
}' "$T3CODE_HOME/userdata/logs/server.trace.ndjson"
|
||||
}' "$TRACE_FILE"
|
||||
```
|
||||
|
||||
Inspect embedded log events:
|
||||
@@ -213,7 +221,7 @@ jq -c 'select(any(.events[]?; .attributes["effect.logLevel"] != null)) | {
|
||||
level: .attributes["effect.logLevel"]
|
||||
}
|
||||
]
|
||||
}' "$T3CODE_HOME/userdata/logs/server.trace.ndjson"
|
||||
}' "$TRACE_FILE"
|
||||
```
|
||||
|
||||
Follow one trace:
|
||||
@@ -224,7 +232,7 @@ jq -r 'select(.traceId == "TRACE_ID_HERE") | [
|
||||
.spanId,
|
||||
(.parentSpanId // "-"),
|
||||
.durationMs
|
||||
] | @tsv' "$T3CODE_HOME/userdata/logs/server.trace.ndjson"
|
||||
] | @tsv' "$TRACE_FILE"
|
||||
```
|
||||
|
||||
Filter orchestration commands:
|
||||
@@ -235,7 +243,7 @@ jq -c 'select(.attributes["orchestration.command_type"] != null) | {
|
||||
durationMs,
|
||||
commandType: .attributes["orchestration.command_type"],
|
||||
aggregateKind: .attributes["orchestration.aggregate_kind"]
|
||||
}' "$T3CODE_HOME/userdata/logs/server.trace.ndjson"
|
||||
}' "$TRACE_FILE"
|
||||
```
|
||||
|
||||
Filter git activity:
|
||||
@@ -250,7 +258,7 @@ jq -c 'select(.attributes["git.operation"] != null) | {
|
||||
.events[]
|
||||
| select(.name == "git.hook.started" or .name == "git.hook.finished")
|
||||
]
|
||||
}' "$T3CODE_HOME/userdata/logs/server.trace.ndjson"
|
||||
}' "$TRACE_FILE"
|
||||
```
|
||||
|
||||
### Use Tempo When You Need A Real Trace Viewer
|
||||
|
||||
+21
-19
@@ -1,29 +1,31 @@
|
||||
# Scripts
|
||||
|
||||
- `bun run dev` — Starts contracts, server, and web in `turbo watch` mode.
|
||||
- `bun run dev:server` — Starts just the WebSocket server (uses Bun TypeScript execution).
|
||||
- `bun run dev:web` — Starts just the Vite dev server for the web app.
|
||||
- Dev commands default `T3CODE_STATE_DIR` to `~/.t3/dev` to keep dev state isolated from desktop/prod state.
|
||||
- Override server CLI-equivalent flags from root dev commands with `--`, for example:
|
||||
`bun run dev -- --base-dir ~/.t3-2`
|
||||
- `bun run start` — Runs the production server (serves built web app as static files).
|
||||
- `bun run build` — Builds contracts, web app, and server through Turbo.
|
||||
- `bun run typecheck` — Strict TypeScript checks for all packages.
|
||||
- `bun run test` — Runs workspace tests.
|
||||
- `bun run dist:desktop:artifact -- --platform <mac|linux|win> --target <target> --arch <arch>` — Builds a desktop artifact for a specific platform/target/arch.
|
||||
- `bun run dist:desktop:dmg` — Builds a shareable macOS `.dmg` into `./release`.
|
||||
- `bun run dist:desktop:dmg:x64` — Builds an Intel macOS `.dmg`.
|
||||
- `bun run dist:desktop:linux` — Builds a Linux AppImage into `./release`.
|
||||
- `bun run dist:desktop:win` — Builds a Windows NSIS installer into `./release`.
|
||||
- `vp run dev` — Starts contracts, server, and web in watch mode.
|
||||
- `vp run dev:server` — Starts just the WebSocket server. The server process runs on Bun (`@effect/platform-bun` + `BunPtyAdapter`), but task running uses `vp run`.
|
||||
- `vp run dev:web` — Starts just the Vite dev server for the web app.
|
||||
- Dev commands implicitly use `~/.t3/dev`, keeping development state separate from `~/.t3/userdata`. An explicit `--home-dir <path>` stores state under `<path>/userdata`; the base directory remains available for caches, worktrees, and other shared data.
|
||||
- Web dev commands do not auto-open a browser. Open the one-time pairing URL printed by the server so the first browser navigation is authenticated. Set `T3CODE_NO_BROWSER=0` only when interactive auto-open is intentional.
|
||||
- Pass dev-runner flags directly after the root task name, for example:
|
||||
`vp run dev --home-dir /tmp/t3code-dev`
|
||||
- `vp run start` — Runs the production server (serves built web app as static files).
|
||||
- `vp run build` — Builds contracts, web app, and server.
|
||||
- `vp run typecheck` — Strict TypeScript checks for all packages.
|
||||
- `vp run test` — Runs workspace tests.
|
||||
- `node apps/server/scripts/t3-sqlite-state.ts <query|exec> --base-dir <path> ...` — Inspects or seeds an isolated T3 SQLite database; writes create a private backup first.
|
||||
- `vp run dist:desktop:artifact -- --platform <mac|linux|win> --target <target> --arch <arch>` — Builds a desktop artifact for a specific platform/target/arch.
|
||||
- `vp run dist:desktop:dmg` — Builds a shareable macOS `.dmg` into `./release`.
|
||||
- `vp run dist:desktop:dmg:x64` — Builds an Intel macOS `.dmg`.
|
||||
- `vp run dist:desktop:linux` — Builds a Linux AppImage into `./release`.
|
||||
- `vp run dist:desktop:win` — Builds a Windows NSIS installer into `./release`.
|
||||
|
||||
## Desktop `.dmg` packaging notes
|
||||
|
||||
- Default build is unsigned/not notarized for local sharing.
|
||||
- The DMG build uses `assets/macos-icon-1024.png` as the production app icon source.
|
||||
- The DMG build uses `assets/prod/black-macos-1024.png` as the production app icon source.
|
||||
- Desktop production windows load the bundled UI from `t3code://app/index.html` (not a `127.0.0.1` document URL).
|
||||
- Desktop packaging includes `apps/server/dist` (the `t3` backend) and starts it on loopback with an auth token for WebSocket/API traffic.
|
||||
- Your tester can still open it on macOS by right-clicking the app and choosing **Open** on first launch.
|
||||
- To keep staging files for debugging package contents, run: `bun run dist:desktop:dmg -- --keep-stage`
|
||||
- To keep staging files for debugging package contents, run: `vp run dist:desktop:dmg -- --keep-stage`
|
||||
- To allow code-signing/notarization when configured in CI/secrets, add: `--signed`.
|
||||
- Signed macOS builds also require `T3CODE_APPLE_TEAM_ID` and
|
||||
`T3CODE_MACOS_PROVISIONING_PROFILE`. The passkey RP domain is derived from
|
||||
@@ -38,8 +40,8 @@
|
||||
|
||||
Set `T3CODE_DEV_INSTANCE` to any value to deterministically shift all dev ports together.
|
||||
|
||||
- Default ports: server `3773`, web `5733`
|
||||
- Default ports: server `13773`, web `5733`
|
||||
- Shifted ports: `base + offset` (offset is hashed from `T3CODE_DEV_INSTANCE`)
|
||||
- Example: `T3CODE_DEV_INSTANCE=branch-a bun run dev:desktop`
|
||||
- Example: `T3CODE_DEV_INSTANCE=branch-a vp run dev:desktop`
|
||||
|
||||
If you want full control instead of hashing, set `T3CODE_PORT_OFFSET` to a numeric offset.
|
||||
Reference in new issue
Block a user