feat(storybook): stories for one-box traffic, the pipeline graph and CPU budgets #436
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gmackie/ForgeGraph!436
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/storybook-traffic-graph-budgets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Three surfaces that landed recently had no story coverage:
All three spend most of their interesting life in states that last seconds in production — mid-bake, a failing canary, a promotion in flight, a truncated telemetry scan. That's precisely what Storybook is for.
"Beta" isn't a component — it's the beta stage running through all three: the promotion path's left node, the Access-protected
beta.*domain convention, and per-stage budgets. It's covered across these stories rather than on its own.40 stories
idle/deploying/verifying/blocked/ready/promoting/promoted), plus the four shapes one-box gives the graph, single-stage, empty, loading, failedFixtures type-check against the app
Rather than hand-writing shapes, the fixtures import and annotate against
TrafficData,GraphData,RuntimeBudgetSnapshot,WorkerMetricsandViolationRow. Shape drift now fails typecheck instead of rendering something plausible and wrong. There are noas neverescapes in these stories.Three fixture bugs the rendered output caught
Typecheck could not have caught any of these — only looking did:
traffic.weight/traffic.sample; the real vocabulary istraffic.shifted/traffic.metrics/traffic.probe. The feed rendered? → ?and the bake chip read "awaiting signal" beside a 16% error rate — visibly self-contradictory.traffic.shiftedreadsfromBps/toBps.BakeStatsdoes[...samples].reverse()because "the router hands us newest-first". My oldest-first fixture plotted every trend backwards — a degrading canary rendered as a recovering one, the exact opposite of the story that panel exists to tell. Caught by measuring rendered polyline coordinates, not by eye.One design finding, deliberately not fixed
Sparknormalises each series to its own min/max and draws each lane as a separate<svg>. So in "p95 latency" and "error rate", the production and one-box lines sit on independent axes under a shared legend implying comparison. A canary at 27% error and a primary at 0.1% both render as full-height squiggles; a flat noisy primary gets stretched into an apparent trend.Comparing the lanes is the decision that panel asks the operator to make, so it's worth a look — but the fix is a design call (shared axis, overlay, sparkbar), not a mechanical one.
Verified
421/421 stories render clean in a browser. Typecheck, lint and build all pass.
Preview environment is live: https://pr-436-forgegraph.forgegraf.com
Deployed
ecce2110with the beta stage's environment. It redeploys on every push and is destroyed when this PR closes.