feat(kanban): add read-only task summary tree - #31362
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused resubmission. It follows the #29247 guidance to keep this read-only and excludes the local-open and comment-regex mechanisms.
Problems
TaskSummaryTreeSectionrenders only result, blocked context, and artifacts (plugins/kanban/dashboard/dist/index.jsPR lines 3027-3038). The payload also supplies comments, important comments, links, and latest-run metadata, but none of those fields is rendered. This falls short of the stated summary-tree contents.- The PR's artifact extraction only uses workspace and run metadata (
plugins/kanban/dashboard/plugin_api.pyPR lines 742-763). Current main now has first-class task attachments (plugins/kanban/dashboard/plugin_api.py:560), so uploaded artifacts on descendant tasks are missing from the tree.
Suggested changes
- Render the promised comment/link/run fields and add a behavioral bundle test for them.
- Batch-load descendant task attachments into the read-only payload and cover an uploaded attachment in the summary-tree tests; do not add a local-file open path.
Automated hermes-sweeper review.
| ), | ||
| result ? h(MarkdownBlock, { source: result, enabled: props.renderMarkdown }) : null, | ||
| h(BlockedSummaryPanel, { block: node.block }), | ||
| h(ArtifactList, { artifacts: node.artifacts || [] }), |
There was a problem hiding this comment.
The payload includes comments, important_comments, links, and latest_run.metadata, but this renderer only consumes result, block, and artifacts. Please render the fields this summary tree claims to surface (or narrow that contract) and add a behavioral UI/bundle test.
| workspace_kind=workspace_kind, | ||
| )) | ||
|
|
||
| for run in runs: |
There was a problem hiding this comment.
This artifact walk only considers run metadata. Current main also has first-class task attachments (get_task serializes kanban_db.list_attachments), so uploaded attachments on descendant tasks disappear from this tree. Batch-load attachment metadata for the traversed IDs and cover that case without introducing a local-file opener.
Adds GET /tasks/{id}/summary-tree and renders the tree in the task
drawer: per-node status, links, latest run summary/metadata, display
result, comments, blocked context, and artifact metadata (run metadata
paths plus first-class task attachments), all read-only — no local
file opener and no comment-path scraping.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
207422d to
110f3ca
Compare
|
Thanks for the review — both points are addressed in the updated branch (also rebased onto current 1. Promised fields now render. While wiring the UI I noticed 2. First-class attachments are in the payload. Also folded in during the rebase: |
Summary
Reopens the Kanban summary-tree work from #29247 as a clean, re-scoped branch — now rebased onto current
origin/mainand updated for the review feedback on this PR.This PR only ships the read-only selected-task summary tree:
GET /tasks/{id}/summary-treefor a task and its descendants.POST /artifacts/openendpoint.Changes since the last review
Addressing the hermes-sweeper review (both inline comments):
SummaryNodeRun(latest run profile · outcome · age, with the run's rawmetadatabehind a read-only<details>),SummaryNodeComments(important comments win over the recent tail, fullcomment_countin the header), andSummaryNodeLinks(parent/child ids) render alongside the existing result/blocked/artifact sections. Covered by a new behavioral bundle test (test_dashboard_bundle_renders_summary_tree_comments_links_and_runs)._attachments_for_manybatch-loadstask_attachmentsrows for all traversed ids in one query; each row becomes a read-only artifact record (kind="attachment",source="task.attachment",openable=False) withattachment_idso the UI can reuse the existing authenticatedGET /attachments/{id}download route. Nodes also exposeattachment_count. Covered bytest_task_summary_tree_includes_descendant_uploaded_attachments, which uploads through the real endpoint and also covers the missing-blob →availability="missing"case. Still no local-file open path.Also folded in while rebasing:
origin/main; the drawer integration now composes with the Attachments section, the Done-card final-result block, and Child Results instead of the pre-attachments drawer layout.tx()/useI18n()i18n helpers like the rest of the drawer.encoding="utf-8"so they pass on Windows checkouts too (bareread_text()decodes as cp1252 there; the other bundle tests share that pre-existing issue and are left for a separate cleanup).Test Plan
git diff --checkon the four touched filesnode --check plugins/kanban/dashboard/dist/index.jspython -m pytest tests/plugins/test_kanban_dashboard_plugin.py -q -o 'addopts='— 114 passed (the 16 remaining failures are the pre-existing bare-read_text()cp1252 issue on Windows runners only; they fail identically onorigin/main)python -m pytest tests/plugins/test_kanban_attachments.py -q -o 'addopts='— passedpython -m pytest tests/hermes_cli/ tests/tools/test_kanban_tools.py -q -o 'addopts=' -k kanban— failure set identical to pristineorigin/mainon the same machine (no regressions from this diff)ruff checkon the touched Python files