Fix duplicate project worktree registration (#1024)

* Fix duplicate project worktree registration

* Update archive redirect test for project-aware routes
This commit is contained in:
Mohamed Boudra
2026-05-14 20:57:32 +08:00
committed by GitHub
parent 7e255a5249
commit fbeda4510e
16 changed files with 415 additions and 43 deletions
@@ -872,6 +872,7 @@ test("sends worktree base-ref fields in create_paseo_worktree_request", async ()
const createPromise = client.createPaseoWorktree(
{
cwd: "/tmp/project",
projectId: "remote:github.com/acme/project",
worktreeSlug: "review-pr-123",
refName: "feature/worktree-base-ref",
action: "checkout",
@@ -885,6 +886,7 @@ test("sends worktree base-ref fields in create_paseo_worktree_request", async ()
expect(request).toEqual({
type: "create_paseo_worktree_request",
cwd: "/tmp/project",
projectId: "remote:github.com/acme/project",
worktreeSlug: "review-pr-123",
refName: "feature/worktree-base-ref",
action: "checkout",
+8 -1
View File
@@ -259,7 +259,13 @@ export interface CreateAgentRequestOptions extends AgentConfigOverrides {
export interface CreatePaseoWorktreeInput extends Pick<
CreatePaseoWorktreeRequest,
"cwd" | "worktreeSlug" | "firstAgentContext" | "refName" | "action" | "githubPrNumber"
| "cwd"
| "projectId"
| "worktreeSlug"
| "firstAgentContext"
| "refName"
| "action"
| "githubPrNumber"
> {}
type CheckoutStatusPayload = CheckoutStatusResponse["payload"];
@@ -3012,6 +3018,7 @@ export class DaemonClient {
message: {
type: "create_paseo_worktree_request",
cwd: input.cwd,
...(input.projectId !== undefined ? { projectId: input.projectId } : {}),
worktreeSlug: input.worktreeSlug,
...(input.firstAgentContext !== undefined
? { firstAgentContext: input.firstAgentContext }