feat: Daily Operations dashboard + tracksolid analytics views #5

Merged
kianiadee merged 1 commit from quality-program-2026-04-12 into main 2026-04-19 10:47:52 +00:00
Owner

Summary

  • Adds 07_analytics_views.sql — 9 Grafana-facing views in tracksolid.* wrapping [DASHBOARD]-tagged queries from 01_BusinessAnalytics.md
  • Adds daily_operations_dashboard.json — new Grafana dashboard (UID: daily-ops) with 7 rows: Today-at-a-Glance, Live Dispatch, Daily KPI Table, Driver Leaderboard, Trends, Efficiency, SLAs
  • Registers migrations 06 + 07 in run_migrations.py
  • Corrects CLAUDE.md schema claims (single live schema tracksolid; tracksolid_2 does not exist)
  • Design spec: docs/superpowers/specs/2026-04-19-daily-operations-dashboard-design.md

Deploy

Merging this triggers Coolify auto-deploy on tailscale_grafana_tracksolid_prod. Grafana image rebuilds with the new dashboard baked in; run_migrations.py applies 07 on container start.

Test plan

  • Coolify rebuild succeeds
  • Migration 07 recorded in tracksolid.schema_migrations
  • All 9 views queryable by grafana_ro
  • daily-ops dashboard loads in Grafana
  • Empty panels show as expected (see Known Data Gaps in spec)
## Summary - Adds `07_analytics_views.sql` — 9 Grafana-facing views in `tracksolid.*` wrapping [DASHBOARD]-tagged queries from `01_BusinessAnalytics.md` - Adds `daily_operations_dashboard.json` — new Grafana dashboard (UID: `daily-ops`) with 7 rows: Today-at-a-Glance, Live Dispatch, Daily KPI Table, Driver Leaderboard, Trends, Efficiency, SLAs - Registers migrations 06 + 07 in `run_migrations.py` - Corrects CLAUDE.md schema claims (single live schema `tracksolid`; `tracksolid_2` does not exist) - Design spec: `docs/superpowers/specs/2026-04-19-daily-operations-dashboard-design.md` ## Deploy Merging this triggers Coolify auto-deploy on `tailscale_grafana_tracksolid_prod`. Grafana image rebuilds with the new dashboard baked in; `run_migrations.py` applies 07 on container start. ## Test plan - [ ] Coolify rebuild succeeds - [ ] Migration 07 recorded in `tracksolid.schema_migrations` - [ ] All 9 views queryable by `grafana_ro` - [ ] `daily-ops` dashboard loads in Grafana - [ ] Empty panels show as expected (see Known Data Gaps in spec)
kianiadee added 1 commit 2026-04-19 10:47:42 +00:00
feat: Daily Operations dashboard + tracksolid analytics views
Some checks failed
Static Analysis / static (push) Has been cancelled
Tests / test (push) Has been cancelled
Static Analysis / static (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
85d02c81a5
Add a second Grafana dashboard focused on daily operational KPIs and live
dispatch, keeping the NOC Live dashboard untouched.

- grafana/provisioning/dashboards-json/daily_operations_dashboard.json
  New dashboard covering §7 Blueprint Panels 3-8 and the §4 dispatch lens:
  freshness banner, today-at-a-glance stat row, active vehicles map,
  currently-idle table, vehicles-not-moved-today, per-vehicle daily KPI
  roll-up, driver behaviour leaderboard, distance trend, alarm frequency,
  idle cost MTD, utilisation heatmap, SLA row (collapsed, data-gated).

- 07_analytics_views.sql
  Nine views in tracksolid.* wrapping the BA-file [DASHBOARD]-tagged
  queries. Each view carries COMMENT ON VIEW with its spec section.
  SELECT granted to grafana_ro. Smoke-tested against live DB.

- run_migrations.py
  Register 06 and 07 in MIGRATIONS list with idempotent seed checks so
  future fresh deploys apply them correctly.

- CLAUDE.md
  Retire the tracksolid_2 schema references (schema no longer exists);
  §9 Fleet State dated 2026-04-19 with correct pipeline status (running,
  875 runs/24h, 0 failures) and accurate position_history row counts
  (hypertable stats don't show in pg_stat_user_tables).

- docs/superpowers/specs/2026-04-19-daily-operations-dashboard-design.md
  Design spec covering architecture, views, panel layout, deployment,
  rollback, and known data gaps.
kianiadee merged commit 5f24c158e2 into main 2026-04-19 10:47:52 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: kianiadee/tracksolid_timescale_grafana_prod#5
No description provided.