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(),
|
||||
worktreeRoot: z.string().optional(),
|
||||
isPaseoOwnedWorktree: z.literal(false),
|
||||
mainRepoRoot: z.string().nullable(),
|
||||
mainRepoRoot: z.string().nullable().optional().default(null),
|
||||
})
|
||||
.transform((value) => ({
|
||||
...value,
|
||||
@@ -2566,7 +2566,7 @@ const CheckoutStatusGitNonPaseoSchema = CheckoutStatusCommonSchema.extend({
|
||||
isGit: z.literal(true),
|
||||
isPaseoOwnedWorktree: z.literal(false),
|
||||
repoRoot: z.string(),
|
||||
mainRepoRoot: z.string().nullable(),
|
||||
mainRepoRoot: z.string().nullable().optional().default(null),
|
||||
currentBranch: z.string().nullable(),
|
||||
isDirty: z.boolean(),
|
||||
baseRef: z.string().nullable(),
|
||||
|
||||
Reference in New Issue
Block a user