From 11a632dbb9aafbb6b1a7ebac5d152609a0aa3461 Mon Sep 17 00:00:00 2001 From: Lexus2016 Date: Sun, 20 Sep 2026 21:48:33 +0200 Subject: [PATCH] feat(kanban): enable direct task delegation to external agents (#109) --- package.json | 2 +- public/kanban.html | 352 ++++++++++++++++++++++++++++++++- server.js | 26 ++- test/kanban-delegation.test.js | 80 ++++++++ 4 files changed, 449 insertions(+), 11 deletions(-) create mode 100644 test/kanban-delegation.test.js diff --git a/package.json b/package.json index 891c1a0..b428f43 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "start": "node server.js", "dev": "node --watch server.js", - "test": "node --test test/render/*.test.mjs && node test/overload-detector.test.js && node test/usage-limit.test.js && node test/auth-errors.test.js && node test/env-load-order.test.js && node test/multi-agent-result.test.js && node test/terminal-session.test.js && node test/terminal-schema.test.js && node test/bots.test.js && node test/bot-inbox.test.js && node test/bots-api.test.js && node test/running-sessions.test.js && node test/session-liveness.test.js && node test/terminal-bridge.integration.test.js && node test/tmux-composite.test.js && node test/engine-spawn-cmd.test.js && node test/telegram-format.test.js && node test/telegram-behaviour.test.js && node test/ask-user-question.test.js && node test/delegate-terminal.test.js && node test/update-flow.test.js && node test/kanban-schedule.test.js && node test/kanban-run-badges.test.js && node test/task-backlog.test.js && node test/i18n-completeness.test.js && node test/config-resolve.test.js && node test/chat-defaults.test.js && node test/chat-defaults-api.test.js && node test/run-continuation.test.js && node test/worktree-manager.test.js && node test/setup-gate.test.js && node test/path-guard.test.js && node test/subscribe-nocatchup.test.js && node test/cli-import-remote.test.js && node test/remote-list-parse.test.js && node test/config-migrate.test.js && node test/engine-pane.test.js && node test/global-workspace.test.js && node test/ssh-secret.test.js && node test/agent-dag.test.js && node test/ssh-parser.test.js && node test/ssh-termination.test.js && node test/session-restart.test.js && node test/remote-env.test.js && node test/remote-files.test.js && node test/remote-files-api.test.js && node test/auth-token.test.js && node test/cmd-model.test.js && node test/origin-guard.test.js && node test/interrupted-recovery.test.js && node test/queue-persistence.test.js && node test/interrupt-idle-config.test.js && node test/agents-md.test.js && node test/editor-links.test.js && node test/editor-open-api.test.js && node test/interrupt-delivery.test.js && node test/terminal-pane-guard.integration.test.js && node test/composer-terminal.test.js && node test/claude-cli-status.test.js && node test/asar-helpers.test.js && node test/task-workers.test.js && node test/git-clone.test.js && node test/responsive-ui.test.js", + "test": "node --test test/render/*.test.mjs && node test/overload-detector.test.js && node test/usage-limit.test.js && node test/auth-errors.test.js && node test/env-load-order.test.js && node test/multi-agent-result.test.js && node test/terminal-session.test.js && node test/terminal-schema.test.js && node test/bots.test.js && node test/bot-inbox.test.js && node test/bots-api.test.js && node test/running-sessions.test.js && node test/session-liveness.test.js && node test/terminal-bridge.integration.test.js && node test/tmux-composite.test.js && node test/engine-spawn-cmd.test.js && node test/telegram-format.test.js && node test/telegram-behaviour.test.js && node test/ask-user-question.test.js && node test/delegate-terminal.test.js && node test/update-flow.test.js && node test/kanban-schedule.test.js && node test/kanban-run-badges.test.js && node test/task-backlog.test.js && node test/i18n-completeness.test.js && node test/config-resolve.test.js && node test/chat-defaults.test.js && node test/chat-defaults-api.test.js && node test/run-continuation.test.js && node test/worktree-manager.test.js && node test/setup-gate.test.js && node test/path-guard.test.js && node test/subscribe-nocatchup.test.js && node test/cli-import-remote.test.js && node test/remote-list-parse.test.js && node test/config-migrate.test.js && node test/engine-pane.test.js && node test/global-workspace.test.js && node test/ssh-secret.test.js && node test/agent-dag.test.js && node test/ssh-parser.test.js && node test/ssh-termination.test.js && node test/session-restart.test.js && node test/remote-env.test.js && node test/remote-files.test.js && node test/remote-files-api.test.js && node test/auth-token.test.js && node test/cmd-model.test.js && node test/origin-guard.test.js && node test/interrupted-recovery.test.js && node test/queue-persistence.test.js && node test/interrupt-idle-config.test.js && node test/agents-md.test.js && node test/editor-links.test.js && node test/editor-open-api.test.js && node test/interrupt-delivery.test.js && node test/terminal-pane-guard.integration.test.js && node test/composer-terminal.test.js && node test/claude-cli-status.test.js && node test/asar-helpers.test.js && node test/task-workers.test.js && node test/git-clone.test.js && node test/responsive-ui.test.js && node test/kanban-delegation.test.js", "postinstall": "node scripts/install-hooks.js", "release": "node scripts/release.js", "electron:dev": "electron .", diff --git a/public/kanban.html b/public/kanban.html index 6cf81c7..38bd881 100644 --- a/public/kanban.html +++ b/public/kanban.html @@ -163,6 +163,26 @@ .col-add:hover{ background:var(--s2); color:var(--text); border-color:var(--muted); } .col-empty{ text-align:center; padding:24px 10px; color:var(--muted); font-size:12px; border:1px dashed var(--border); border-radius:var(--r-md); user-select:none; } +.badge-purple{ background:rgba(188,140,255,.15); color:#d2a8ff; border:1px solid rgba(188,140,255,.3); } +.dlg-agent-cards { display: flex; gap: 8px; flex-wrap: wrap; } +.dlg-agent-card { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--s2); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; } +.dlg-agent-card:hover { border-color: rgba(124,106,239,.4); background: rgba(124,106,239,.06); } +.dlg-agent-card.selected { border-color: var(--accent); background: rgba(124,106,239,.12); box-shadow: 0 0 0 2px rgba(124,106,239,.2); } +.dlg-agent-icon { font-size: 16px; flex-shrink: 0; } +.dlg-agent-label { font-size: 13px; font-weight: 600; color: var(--text); } +.dlg-agent-card.selected .dlg-agent-label { color: var(--accent); } +.dlg-agent-empty { padding: 10px 14px; border: 1.5px dashed var(--border); border-radius: var(--r-sm); color: var(--muted); font-size: 12px; text-align: center; } +.dlg-mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } +.dlg-mode-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--s2); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; } +.dlg-mode-card:hover { border-color: rgba(124,106,239,.4); background: rgba(124,106,239,.06); } +.dlg-mode-card.selected { border-color: var(--accent); background: rgba(124,106,239,.12); box-shadow: 0 0 0 2px rgba(124,106,239,.2); } +.dlg-mode-title { font-size: 13px; font-weight: 700; color: var(--text); } +.dlg-mode-card.selected .dlg-mode-title { color: var(--accent); } +.dlg-mode-desc { font-size: 11px; line-height: 1.4; color: var(--muted); } +.dlg-dialog-box { background: var(--s3); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.5; color: var(--text); max-height: 280px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; } +.dlg-top-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: var(--r-sm); background: rgba(188,140,255,.15); color: #d2a8ff; border: 1px solid rgba(188,140,255,.3); cursor: pointer; } +.dlg-top-badge:hover { background: rgba(188,140,255,.25); } + /* Status colours */ .dot-backlog{ background:var(--muted); } .dot-todo{ background:var(--blue); } @@ -454,6 +474,82 @@ + + + + + +