the-custodian/state-hub/dashboard/src
tegwick bb965e4990 feat(token-tracking): repo aggregation via graph walk (task→workstream→repo)
By Repo now resolves via the full chain rather than requiring repo_id
directly on the token event:
  1. token_events.repo_id (direct)
  2. → workstreams.repo_id (via workstream_id)
  3. → task.workstream_id → workstreams.repo_id (via task_id)

Changes:
- Auto-populate repo_id on token events at creation time (both the
  token_events router and the tasks router)
- New GET /token-events/by-repo/ endpoint with RepoTokenSummary schema;
  returns tokens_in/out/total, event_count, by_model, by_note per repo
- Dashboard By Repo section uses /by-repo/ directly and shows repo_slug
  instead of a truncated UUID
- Backfilled the three existing events (userbased) with repo_id via SQL

185 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 19:05:23 +02:00
..
components feat(dashboard): extend suggestions to TOC right margin + 1s shift delay 2026-03-18 01:42:11 +01:00
data feat(token-tracking): record AI token consumption per task (CUST-WP-0029) 2026-03-29 17:46:46 +02:00
docs docs(dashboard): add technical reference page for Observable Framework dashboard 2026-03-27 00:09:18 +01:00
policy docs(policy): add Repository Definition of Integrated (DoI) 2026-03-20 00:35:54 +01:00
capability-requests.md feat(capability-requests): add routing dispute & reroute workflow (CUST-WP-0027) 2026-03-21 23:58:52 +01:00
contributions.md feat(ep-td+dashboard): complete CUST-WP-0004 EP/TD tracking workstream 2026-03-11 01:40:52 +01:00
decisions.md feat(api): CUST-WP-0018 — API hardening & code quality 2026-03-18 02:17:04 +01:00
dependencies.md feat(ep-td+dashboard): complete CUST-WP-0004 EP/TD tracking workstream 2026-03-11 01:40:52 +01:00
domains.md feat(ep-td+dashboard): complete CUST-WP-0004 EP/TD tracking workstream 2026-03-11 01:40:52 +01:00
extensions.md feat(ep-td+dashboard): complete CUST-WP-0004 EP/TD tracking workstream 2026-03-11 01:40:52 +01:00
goals.md feat(ep-td+dashboard): complete CUST-WP-0004 EP/TD tracking workstream 2026-03-11 01:40:52 +01:00
inbox.md feat(CUST-WP-0015): implement agent inbox for inter-agent coordination 2026-03-16 02:55:45 +01:00
index.md fix(dashboard): clear API-unreachable warning when API recovers 2026-03-19 00:51:11 +01:00
interventions.md feat(ep-td+dashboard): complete CUST-WP-0004 EP/TD tracking workstream 2026-03-11 01:40:52 +01:00
progress.md feat(ep-td+dashboard): complete CUST-WP-0004 EP/TD tracking workstream 2026-03-11 01:40:52 +01:00
reference.md docs: add State Hub reference page and restructure reference index 2026-03-20 02:01:58 +01:00
repo-sync.md fix(dashboard): enrich repo-sync page with live SBOM snapshot stats 2026-03-19 01:34:02 +01:00
repos.md perf(dashboard): lazy-load DoI tiers on Repositories page 2026-03-20 01:31:48 +01:00
sbom.md feat(ep-td+dashboard): complete CUST-WP-0004 EP/TD tracking workstream 2026-03-11 01:40:52 +01:00
tasks.md feat(api): CUST-WP-0018 — API hardening & code quality 2026-03-18 02:17:04 +01:00
techdept.md feat(ep-td+dashboard): complete CUST-WP-0004 EP/TD tracking workstream 2026-03-11 01:40:52 +01:00
todo.md feat(workplans): CUST-WP-0018/0019/0020 — API hardening, dashboard UX polish, test suite 2026-03-18 01:55:37 +01:00
token-cost.md feat(token-tracking): repo aggregation via graph walk (task→workstream→repo) 2026-03-29 19:05:23 +02:00
tools.md feat(dashboard): add Tools & Apps page with liveness probes 2026-03-21 01:18:11 +01:00
tpsc.md feat(tpsc): Third-Party Services Catalog (CUST-WP-0023) 2026-03-20 00:15:26 +01:00
ui-feedback.md feat(suggestions): full suggestion workflow with per-step notes 2026-03-18 00:57:34 +01:00
workstreams.md feat(api): CUST-WP-0018 — API hardening & code quality 2026-03-18 02:17:04 +01:00