feat(admin): live time-series trend on Metrics view (v26.05.09)#20
Merged
Conversation
Selecting a numeric metric now opens a rolling Chart.js time-series that polls the metric on the configured refresh interval (60-point window), replacing the static value snapshot: - Value / Rate (Δ/s) toggle; downward steps shown honestly (gauge decrease or counter reset), not clamped — Rate applies to gauges too. - Pause/Resume, Current/Min/Max/Avg summary, measurement selector for multi-series (tagged) Prometheus metrics (reseeds on switch), and a live-refreshing measurements table. - Non-numeric metrics show a snapshot + note instead of an empty chart. - Race-safe: a load-generation token drops superseded detail fetches AND in-flight poll ticks so a switch can't contaminate the new metric; the returned cleanup tears down the timer + chart on navigation (no leaks). - Responsive split (stacks on mobile, canvas resizes); verified zero overflow at 390px and side-by-side at 1440px, dark + light themes. Also: serve the SPA shell with Cache-Control: no-cache so version-stamped (?v=) asset URLs are revalidated after an upgrade (a heuristically cached index.html could otherwise keep pointing at the previous version's assets). Tests: 2 new SPA-shell assertions (no-cache header + version stamp). Gates green: ruff, ruff format, mypy --strict (577 files); 352 admin+web tests pass. Verified live via Playwright (desktop/light/mobile/lifecycle).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings live time-series to the admin Metrics view. Selecting a numeric metric now opens a rolling Chart.js trend that polls the metric on the configured refresh interval (60-point window), instead of a static value snapshot.
What's new
charts.jsChart.js helper), polled at the adminrefreshInterval.python.version) show a snapshot + note instead of an empty chart.Correctness / lifecycle
Bonus: cache correctness
Cache-Control: no-cacheso version-stamped (?v=…) asset URLs are revalidated after an upgrade. Previously a heuristically cachedindex.htmlcould keep referencing the prior version's CSS/JS.Verification
Tests & gates
?v=version stamp).ruff check✓,ruff format --check✓,mypy --strict(577 files) ✓,pytest tests/admin tests/web→ 352 passed.Version
Bumps to v26.05.09 (pyproject
26.5.9,__version__ = "26.05.09", uv.lock). CHANGELOG + admin docs updated.