From 7ad6591c057c10dfa5c6d1de6c6551fa663b7ef3 Mon Sep 17 00:00:00 2001 From: Naiyuan Qing <145280634+NevilleQingNY@users.noreply.github.com> Date: Wed, 8 Jul 2026 19:00:07 +0800 Subject: [PATCH] fix(mobile): restore agent invocation target_type "team" enum value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AgentInvocationTarget.target_type's "team" is an unrelated, inert placeholder from migration 130 (agent_invocation_permission) — "reserved for the future team concept... NOT effective in V1" — not the workspace Team entity this branch renamed to Space. The server's CHECK constraint, Go constant, and packages/core/types/agent.ts all still say "team"; only apps/mobile/data/schemas.ts had been swept to "space" by mistake (most likely an overzealous find/replace during the Team→Space rename), which desynced it from the server and broke mobile's typecheck. Revert schemas.ts and its test back to "team" to match the real server contract. Co-Authored-By: Claude Sonnet 5 --- apps/mobile/data/schemas.ts | 2 +- apps/mobile/lib/agent-schema.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/mobile/data/schemas.ts b/apps/mobile/data/schemas.ts index 87f523746e..c4c2fd403b 100644 --- a/apps/mobile/data/schemas.ts +++ b/apps/mobile/data/schemas.ts @@ -551,7 +551,7 @@ export const EMPTY_MEMBER_LIST: MemberWithUser[] = []; const AgentInvocationTargetSchema: z.ZodType = z .object({ - target_type: z.enum(["workspace", "member", "space"]).catch("space"), + target_type: z.enum(["workspace", "member", "team"]).catch("team"), target_id: z .string() .nullable() diff --git a/apps/mobile/lib/agent-schema.test.ts b/apps/mobile/lib/agent-schema.test.ts index f99f0b43fa..fe1970ee78 100644 --- a/apps/mobile/lib/agent-schema.test.ts +++ b/apps/mobile/lib/agent-schema.test.ts @@ -35,7 +35,7 @@ describe("AgentSchema invocation permissions", () => { expect(parsed.permission_mode).toBe("private"); expect(parsed.invocation_targets).toEqual([ - { target_type: "space", target_id: null }, + { target_type: "team", target_id: null }, ]); }); });