Skip to content

fix(kanban): preserve dashboard completion summaries + add kanban edit (salvages #20016)#20195

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-9ddf5187
May 5, 2026
Merged

fix(kanban): preserve dashboard completion summaries + add kanban edit (salvages #20016)#20195
teknium1 merged 1 commit into
mainfrom
hermes/hermes-9ddf5187

Conversation

@teknium1

@teknium1 teknium1 commented May 5, 2026

Copy link
Copy Markdown
Contributor

Dashboard Done transitions now always capture a completion summary, and completed tasks can be edited via CLI to backfill result after the fact — so downstream consumers (cron sweeps, orchestrators) can rely on tasks.result being populated.

Salvaged from #20016 (@LeonSGP43).

Two separate gaps closed together:

1. Dashboard Done transitions silently dropped the summary. Clicking Complete, dragging to Done, or bulk-selecting + Mark Done all went through paths that PATCH'd {status: "done"} without any result field. The bulk API (/tasks/bulk) accepted status: "done" but its body model had no result/summary/metadata fields, so even if the frontend had sent them they'd be dropped. tasks.result ended up NULL.

2. No recovery path for NULL-result done tasks. kanban complete refuses to re-run on done state. No kanban edit. Operators had to run raw UPDATE tasks SET result=... SQL.

Changes

  • plugins/kanban/dashboard/dist/index.js: new withCompletionSummary(patch, count) helper prompts for a summary whenever a patch transitions to status: "done". Wired into single-task move (drag/drop + Complete button) and bulk actions. Empty summary is rejected; cancel aborts the transition.
  • plugins/kanban/dashboard/plugin_api.py: BulkTaskBody gains result, summary, metadata fields; bulk_update forwards them into complete_task() (which already accepted these kwargs — they were just being dropped).
  • hermes_cli/kanban_db.py: new edit_completed_task_result(conn, task_id, result, summary, metadata) — updates tasks.result, updates or synthesizes the latest completed run with the new summary/metadata, emits an edited event for audit trail. Refuses non-done tasks.
  • hermes_cli/kanban.py: new hermes kanban edit <task_id> --result ... [--summary ...] [--metadata <json>] subcommand.

Validation

Before After
Dashboard Complete button tasks.result = NULL, completed event has result_len: 0, summary: null prompt required; empty rejected; result + summary both stored
Dashboard drag-to-Done same NULL outcome same prompt path
Dashboard bulk "Mark Done" body had no result fields; dropped silently prompt once for N tasks, forwarded to each complete_task() call
Recovery on NULL-result done task raw SQL only; kanban complete rejects done state hermes kanban edit <id> --result "DECIDED ..." emits edited event
Targeted tests 255/255 pass across test_kanban_core_functionality + test_kanban_dashboard_plugin + test_kanban_db + test_kanban_cli

Note: the dashboard uses a plain window.prompt() — basic but functional. A proper modal could come as a follow-up; the important behavioral fix is that no Done transition can silently drop the summary.

Closes #20008

Co-authored-by: LeonSGP43 cine.dreamer.one@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kanban: dashboard Complete button bypasses summary modal; no CLI recovery for null result

3 participants