Repository navigation
feat(metrics): colour every sparkline point and fix the serve view's shifting bar - #270
Merged
Merged
Conversation
added 5 commits
October 15, 2026 15:17
Issue #265: the bar sparkline colours only the latest point, so a threshold spike earlier in the window reads as an unremarkable default-colour glyph. Colour every point by its own value on the gauge's 80/90 thresholds instead, with green dropped from the sparkline.
Issue #265: the bar sparkline coloured only the latest point, so a threshold spike earlier in the window read as an unremarkable default-colour glyph. Colour each pooled column by its own value on the gauge's 80/90 thresholds instead — red above 90, yellow from 80, the terminal's default colour below — the latest point like any other and green dropped from the sparkline, which the gauge keeps.
openspec validate refuses a MODIFIED block that drops a scenario the current spec still has, and "Green bar for low utilization" cannot hold once the sparkline stops drawing green. Remove the "Colour thresholds" requirement and re-add it as "Per-point colour thresholds" — the same remove-and-re-add the archived client-driven-daemon change used — and align the proposal and tasks wording.
The serve view's combined line draws the figure between its two halves, and %.0f%% lets its width ride the reading's digit count, so the bar half shifts a column when a reading crosses a boundary. Add the 2026-10-17-serve-view-figure-alignment change: the figure draws in a fixed-width field — three digits, right-aligned, plus the percent sign — and the bar half keeps its column whatever the digit count.
The combined line's figure drew with %.0f%%, so a one-digit reading shifted the sparkline a column left and 100% a column right; a live view jitters its bar whenever a reading crosses a digit boundary. Draw the figure in a fixed-width field — three digits, right-aligned, plus the percent sign — so the line keeps its width and the bar half starts in the same column whatever the digit count.
outofcoffee
marked this pull request as ready for review
October 18, 2026 09:27
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.
Colours every point of the bar-format sparkline by its own value, so a threshold spike earlier in the 10-minute window keeps its colour where it happened (issue #265), and keeps the serve view's bar half in its column as a reading crosses a digit boundary.
Summary
Per-point sparkline colouring
Serve view alignment
%.0f%%, so a one-digit reading shifted the sparkline a column left and 100% a column right; a live view jittered its bar whenever a reading crossed a digit boundaryImplementation details
sparklineBlockis the single colouring point shared bycloud metrics --format=bar,fleet metrics --format=bar, the dashboard's bar tiles, and the serve view's bar half, so one change covers every surfacerenderStatCombinedis the single point of the serve view's combined gauge/figure/bar line; the dashboard's tiles and the bar format draw the figure after a fixed-width block, and stay untouched2026-10-15-sparkline-history-coloursand2026-10-17-serve-view-figure-alignmentship in this branch un-archived; archive both before merging so the main specs pick up the deltas