| … | … | @@ -839,6 +893,41 @@ const make = Effect.gen(function* () { | |
| 923 | + | workspaceStrategy: { | |
| 924 | + | ...input.workspaceStrategy, | |
| 925 | + | baseRef: checkpoint?.ref ?? input.workspaceStrategy.baseRef, | |
| 926 | + | startFromOrigin: false, | |
🟠 High orchestration-v2/ThreadLaunchService.ts:926
A fork with startFromOrigin: true and no ready checkpoint skips fetching origin, so createWorktree uses a stale local baseRef or fails when the branch exists only remotely. This assignment clears the requested flag; preserve it when checkpoint is absent and disable it only when using the checkpoint ref.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/server/src/orchestration-v2/ThreadLaunchService.ts around line 926: |
| 2 | |
| 3 | A fork with `startFromOrigin: true` and no ready checkpoint skips fetching `origin`, so `createWorktree` uses a stale local `baseRef` or fails when the branch exists only remotely. This assignment clears the requested flag; preserve it when `checkpoint` is absent and disable it only when using the checkpoint ref. |
Fixed in 14718b7edf988b687233cc8a7834e8525f39acba. Forks preserve the requested startFromOrigin flag when no ready checkpoint is available; a ready checkpoint still disables fetching and supplies the checkpoint ref. Added service regressions for both cases, checking the fetch and actual checkout ref. The missing-checkpoint case failed before the fix. All 98 launch-service tests pass.
| … | … | @@ -0,0 +1,74 @@ | |
| 33 | + | const choices = threadForkWorkspaceChoices({ | |
| 34 | + | worktreePath: thread?.worktreePath ?? null, | |
| 35 | + | branch: thread?.branch ?? null, | |
| 36 | + | isGitRepo: status.data?.isRepo ?? props.workspaceRoot !== null, | |
🟡 Medium threads/ThreadForkSheet.tsx:36
A non-Git workspace with a non-null workspaceRoot shows an enabled “Fork in a new worktree” option while the status query is pending or fails, even though that destination is unavailable. The workspaceRoot !== null fallback marks the workspace as a repository without confirmation; only offer the worktree choice after status.data?.isRepo is true.
| 1 | isGitRepo: status.data?.isRepo ?? false, |
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/mobile/src/features/threads/ThreadForkSheet.tsx around line 36: |
| 2 | |
| 3 | A non-Git workspace with a non-null `workspaceRoot` shows an enabled “Fork in a new worktree” option while the status query is pending or fails, even though that destination is unavailable. The `workspaceRoot !== null` fallback marks the workspace as a repository without confirmation; only offer the worktree choice after `status.data?.isRepo` is true. |
Fixed in 14718b7edf988b687233cc8a7834e8525f39acba. The mobile worktree choice now requires a positive Git repository status. Pending or failed status queries leave the current-checkout option available. Mobile typecheck and targeted lint pass.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
| … | … | @@ -5798,27 +5810,74 @@ export default function ChatView(props: ChatViewProps) { | |
| 5819 | 5876 | } | |
| 5820 | 5877 | return; | |
| 5821 | 5878 | } | |
| 5879 | + | setForkSource(null); | |
🟡 Medium components/ChatView.tsx:5879
When an earlier fork finishes, setForkSource(null) dismisses any newer fork chooser the user opened while that fork was preparing; the failure path does the same. Clear the selection only if it still belongs to the fork operation that just completed, or retire that selection when starting the operation.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/web/src/components/ChatView.tsx around line 5879: |
| 2 | |
| 3 | When an earlier fork finishes, `setForkSource(null)` dismisses any newer fork chooser the user opened while that fork was preparing; the failure path does the same. Clear the selection only if it still belongs to the fork operation that just completed, or retire that selection when starting the operation. |
Fixed in 14718b7edf988b687233cc8a7834e8525f39acba. Success and failure cleanup now clear the chooser only when it still holds the selection captured by that operation. Each opening gets a distinct selection object, so reopening the same response is protected too. Web typecheck, targeted lint, and the existing ChatView logic tests pass.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.