fix(kanban): preserve dashboard completion summaries + add kanban edit (salvages #20016)#20195
Merged
Conversation
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dashboard Done transitions now always capture a completion summary, and completed tasks can be edited via CLI to backfill
resultafter the fact — so downstream consumers (cron sweeps, orchestrators) can rely ontasks.resultbeing 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 anyresultfield. The bulk API (/tasks/bulk) acceptedstatus: "done"but its body model had noresult/summary/metadatafields, so even if the frontend had sent them they'd be dropped.tasks.resultended up NULL.2. No recovery path for NULL-result done tasks.
kanban completerefuses to re-run ondonestate. Nokanban edit. Operators had to run rawUPDATE tasks SET result=...SQL.Changes
plugins/kanban/dashboard/dist/index.js: newwithCompletionSummary(patch, count)helper prompts for a summary whenever a patch transitions tostatus: "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:BulkTaskBodygainsresult,summary,metadatafields;bulk_updateforwards them intocomplete_task()(which already accepted these kwargs — they were just being dropped).hermes_cli/kanban_db.py: newedit_completed_task_result(conn, task_id, result, summary, metadata)— updatestasks.result, updates or synthesizes the latest completed run with the new summary/metadata, emits aneditedevent for audit trail. Refuses non-done tasks.hermes_cli/kanban.py: newhermes kanban edit <task_id> --result ... [--summary ...] [--metadata <json>]subcommand.Validation
tasks.result = NULL,completedevent hasresult_len: 0, summary: nullcomplete_task()callkanban completerejects done statehermes kanban edit <id> --result "DECIDED ..."emitseditedeventtest_kanban_core_functionality+test_kanban_dashboard_plugin+test_kanban_db+test_kanban_cliNote: 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