From 2e142257523c199c015bbc88573c9ccacf783c78 Mon Sep 17 00:00:00 2001 From: Ben Davis <45952064+bmdavis419@users.noreply.github.com> Date: Mon, 27 Jul 2026 14:00:51 -0700 Subject: [PATCH] fix: mobile stand-in projects missing the required agentInstanceId field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OrchestrationProjectShell gained agentInstanceId on this branch, and the type requires the property to be present (the decoding default only covers wire snapshots, not literals). Mobile builds project stand-ins by hand in two places — the offline pending-task group and the pending-task editor — and five test fixtures do the same. All now carry agentInstanceId: null, which is correct by construction: a queued task always targets a real workspace, so an agent project can never reach these code paths. Only surfaced in CI: local verification typechecked server and web but not the whole monorepo. `vp run typecheck` (what CI runs) is now clean. Co-Authored-By: Claude Fable 5 --- apps/mobile/src/features/archive/archivedThreadList.test.ts | 1 + apps/mobile/src/features/home/homeListItems.test.ts | 1 + apps/mobile/src/features/home/homeThreadList.test.ts | 1 + apps/mobile/src/features/home/homeThreadList.ts | 3 +++ apps/mobile/src/features/showcase/showcasePendingTasks.test.ts | 2 ++ apps/mobile/src/features/threads/new-task-flow-provider.tsx | 3 +++ apps/mobile/src/lib/repositoryGroups.test.ts | 1 + 7 files changed, 12 insertions(+) diff --git a/apps/mobile/src/features/archive/archivedThreadList.test.ts b/apps/mobile/src/features/archive/archivedThreadList.test.ts index 697d13e7c4..59dd10b7c5 100644 --- a/apps/mobile/src/features/archive/archivedThreadList.test.ts +++ b/apps/mobile/src/features/archive/archivedThreadList.test.ts @@ -13,6 +13,7 @@ function makeProject( return { workspaceRoot: `/workspaces/${input.id}`, repositoryIdentity: null, + agentInstanceId: null, defaultModelSelection: null, scripts: [], createdAt: "2026-06-01T00:00:00.000Z", diff --git a/apps/mobile/src/features/home/homeListItems.test.ts b/apps/mobile/src/features/home/homeListItems.test.ts index c5a9f2c6bb..985b878009 100644 --- a/apps/mobile/src/features/home/homeListItems.test.ts +++ b/apps/mobile/src/features/home/homeListItems.test.ts @@ -25,6 +25,7 @@ function makeProject(id: string, title: string): EnvironmentProject { title, workspaceRoot: `/workspaces/${id}`, repositoryIdentity: null, + agentInstanceId: null, defaultModelSelection: null, scripts: [], createdAt: "2026-06-01T00:00:00.000Z", diff --git a/apps/mobile/src/features/home/homeThreadList.test.ts b/apps/mobile/src/features/home/homeThreadList.test.ts index e791cd3b36..44fed54331 100644 --- a/apps/mobile/src/features/home/homeThreadList.test.ts +++ b/apps/mobile/src/features/home/homeThreadList.test.ts @@ -17,6 +17,7 @@ function makeProject( return { workspaceRoot: `/workspaces/${input.id}`, repositoryIdentity: null, + agentInstanceId: null, defaultModelSelection: null, scripts: [], createdAt: "2026-06-01T00:00:00.000Z", diff --git a/apps/mobile/src/features/home/homeThreadList.ts b/apps/mobile/src/features/home/homeThreadList.ts index 9176fabcee..c0422f61c8 100644 --- a/apps/mobile/src/features/home/homeThreadList.ts +++ b/apps/mobile/src/features/home/homeThreadList.ts @@ -310,6 +310,9 @@ export function buildHomeThreadGroups(input: { workspaceRoot: pendingTask.creation.projectCwd ?? String(pendingTask.creation.projectId), repositoryIdentity: null, + // A queued task always targets a real workspace; agent projects + // never enqueue through this path. + agentInstanceId: null, defaultModelSelection: null, scripts: [], createdAt: pendingTask.message.createdAt, diff --git a/apps/mobile/src/features/showcase/showcasePendingTasks.test.ts b/apps/mobile/src/features/showcase/showcasePendingTasks.test.ts index 8ab043d7cd..a747dd5e56 100644 --- a/apps/mobile/src/features/showcase/showcasePendingTasks.test.ts +++ b/apps/mobile/src/features/showcase/showcasePendingTasks.test.ts @@ -14,6 +14,7 @@ const projects: ReadonlyArray = [ title: "T3 Code", workspaceRoot: "/workspace/t3code", repositoryIdentity: null, + agentInstanceId: null, defaultModelSelection: { instanceId: ProviderInstanceId.make("codex"), model: "gpt-5.4" }, scripts: [], createdAt: "2026-07-16T08:00:00.000Z", @@ -25,6 +26,7 @@ const projects: ReadonlyArray = [ title: "React", workspaceRoot: "/workspace/react", repositoryIdentity: null, + agentInstanceId: null, defaultModelSelection: null, scripts: [], createdAt: "2026-07-16T08:00:00.000Z", diff --git a/apps/mobile/src/features/threads/new-task-flow-provider.tsx b/apps/mobile/src/features/threads/new-task-flow-provider.tsx index 792b6c6b8e..ed14cfdeb4 100644 --- a/apps/mobile/src/features/threads/new-task-flow-provider.tsx +++ b/apps/mobile/src/features/threads/new-task-flow-provider.tsx @@ -264,6 +264,9 @@ export function NewTaskFlowProvider(props: React.PropsWithChildren) { // fabricated path. workspaceRoot: creation.projectCwd ?? "", repositoryIdentity: null, + // A queued task always targets a real workspace; agent projects never + // enqueue through this path. + agentInstanceId: null, defaultModelSelection: editingPendingTask.modelSelection ?? null, scripts: [], createdAt: editingPendingTask.createdAt, diff --git a/apps/mobile/src/lib/repositoryGroups.test.ts b/apps/mobile/src/lib/repositoryGroups.test.ts index 1fb4c71cb9..9b00ab1526 100644 --- a/apps/mobile/src/lib/repositoryGroups.test.ts +++ b/apps/mobile/src/lib/repositoryGroups.test.ts @@ -11,6 +11,7 @@ function makeProject( return { workspaceRoot: `/workspaces/${input.id}`, repositoryIdentity: null, + agentInstanceId: null, defaultModelSelection: null, scripts: [], createdAt: "2026-04-01T00:00:00.000Z",