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
@@ -57,6 +57,7 @@ function resolveCheckoutRequest(
interface NewWorkspaceScreenProps {
serverId: string;
sourceDirectory: string;
projectId?: string;
displayName?: string;
}
@@ -496,6 +497,7 @@ function submitWorkspaceDraft(input: SubmitDraftInput): void {
export function NewWorkspaceScreen({
serverId,
sourceDirectory,
projectId,
displayName: displayNameProp,
}: NewWorkspaceScreenProps) {
const { theme } = useUnistyles();
@@ -711,6 +713,7 @@ export function NewWorkspaceScreen({
return {
cwd: input.cwd,
...(projectId ? { projectId } : {}),
worktreeSlug: createNameId(),
...(hasFirstAgentContext
? {
@@ -723,7 +726,7 @@ export function NewWorkspaceScreen({
...checkoutRequest,
};
},
[currentBranch, selectedItem],
[currentBranch, projectId, selectedItem],
);
const ensureWorkspace = useCallback(