fix(ui): stack failed series below completed in throughput charts#49
Open
omarzeineddine-ai wants to merge 1 commit into
Open
fix(ui): stack failed series below completed in throughput charts#49omarzeineddine-ai wants to merge 1 commit into
omarzeineddine-ai wants to merge 1 commit into
Conversation
Both throughput charts stacked the failed Area on top of completed, so with zero failures the red stroke traced the exact top of the green area and the chart read as all-errors. Rendering failed first puts it at the bottom of the stack: zero failures now draw as a flat red line on the axis, with the completed area on top. Closes pontusab#30
|
@omarzeineddine-ai is attempting to deploy a commit to the Pontus Abrahamsson's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Problem
Closes #30
Both throughput charts (queue metrics page and the fleet overview chart) render the
failed<Area>aftercompletedwithin the samestackId. Recharts stacks in child order, sofailedsits on top of the stack — and with zero failures its red stroke traces exactly along the top edge of the green completed area. The chart reads as all-errors when there are none.Solution
Render
failedfirst so it stacks at the bottom:Applied to both occurrences of the pattern:
packages/core/src/ui/components/metrics/throughput-chart.tsxandpackages/core/src/ui/pages/metrics.tsx.Note: legend/tooltip entries now list Failed before Completed, following the new series order.
Verification
Reproduced against a local dashboard seeded with 60 completed / 0 failed jobs and confirmed the rebuilt UI bundle emits the
failedseries beforecompletedfor both charts.vite/tsupbuild andtsc --noEmitpass. (biome checkhas a pre-existing formatting failure onmainin an untouched section ofmetrics.tsx.)