mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-11 03:31:55 +00:00
fix(kanban): preserve dashboard completion summaries
This commit is contained in:
parent
cca8587d35
commit
354502ee48
6 changed files with 236 additions and 4 deletions
|
|
@ -561,6 +561,49 @@ def test_bulk_status_ready(client):
|
|||
assert {a["id"], b["id"], c2["id"]}.issubset(ids)
|
||||
|
||||
|
||||
def test_bulk_status_done_forwards_completion_summary(client):
|
||||
a = client.post("/api/plugins/kanban/tasks", json={"title": "a"}).json()["task"]
|
||||
b = client.post("/api/plugins/kanban/tasks", json={"title": "b"}).json()["task"]
|
||||
|
||||
r = client.post(
|
||||
"/api/plugins/kanban/tasks/bulk",
|
||||
json={
|
||||
"ids": [a["id"], b["id"]],
|
||||
"status": "done",
|
||||
"result": "DECIDED: ship it",
|
||||
"summary": "DECIDED: ship it",
|
||||
"metadata": {"source": "dashboard"},
|
||||
},
|
||||
)
|
||||
|
||||
assert r.status_code == 200
|
||||
assert all(r["ok"] for r in r.json()["results"])
|
||||
conn = kb.connect()
|
||||
try:
|
||||
for tid in (a["id"], b["id"]):
|
||||
task = kb.get_task(conn, tid)
|
||||
run = kb.latest_run(conn, tid)
|
||||
assert task.status == "done"
|
||||
assert task.result == "DECIDED: ship it"
|
||||
assert run.summary == "DECIDED: ship it"
|
||||
assert run.metadata == {"source": "dashboard"}
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
|
||||
def test_dashboard_done_actions_prompt_for_completion_summary():
|
||||
repo_root = Path(__file__).resolve().parents[2]
|
||||
bundle = (
|
||||
repo_root / "plugins" / "kanban" / "dashboard" / "dist" / "index.js"
|
||||
).read_text()
|
||||
|
||||
assert "withCompletionSummary" in bundle
|
||||
assert "Completion summary" in bundle
|
||||
assert "result: summary" in bundle
|
||||
assert "body: JSON.stringify(patch)" in bundle
|
||||
assert "body: JSON.stringify(finalPatch)" in bundle
|
||||
|
||||
|
||||
def test_bulk_archive(client):
|
||||
a = client.post("/api/plugins/kanban/tasks", json={"title": "a"}).json()["task"]
|
||||
b = client.post("/api/plugins/kanban/tasks", json={"title": "b"}).json()["task"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue