Skip to content

The agent that grows with you

feat(kanban-dashboard): show profiles on disk as lanes even when idle

Sergei Kabuldzhanovfd4dc86146eb
diff --git a/plugins/kanban/dashboard/plugin_api.py b/plugins/kanban/dashboard/plugin_api.py
index 6995d49be81..73ff9d017e5 100644
--- a/plugins/kanban/dashboard/plugin_api.py
+++ b/plugins/kanban/dashboard/plugin_api.py
@@ -334,8 +334,13 @@ def get_board(
# Queue columns keep list_tasks' dispatch order (priority DESC, created_at ASC).
tenants = [r["tenant"] for r in conn.execute("SELECT DISTINCT tenant FROM tasks WHERE tenant IS NOT NULL ORDER BY tenant")]
- assignees = [r["assignee"] for r in conn.execute(
- "SELECT DISTINCT assignee FROM tasks WHERE assignee IS NOT NULL AND status != 'archived' ORDER BY assignee")]
+ # List of known assignees for the lane-by-profile sub-grouping.
+ # Uses kanban_db.known_assignees so the lane set unions profiles
+ # currently holding non-archived tasks with profiles configured on
+ # disk — a freshly-added profile shows up as a (possibly empty)
+ # lane immediately, matching the assignee picker at /assignees
+ # which already uses this helper.
+ assignees = [entry["name"] for entry in kanban_db.known_assignees(conn)]
return {
"columns": [{"name": name, "tasks": columns[name]} for name in columns], "tenants": tenants,
"assignees": assignees, "latest_event_id": int(latest_event_id), "now": int(time.time())}
diff --git a/tests/plugins/test_kanban_dashboard_plugin.py b/tests/plugins/test_kanban_dashboard_plugin.py
index aea5b9af2bd..43fb650b74b 100644
--- a/tests/plugins/test_kanban_dashboard_plugin.py
+++ b/tests/plugins/test_kanban_dashboard_plugin.py
@@ -73,7 +73,10 @@ def test_board_empty(client):
assert expected in names, f"missing column {expected}: {names}"
assert all(len(c["tasks"]) == 0 for c in data["columns"])
assert data["tenants"] == []
- assert data["assignees"] == []
+ # Assignee lanes union task-holders with profiles on disk, so the
+ # implicit `default` profile that the fixture's HERMES_HOME creates is
+ # present even on an empty board (no task-holders yet).
+ assert data["assignees"] == ["default"]
assert data["latest_event_id"] == 0
# ---------------------------------------------------------------------------