-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Labels
enhancementNew feature or functionalityNew feature or functionalityneeds-alignmentPR or Issue needs contributor alignment on design before implementationPR or Issue needs contributor alignment on design before implementation
Description
Problem
User-facing /fork command is blocked for SSH and Docker workspaces (#1686) because the implementation creates broken workspaces. Sub-agent task spawning works via TaskService.create() because it handles initialization differently.
Root cause
SSHRuntime.forkWorkspace() and DockerRuntime.forkWorkspace() were designed for sub-agent spawning, not user-facing fork. They clone the git repo but skip critical initialization:
- SSH: No
initWorkspace()call, missing init scripts, project secrets not injected - Docker: Container created but not properly initialized, volume mounts may be wrong
What users see
- Fork appears to succeed
- Workspace shows wrong runtime badge (Worktree instead of SSH)
- Commands fail or workspace is unusable
Regression PR
#1446 implemented SSHRuntime.forkWorkspace() for sub-agent spawning, which unintentionally exposed it to user-facing fork.
Testing gap
No tests/ui/ coverage for fork. Existing tests in tests/ipc/forkWorkspace.test.ts only cover worktree runtime. Need UI integration tests that:
- Verify error handling when forking SSH/Docker workspaces
- Verify forked workspace shows correct runtime badge
- Verify forked workspace is immediately usable
Acceptance criteria
- Fork works correctly for SSH/Docker workspaces, OR error is clearly shown in UI
- Forked workspace shows correct runtime badge
-
tests/ui/fork.integration.test.tscovers fork scenarios
Metadata
Metadata
Assignees
Labels
enhancementNew feature or functionalityNew feature or functionalityneeds-alignmentPR or Issue needs contributor alignment on design before implementationPR or Issue needs contributor alignment on design before implementation