fix(worktrees): never leave the create-worktree dialog stuck on a stalled preflight (#33400)

* fix(worktrees): never leave the create-worktree dialog stuck on a stalled preflight

Bound the same-repo PR branch fetch with the review-head fetch timeout, and
hand a slow composer submit off to a staged sidebar row so the dialog closes.

* fix(worktrees): harden create-worktree handoff from adversarial review

Dedupe handed-off submits against linked creations resolved during preflight,
bound the staged sidebar row with a deadline, offer Reopen on handed-off
failures, and bound the GitLab MR branch fetch.

* test(worktrees): expect the bounded PR/MR branch fetch timeout

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
OrcaWin
2026-10-24 23:00:47 -07:00
committed by GitHub
co-authored by OrcaWin
parent 10005e5d15
commit e1066973f2
20 changed files with 412 additions and 16 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ describe('fetchPrHeadTrackingRef', () => {
expect(gitExecFileAsyncMock).toHaveBeenCalledWith(
['fetch', 'origin', '+refs/heads/feature/x:refs/remotes/origin/feature/x'],
{ cwd: '/repo' }
{ cwd: '/repo', timeout: REVIEW_HEAD_FETCH_TIMEOUT_MS }
)
})
+4 -1
View File
@@ -30,7 +30,10 @@ export async function fetchPrHeadTrackingRef(
}
await gitExecFileAsync(
['fetch', remote, `+refs/heads/${branch}:refs/remotes/${remote}/${branch}`],
options.localGitExecOptions ?? { cwd: repo.path }
{
...(options.localGitExecOptions ?? { cwd: repo.path }),
timeout: REVIEW_HEAD_FETCH_TIMEOUT_MS
}
)
}