Repository navigation
Auto-dispatch a thread when an issue enters plan:todo (#165) - #334
Merged
currentbits merged 5 commits intoAug 17, 2026
Merged
Conversation
Poll opt-in local projects every 5 minutes for OPEN plan:todo issues, start a worktree thread per new one (cap 3 working), and move the label to plan:doing. Same Start-task sequence as the renderer.
…165) Write path for the Planboard auto-dispatch flag. true persists the key; false deletes it so old stores stay clean. The edit-project modal exposes the checkbox; the poller itself is the other half of this issue.
…into coder/auto-dispatch-threads-from-planboard-sta-b6f280
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…hreads-from-planboard-sta-b6f280 # Conflicts: # electron/services.js # electron/test/projects-update.test.js # src/components/EditProjectModal.tsx # src/shared/ipc.ts # test/editProject.test.tsx
currentbits
deleted the
coder/auto-dispatch-threads-from-planboard-sta-b6f280
branch
October 3, 2026 16:07
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.
Closes #165.
The Planboard has been a launcher: every card needed a manual Start task click. This makes it a pipeline — opt a project in and any issue that enters
plan:todostarts its own thread on its own worktree, without anyone watching the board.What changed
electron/autodispatch.js(new) — a 5-minute ticker in the main process, modelled on the existing automations scheduler. Per tick, for every local project withautoDispatch === true:plan:todo, ascending by numberfetchIssue→createThread→ markpendingWorktree→ broadcastthreads:changed→startRunwith the issue prompt → move the label toplan:doingstatus: "working"across all projects (MAX_AUTO_DISPATCH_RUNNING)Each auto-started thread gets its own worktree, since several run concurrently. The broadcast happens before
startRunso the sidebar shows the thread immediately rather than when the run finishes. Nothing thrown bygh, a fetch, or a run can kill the ticker.Per-project opt-in —
project.autoDispatchpersists throughservices.updateProject(truesets it,falsedeletes the key so old stores stay clean), is typed onProjectInfo/ProjectUpdateInput, and is toggled by a checkbox in the Edit project modal. Off by default; remote projects are skipped entirely.Wiring — started alongside the automations scheduler in
main.js, stopped on shutdown.Design notes
plan:doinglabel move itself: a dispatched issue no longer matches theplan:todoquery. An in-memory Set covers the window wheregh issue editfails, bounding the damage to at most one duplicate per app restart rather than a duplicate every 5 minutes. Noted in aponytail:comment at the Set.plan:done/closed" from the issue needs no code — an issue only ever leavesplan:todoon dispatch, so it never comes back around.Known gap: poll failures (broken
ghauth, say) are silent — an opted-in project just does nothing. Surfacing that needs a store field and UI; deferred.Testing
electron/test/autodispatch.test.js(new, 4 cases): dispatch creates the thread + starts the run with the issue prompt + moves the label; a project without the opt-in is untouched; the same issue is not dispatched twice across two ticks; the cap blocks dispatch at 3 working threads.electron/test/projects-update.test.js,test/editProject.test.tsx: the flag persists,falseclears it, an unrelated patch leaves it alone, and the checkbox round-trips.Full suites: electron 898/899, renderer 777/777,
npm run typecheckclean. The single failure is theweb-integrationreconnect test, which already fails onmain.PR created by the Claude Code agent