feat(status-mix): stacked column chart with ok baseline#38
Open
coccyx wants to merge 1 commit into
Open
Conversation
Two requested changes: 1. **Chart type**: Status mix renders as a stacked column chart instead of multiple overlapping lines. Each column is a 1-minute bucket; segments inside stack bottom-up in the order defined by STATUS_CODE_CLASSES. 2. **ok class included**: query no longer filters `status_class != "ok"`. The baseline (ok requests, slate-300) shows absolute volume and errors stack on top in saturated colors, so a mix shift reads at a glance against the volume context. ### Files - `src/components/StackedColumnChart.tsx` (new) — SVG-based, reuses LineChart.module.css for the shell (title / subtitle / legend / tooltip / empty-state) so it matches the sibling panels. Hover tooltip lists segments top-to-bottom matching what the operator sees onscreen, plus a total row. - `src/api/queries.ts` — drop the `status_class != "ok"` filter. - `src/api/types.ts` — add `'ok'` to `StatusCodeClass` and reorder `STATUS_CODE_CLASSES` to define stack order (ok at bottom, error classes stacked above). - `src/routes/ServiceDetailPage.tsx` — swap LineChart → StackedColumnChart for status mix, add the ok color (slate) and reshape series for stacking. Screenshot evidence in `docs/sessions/screenshots/2026-05-27-status-mix-stacked-columns/`. Pre-PR checks: lint clean (0 errors), typecheck clean, 63/63 unit tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Two requested changes to the Status mix chart on Service Detail:
okclass → the query no longer filters `status_class != "ok"`. The slate baseline shows total request volume and errors stack visibly above it.After
`frontend-proxy` over the last hour (ok 71%, 504 13%, 503 10%, 500 5%, 4xx 1%):
Implementation
Test plan
Pre-merge checks
🤖 Generated with Claude Code