Repository navigation
fix(studio): stop stacking overlaid area series in report charts - #48034
Conversation
Line-style report charts hardcoded stackId="1" on every Area, so recharts summed the series additively. Three equal min/max/avg values rendered as three stacked bands instead of overlaying. Default each area to its own stackId (its attribute name), matching the bar path, while still honoring an explicit per-attribute stackId.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughChangesChart stack ID resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Move the inline stackId resolution for bar and area series into a shared getStackId(attributes, name, fallback) helper. Guards against undefined/null attributes, non-array input, missing/falsy entries, and missing names so it never throws. Adds unit coverage for the overlay, shared-stack, explicit, and edge cases.
🎭 Playwright Test Results (next)Details
Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
Narrow the find predicate with a type guard so stackId is read off a MultiAttribute, and annotate the test's mixed array so false stays a literal.
Braintrust eval report
|
…fomap-entry-for-pitr-archiving-stale' into hunleyd/indata-979-studio-lintinfomap-entry-for-pitr-archiving-stale * origin/hunleyd/indata-979-studio-lintinfomap-entry-for-pitr-archiving-stale: (35 commits) chore: simplify CPU messaging for compute sizes (#48109) chore(studio): add valtio and react-hook-form ESLint ratchet rules (#48037) feat: Add ai/python federated content and data (#48043) feat: Add ai-skills federated content and data (#48045) feat: Add deployment/ci federated content and data (#48041) fix(studio): wire up siwc-enabled query param opt-in on sign-in/sign-up (#48126) fix(studio): stop stacking overlaid area series in report charts (#48034) Update Dev toolbar to support filtering feature flags (#48137) Update dev toolbar to support mocking org restrictions (#48136) feat: Add terraform federated content and data (#48010) Chore/add sessions database connections (#48094) fix(studio): guard panel collapse/resize on narrow viewports (#48098) Landing page agent focus (#47989) fix(studio): chip away explicit-tabindex ratchet debt (#48040) fix(studio): untangle nested buttons in editor tabs (#48101) fix(docs): broken link (#48117) docs: add VS Code to the AI coding agent plugin install picker (#48108) docs: add Kimi Code to MCP and AI coding agent plugin setup (#48099) fix: preserve function responses (#47920) fix(assistant): SQL approval buttons do nothing (#48102) ...
Line-style report charts (auth processing time, percentiles, edge functions, realtime, etc.) hardcoded
stackId="1"on every<Area>, so recharts summed the series additively instead of overlaying them.When multiple series share a value (e.g. Max/Min/Avg all
153.98), they rendered as three stacked bands at 1x/2x/3x the value, even though the tooltip showed the true identical values.Fix
Default each area to its own
stackId(its attribute name) so series overlay, while still honoring an explicit per-attributestackIdfrom config — matching the existing bar-chart path directly above it.normalizeVisibleStackToPercent, the only flag that would make stacked areas intentional, is never enabled anywhere.Before / after
Before: three equal values drawn at
0→153.98,153.98→307.96,307.96→461.94.After: all three overlay at
153.98.Affects every line-style multi-series report, not just auth.
Summary by CodeRabbit
Bug Fixes
Tests