feat(panel): mark a task done where Archive stood
Merged
DA
4d ago+466+466+012345678901234567890123456789-362-362-012345678901234567890123456789
Dean decided tasks keep only their statuses, and the word "Archived" goes away for tasks. So the gesture that archived a task now marks it Done: same place, same chord.
What changes
- Task menu, command palette, menu bar, ⇧⌘A: "Archive task" is now Mark done and sets status Done.
APP_COMMAND.ARCHIVE_TASKis renamedMARK_TASK_DONEbut keeps its id"archive-plan", so the menu bar's IPC and anything that stored the id still reach it. A task that is already Done doesn't offer it, and neither does the chord. - Cancel task is now in the task menu (status Canceled). A task that is already canceled doesn't offer it.
- Sidebar row hover button: the archive box is now a check (
MarkDoneIcon) in the same spot. - A repository group's and a section's "Archive tasks" is now Mark tasks done. It sets every task Done and asks nothing, because it stops no agent. The default status filter then hides those tasks.
- Toasts: "Marked done" / "N tasks marked done" with Undo, which puts back each task's previous status. Failure notes say "could not be marked done" / "could not be canceled", plus one for an Undo the service refuses.
- The new status shows at once: the pending marks in
tasks-model.tsnow also carry a status, which stays drawn until the list carries it, the same way a pending pin does. - Agent guidance (
coding-agent-tools.ts,coder-host/instructions.ts): agents are told to mark a finished task Done (update_taskwith status done) instead of archiving it. Thearchivedoption stays. Agent archiving is unchanged. - An archived task still offers Unarchive, as before. Migrating archived tasks is out of scope here.
Tests
tasks-model.test.ts: Mark done asks Done and Undo puts back the previous status. A repository's Mark tasks done asks Done of every task and leaves one already done alone. Done/canceled tasks aren't offered the matching action. A pending status is drawn until it lands.shortcuts.test.ts: ⇧⌘A resolves to Mark done under the oldarchive-planid.- Updated the panel tests that covered Archive: the task menu and row check, the section's Mark tasks done, the repository menu labels, the row buttons, and the Board card menu.
coder-instructions/chat-off.jsongolden regenerated underLUKE_UPDATE_FIXTURES=1. The only change is the reworded sentence about archiving a task.
Removed
archiveAsks, archiveTasksQuestion, archivedTasksNote, archiveTasksFailedNote, the task archive question dialog, and TasksControl.onArchiveTasks. Nothing called them any more. onSettleTasks(taskIds, status) replaces the last one. The service-side archive code is untouched.
I checked the sidebar row, task menu, and repository menu by rendering them in the Electron fixture build.
Made with Luke