Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hermes_cli/kanban.py
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,7 @@ def _cmd_stats(args: argparse.Namespace) -> int:
print(json.dumps(stats, indent=2, ensure_ascii=False))
return 0
print("By status:")
for k in ("triage", "todo", "scheduled", "ready", "running", "blocked", "done"):
for k in ("triage", "todo", "scheduled", "ready", "running", "blocked", "review", "done"):
print(f" {k:8s} {stats['by_status'].get(k, 0)}")
if stats["by_assignee"]:
print("\nBy assignee:")
Expand Down
24 changes: 24 additions & 0 deletions tests/hermes_cli/test_kanban_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,30 @@ def test_run_slash_comment_max_len_trims_long_body(kanban_home):
assert "x" * 30 not in show


def test_run_slash_stats_text_includes_review_lane(kanban_home):
"""``stats`` text output must surface the ``review`` lane.

board_stats() reports a per-status count for every non-archived
status, so the human-readable ``By status:`` block must enumerate
``review`` too — otherwise its count silently disappears while
``--json`` still shows it.
"""
import re

with kb.connect() as conn:
tid = kb.create_task(conn, title="needs review", assignee="alice")
# Move it into the review lane (autocommit connection persists it).
conn.execute("UPDATE tasks SET status = 'review' WHERE id = ?", (tid,))

out = kc.run_slash("stats")
assert "review" in out
assert re.search(r"review\s+1", out), out

# The text path must agree with the JSON path, which already exposed it.
out_json = kc.run_slash("stats --json")
assert json.loads(out_json)["by_status"].get("review") == 1


def test_run_slash_block_unblock_cycle(kanban_home):
out = kc.run_slash("create 'x' --assignee alice")
import re
Expand Down
Loading