fix: branch dropdown, diff base branch, and direct mode auto-checkout#33
Closed
ASRagab wants to merge 2 commits into
Closed
fix: branch dropdown, diff base branch, and direct mode auto-checkout#33ASRagab wants to merge 2 commits into
ASRagab wants to merge 2 commits into
Conversation
Three bug fixes for the task creation and diff review workflows: 1. Branch dropdown: merge two racing SolidJS createEffect blocks into one effect with loading spinner and retry+toast error handling (DROP-01, DROP-02) 2. Diff base branch: normalize empty-string baseBranch to undefined at the IPC boundary (register.ts), task creation (tasks.ts), and legacy state load (persistence.ts) so diffs use the correct per-task base branch instead of silently falling back to main (DIFF-01, DIFF-02, DIFF-03) 3. Direct mode auto-checkout: replace "Please checkout X first" warning with automatic git checkout when creating a Direct mode task on a non-current branch (CHECKOUT-01) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Recreating with a clean branch — the original included unrelated fork changes. |
brooksc
added a commit
to brooksc/parallel-code
that referenced
this pull request
May 10, 2026
- coordinator.ts: setTaskControl('coordinator') now resolves idle waiters
with { reason: 'idle' } instead of { reason: 'human_control' }
- coordinator.ts: cleanupTask resolves pending idle waiters with
{ reason: 'exited' } before deleting them, preventing leaked promises
- preload.cjs: add mcp_stale_url_warning to ALLOWED_CHANNELS allowlist
- coordinator.test.ts: update test expectation to match corrected reason
- TODOS.md: add johannesjo#32 (sync file I/O in createTask) and johannesjo#33 (no restart
integration tests) from code review
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
brooksc
added a commit
to brooksc/parallel-code
that referenced
this pull request
May 11, 2026
…ns, input validation Security: - Generate separate subtaskToken for sub-task MCP configs; coordinator keeps full token - Sub-task token restricted to POST /api/tasks/:id/done only (403 on all other routes) - WebSocket rejects subtask tokens; classifyCandidate/classifyToken replace safeCompare - Remove skipPermissions from MCP/REST create_task (coordinator propagates it directly) Correctness: - mcpReady flag gates TerminalView auto-spawn for coordinator and coordinated tasks - MCP_TaskHydrated IPC event sets mcpReady after successful hydration on restore - propagateSkipPermissions persisted/restored on coordinator tasks - Coordinator and sub-tasks wait for mcpReady before spawning PTY Reliability: - remoteServerPendingStop flag remembers StopRemoteServer during active coordinator - Fire-and-forget IPC calls in task close/deregister paths awaited with .catch(warn) - .mcp.json always written chmod 0o600; merge preserves other servers; cleanup removes only parallel-code key - hydrateTask validates mcpConfigPath against exact expected paths (no path traversal) - baseBranch validated in coordinator.createTask (non-empty, no leading dash) - StartMCPServer validates renderer-supplied paths/IDs before any file I/O - registerCoordinator called with options object (fixes signature mismatch) Tests: - coordinator-scoping.test.ts: subtask token restricted to signal_done (7 tests) - coordinator.test.ts: two-class token propagation, setMCPServerInfo 5-arg form (25 call sites) - TODOs johannesjo#33-43 added/updated for remaining test and fix coverage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
brooksc
added a commit
to brooksc/parallel-code
that referenced
this pull request
May 11, 2026
…johannesjo#39 - johannesjo#33: restart round-trip — hydrateTask rewrites config with new subtaskToken (not coordinator token) when setMCPServerInfo has already run; and waitForIdle resolves after agent output fires post-hydration - johannesjo#36: mcpConfigPath directory scoping — path traversal rejected, wrong-dir rejected, correct host tmpdir accepted, Docker dirname(serverPath) accepted, Docker wrong-dir rejected - johannesjo#39: per-task close isolation — closing task-1 deletes only its config file; task-2 config and task entry remain untouched Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
brooksc
added a commit
to brooksc/parallel-code
that referenced
this pull request
May 14, 2026
- coordinator.ts: setTaskControl('coordinator') now resolves idle waiters
with { reason: 'idle' } instead of { reason: 'human_control' }
- coordinator.ts: cleanupTask resolves pending idle waiters with
{ reason: 'exited' } before deleting them, preventing leaked promises
- preload.cjs: add mcp_stale_url_warning to ALLOWED_CHANNELS allowlist
- coordinator.test.ts: update test expectation to match corrected reason
- TODOS.md: add johannesjo#32 (sync file I/O in createTask) and johannesjo#33 (no restart
integration tests) from code review
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
brooksc
added a commit
to brooksc/parallel-code
that referenced
this pull request
May 14, 2026
…ns, input validation Security: - Generate separate subtaskToken for sub-task MCP configs; coordinator keeps full token - Sub-task token restricted to POST /api/tasks/:id/done only (403 on all other routes) - WebSocket rejects subtask tokens; classifyCandidate/classifyToken replace safeCompare - Remove skipPermissions from MCP/REST create_task (coordinator propagates it directly) Correctness: - mcpReady flag gates TerminalView auto-spawn for coordinator and coordinated tasks - MCP_TaskHydrated IPC event sets mcpReady after successful hydration on restore - propagateSkipPermissions persisted/restored on coordinator tasks - Coordinator and sub-tasks wait for mcpReady before spawning PTY Reliability: - remoteServerPendingStop flag remembers StopRemoteServer during active coordinator - Fire-and-forget IPC calls in task close/deregister paths awaited with .catch(warn) - .mcp.json always written chmod 0o600; merge preserves other servers; cleanup removes only parallel-code key - hydrateTask validates mcpConfigPath against exact expected paths (no path traversal) - baseBranch validated in coordinator.createTask (non-empty, no leading dash) - StartMCPServer validates renderer-supplied paths/IDs before any file I/O - registerCoordinator called with options object (fixes signature mismatch) Tests: - coordinator-scoping.test.ts: subtask token restricted to signal_done (7 tests) - coordinator.test.ts: two-class token propagation, setMCPServerInfo 5-arg form (25 call sites) - TODOs johannesjo#33-43 added/updated for remaining test and fix coverage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
brooksc
added a commit
to brooksc/parallel-code
that referenced
this pull request
May 14, 2026
…johannesjo#39 - johannesjo#33: restart round-trip — hydrateTask rewrites config with new subtaskToken (not coordinator token) when setMCPServerInfo has already run; and waitForIdle resolves after agent output fires post-hydration - johannesjo#36: mcpConfigPath directory scoping — path traversal rejected, wrong-dir rejected, correct host tmpdir accepted, Docker dirname(serverPath) accepted, Docker wrong-dir rejected - johannesjo#39: per-task close isolation — closing task-1 deletes only its config file; task-2 config and task entry remain untouched Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
createEffectblocks into one. Added loading spinner and retry+toast error handling.maininstead of per-task base branch. Normalized empty-stringbaseBranchtoundefinedat the IPC boundary, task creation, and legacy state load.git checkoutwhen creating a Direct mode task on a non-current branch. Shows git's error message if checkout fails (e.g., dirty working tree).Test plan
develop— diff should show againstdevelop, notmainbaseBranch: ''— should auto-normalizenpm run typecheckpassesnpx vitest run— all 76 tests pass🤖 Generated with Claude Code