feat: add dashboard stats charts panels #78

Merged
jesse merged 3 commits from phase-8/dashboard-ui-pr5-stats into main 2026-05-13 02:55:06 +02:00
Owner

Summary

  • Add dashboard stats chart panels backed by structured JSON MCP responses.
  • Stabilize stats contracts so format: json returns the base shape and extended: true opts into economics fields.
  • Harden stats polling around cache-only interval refreshes, visibility/session changes, schema validation, and E2E coverage.

Verification

  • Pre-commit hook: secret detection
  • Pre-commit hook: cargo fmt --check
  • Pre-commit hook: cargo clippy
## Summary - Add dashboard stats chart panels backed by structured JSON MCP responses. - Stabilize stats contracts so `format: json` returns the base shape and `extended: true` opts into economics fields. - Harden stats polling around cache-only interval refreshes, visibility/session changes, schema validation, and E2E coverage. ## Verification - Pre-commit hook: secret detection - Pre-commit hook: cargo fmt --check - Pre-commit hook: cargo clippy
PR5 (phase-8/dashboard-ui-pr5-stats): Option B structured JSON contract for the
three stat tools, plus an SVG-only Stats tab in the dashboard.

- Optional `format: "json"` on get_compression_stats / get_cache_stats /
  get_thought_stats; default text output is byte-for-byte unchanged with
  compatibility tests locking back-compat.
- SVG-only Compression / Cache / Thought stats panels via charts.js
  (createElementNS, no Chart.js, ~400 lines, inert text labels).
- startStatusPolling / startStatsPolling named helpers in app.js with a
  visibilitychange pause/resume contract; 30 s cache hit-rate refresh.
- Selected-session routing: get_compression_stats and get_thought_stats
  receive the active session_id; get_cache_stats stays project-scoped.
- Docs: MCP_TOOLS.md documents the optional `format` arg with example
  payloads; docs/features/phases/phase-8-dashboard.md records Option B
  as the chosen data-path with rationale and JSON shapes.
fix: stabilize dashboard stats contracts
Some checks failed
CI / Detect Changes (pull_request) Successful in 14s
CI / Format (pull_request) Successful in 21s
CI / Integration Tests (pull_request) Has been skipped
CI / Benchmarks (pull_request) Has been skipped
CI / Security Scan (pull_request) Successful in 24s
CI / Check file lengths (pull_request) Successful in 31s
CI / Conventional Validation (pull_request) Successful in 58s
CI / Clean Build Sample 2 (pull_request) Has been skipped
CI / Clean Build Sample 1 (pull_request) Has been skipped
CI / Clean Build Summary (pull_request) Has been skipped
CI / Clean Build Sample 3 (pull_request) Has been skipped
CI / Documentation (pull_request) Failing after 2m11s
CI / Clippy (pull_request) Successful in 2m59s
CI / Check (linux-aarch64 compile-validation) (pull_request) Successful in 2m40s
CI / Deny (pull_request) Successful in 6m18s
CI / Audit (CVEs) (pull_request) Successful in 7m15s
CI / D-02 Clean Build Gate (pull_request) Successful in 7m8s
CI / Test (pull_request) Successful in 8m15s
CI / Coverage (80% gate) (pull_request) Successful in 8m57s
CI / RSS gate (P-15) (pull_request) Successful in 6m14s
CI / Build (release) (pull_request) Successful in 7m41s
CI / PR Size Check (pull_request) Successful in 13s
CI / CI Report (pull_request) Successful in 4s
24879ecc16
fix: remove private intra-doc link in cache_stats doc comment
All checks were successful
CI / Detect Changes (pull_request) Successful in 12s
CI / Integration Tests (pull_request) Has been skipped
CI / Benchmarks (pull_request) Has been skipped
CI / Format (pull_request) Successful in 17s
CI / Security Scan (pull_request) Successful in 23s
CI / Conventional Validation (pull_request) Successful in 44s
CI / Clean Build Sample 1 (pull_request) Has been skipped
CI / Clean Build Sample 2 (pull_request) Has been skipped
CI / Clean Build Sample 3 (pull_request) Has been skipped
CI / Clean Build Summary (pull_request) Has been skipped
CI / Check file lengths (pull_request) Successful in 37s
CI / Documentation (pull_request) Successful in 2m16s
CI / Check (linux-aarch64 compile-validation) (pull_request) Successful in 2m44s
CI / Clippy (pull_request) Successful in 2m49s
CI / Deny (pull_request) Successful in 5m56s
CI / Audit (CVEs) (pull_request) Successful in 6m43s
CI / D-02 Clean Build Gate (pull_request) Successful in 6m54s
CI / Test (pull_request) Successful in 7m43s
CI / Coverage (80% gate) (pull_request) Successful in 8m21s
CI / RSS gate (P-15) (pull_request) Successful in 5m59s
CI / Build (release) (pull_request) Successful in 7m9s
CI / PR Size Check (pull_request) Successful in 9s
CI / CI Report (pull_request) Successful in 4s
59a850413b
jesse merged commit be588aa1c3 into main 2026-05-13 02:55:06 +02:00
jesse deleted branch phase-8/dashboard-ui-pr5-stats 2026-05-13 02:55:07 +02: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
jesse/cognix!78
No description provided.