feat(KB-034): add task archive/unarchive functionality

- Add 'archived' column to task store with archiveTask and unarchiveTask methods
- Add CLI commands: kb task archive <id> and kb task unarchive <id>
- Add pi extension tools for archive and unarchive operations
- Add dashboard API endpoints POST /api/tasks/:id/archive and /unarchive
- Add Archived column to board UI with archive/unarchive buttons
- Prevent drag-drop into archived column, add visual distinction
- Include duplicateTask from concurrent branch in merge resolution
This commit is contained in:
gsxdsm
2026-03-29 20:03:43 -07:00
parent 6c151b6591
commit 37afb24d60
22 changed files with 793 additions and 58 deletions

View File

@@ -39,7 +39,7 @@ if (isBunBinary) {
// Dynamic imports so the pi-coding-agent config module sees PI_PACKAGE_DIR
const { runDashboard } = await import("./commands/dashboard.js");
const { runTaskCreate, runTaskList, runTaskMove, runTaskMerge, runTaskUpdate, runTaskLog, runTaskShow, runTaskAttach, runTaskPause, runTaskUnpause, runTaskImportFromGitHub, runTaskDuplicate } = await import("./commands/task.js");
const { runTaskCreate, runTaskList, runTaskMove, runTaskMerge, runTaskUpdate, runTaskLog, runTaskShow, runTaskAttach, runTaskPause, runTaskUnpause, runTaskImportFromGitHub, runTaskDuplicate, runTaskArchive, runTaskUnarchive } = await import("./commands/task.js");
const HELP = `
kb — AI-orchestrated task board
@@ -56,6 +56,8 @@ Usage:
kb task log <id> <message> Add a log entry
kb task merge <id> Merge an in-review task and close it
kb task duplicate <id> Duplicate a task (creates copy in triage)
kb task archive <id> Archive a done task
kb task unarchive <id> Unarchive an archived task
kb task attach <id> <file> Attach a file to a task
kb task pause <id> Pause a task (stops all automation)
kb task unpause <id> Unpause a task (resumes automation)
@@ -72,7 +74,7 @@ Options:
--interactive, -i Interactive mode for issue selection
--help, -h Show this help
Columns: triage, todo, in-progress, in-review, done
Columns: triage, todo, in-progress, in-review, done, archived
Supported file types: png, jpg, gif, webp, txt, log, json, yaml, yml, toml, csv, xml
The AI engine uses pi (github.com/badlogic/pi-mono) for agent sessions.
@@ -174,6 +176,18 @@ async function main() {
await runTaskDuplicate(id);
break;
}
case "archive": {
const id = args[2];
if (!id) { console.error("Usage: kb task archive <id>"); process.exit(1); }
await runTaskArchive(id);
break;
}
case "unarchive": {
const id = args[2];
if (!id) { console.error("Usage: kb task unarchive <id>"); process.exit(1); }
await runTaskUnarchive(id);
break;
}
case "attach": {
const id = args[2], file = args[3];
if (!id || !file) {