fix: keep mainRepoRoot optional for backward-compat with old daemons
Newer clients were rejecting checkout_status_response and project-checkout-lite payloads from older daemons that don't yet send mainRepoRoot. Make the field optional with a null default so the schema stays forward-compatible.
This commit is contained in:
@@ -2032,7 +2032,7 @@ export const ProjectCheckoutLiteGitNonPaseoPayloadSchema = z
|
|||||||
remoteUrl: z.string().nullable(),
|
remoteUrl: z.string().nullable(),
|
||||||
worktreeRoot: z.string().optional(),
|
worktreeRoot: z.string().optional(),
|
||||||
isPaseoOwnedWorktree: z.literal(false),
|
isPaseoOwnedWorktree: z.literal(false),
|
||||||
mainRepoRoot: z.string().nullable(),
|
mainRepoRoot: z.string().nullable().optional().default(null),
|
||||||
})
|
})
|
||||||
.transform((value) => ({
|
.transform((value) => ({
|
||||||
...value,
|
...value,
|
||||||
@@ -2566,7 +2566,7 @@ const CheckoutStatusGitNonPaseoSchema = CheckoutStatusCommonSchema.extend({
|
|||||||
isGit: z.literal(true),
|
isGit: z.literal(true),
|
||||||
isPaseoOwnedWorktree: z.literal(false),
|
isPaseoOwnedWorktree: z.literal(false),
|
||||||
repoRoot: z.string(),
|
repoRoot: z.string(),
|
||||||
mainRepoRoot: z.string().nullable(),
|
mainRepoRoot: z.string().nullable().optional().default(null),
|
||||||
currentBranch: z.string().nullable(),
|
currentBranch: z.string().nullable(),
|
||||||
isDirty: z.boolean(),
|
isDirty: z.boolean(),
|
||||||
baseRef: z.string().nullable(),
|
baseRef: z.string().nullable(),
|
||||||
|
|||||||
Reference in New Issue
Block a user