Skip to content

dashboard: the decode/prefill dial, memory and MTP tiles and the decode-rate chart - #561

Merged
ashhart merged 1 commit into
ashhart:mainfrom
heitke:dashboard-rich
Oct 10, 2026
Merged

ashhart merged 1 commit into
ashhart:mainfrom
heitke:dashboard-rich

Conversation

@heitke

@heitke heitke commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

The --dashboard page on the native server is a bare card grid. The 0.6.x Python engine shipped a live dashboard (PR #400) with a decode/prefill dial, tile row and a decode-rate chart; the maintainer accepted the /stats + /dashboard route surface but the native page lost most of the presentation.

This PR re-applies the old dashboard's UI onto the native server's existing /stats snapshot, with no server-side changes — the single touched file is zig/src/server/dashboard.html:

  • The dial — one arc, decode linear (banded color) and prefill log-scaled blue, animated smoothing, exactly the 0.6 dashboard's design; the modes never run at once.
  • Memory tile — resident (active + cache) in GiB, with peak and cache in the caption and a fill bar against the session's own peak (the native snapshot has no physical-RAM budget field).
  • Tokens in flight — generation_tokens_running with the live stream count.
  • Decode-rate chart — "last 5 minutes" strip chart over the polled rate points (sparse, x follows the timestamp; the y scale grows at once and deflates slowly, like the dial).
  • Tiles — Running (with queued), 5-min gen rate (client-side min/mean/max over the window), Avg prefill (mean of the current prefill's samples), MTP acceptance (mtp_accepted_total / mtp_drafted_total), Decode rounds.
  • Lifetime totals bar — prompt/generated tokens and the draft acceptance summary.

Differences from the Python dashboard, by design:

  • The prefill-queue ETA and per-request "Recent requests" list relied on scheduler-internal state (fill_progress, per-job rows) that the native /stats snapshot does not expose; adding server-side request history would be a larger change than this PR's one-job scope.
  • Context/KV-pool tiles need the per-stream cache ratios served over JSON; they live only in the Prometheus /metrics text today.

Gates run (branch tip 1bd7e30, base origin/main @ 78ee0f4):

  • zig test on the server module (root.zig + engine seam + tokenizer + template): 73/73 passed, including dashboard_test.zig's four page-contract assertions, kept passing unchanged.
  • python3 tools/zig/lean_check.py: 786 files, 510 problems — identical to the origin/main baseline (the HTML file is outside the checker's tree).
  • git diff --check clean; node --check on the page's script and two headless DOM harness runs (decode-active and prefill-active snapshots) exercised apply() end to end.

…de-rate chart

The --dashboard page was a bare card grid. Port the Python fork's live
dashboard onto the native /stats snapshot: the one-dial decode/prefill
arc (decode linear and banded, prefill log-scaled blue), the memory tile
with its fill bar, the tokens-in-flight tile, the 5-minute decode rate
chart (polled points, sparse over the window), the 5-min min/mean/max
and average prefill tiles, the MTP acceptance tile and the lifetime
totals bar. Everything reads the existing /stats fields; the page alone
carries the change.
@ashhart
ashhart merged commit 265217f into ashhart:main Oct 10, 2026
2 checks passed
@ashhart

ashhart commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Thank you @heitke. Merged into main (265217f): --dashboard shows the dial, the tiles and the decode-rate chart over the native /stats snapshot, with nothing loaded from outside the server. On an M3 Ultra the page served and /stats fed it. It ships in the next release.

@ashhart ashhart mentioned this pull request Oct 10, 2026
chaog992 pushed a commit to chaog992/TensorFold that referenced this pull request Oct 10, 2026
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants