You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Planboard never moves an issue to Done: close it when the work lands #632
The board only ever moves forward. Start task (App.tsx:867) and autodispatch (autodispatch.js:45) call issues.setPlanStatus(..., "doing"); nothing in the app ever calls it with "done". The done edge is delegated to whichever agent happens to be looking — and the agent that does the work (a worker in its own worktree) is never the one that lands it, so the label stays at plan:doing forever. Nine issues were sitting in Doing today with all their code on main.
postmerge.js already has the inverse edge (#420 reopens the issue when post-merge verification fails), which only makes sense if something closes it.
Fix
issues.completeIssue(projectPath, number, {comment}) — gh issue view --json state,labels, then plan:done + gh issue close. Gated on the issue actually carrying plan:doing, so a stray #N in a prompt cannot close an issue nobody started. Already-closed is success.
postmerge.completeThreadIssue(store, threadId) resolves the thread's issue (thread.issueNumber → strict GitHub issue #N: prompt → loose issue #N in the first user message only) and fires it, once per issue per process.
Called fire-and-forget from the two places work actually lands:
worktrees.mergeWorktree after a successful squash (the Git tab and thread_merge)
postmerge.onThreadPrState on MERGED (interactive prStatus + the background PR refresher)
Leaves an event line on the thread: Planboard: #N moved to Done.
Not covered
An issue an agent flipped to plan:doing by hand for a thread whose work is landed outside the app (git merge in a terminal) still needs a human. A stale-Doing sweep would be a separate issue.
Landed on main (bf7c4dc): issues.completeIssue (electron/issues.js:464), postmerge.completeThreadIssue (electron/postmerge.js:226), wired fire-and-forget from electron/worktrees.js:705 and postmerge.js:200, with tests in electron/test/postmerge.test.js:464. Closing by hand because the issue predates its own fix.
Activity
feat(electron): close planboard issue when thread work lands (#632)
feat(electron): close planboard issue when thread work lands (#632)
currentbits commentedon Aug 22, 2026
Landed on main (bf7c4dc):
issues.completeIssue(electron/issues.js:464),postmerge.completeThreadIssue(electron/postmerge.js:226), wired fire-and-forget from electron/worktrees.js:705 and postmerge.js:200, with tests in electron/test/postmerge.test.js:464. Closing by hand because the issue predates its own fix.