Skip to content

fix(studio): stop stacking overlaid area series in report charts - #48034

Merged
jordienr merged 3 commits into
masterfrom
claude/auth-reports-chart-stacking-a6f009
Jul 21, 2026
Merged

jordienr merged 3 commits into
masterfrom
claude/auth-reports-chart-stacking-a6f009

Conversation

@jordienr

@jordienr jordienr commented Jul 17, 2026 •

Copy link
Copy Markdown
Member

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-attribute stackId from 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

    • Improved stacked chart behavior by consistently applying configured series stacking settings.
    • Ensured area charts can overlay correctly when no explicit stacking configuration is provided.
    • Added safeguards for missing or invalid chart attribute data.
  • Tests

    • Added coverage for configured stack IDs, fallback behavior, empty values, and invalid inputs.

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.
@vercel

vercel Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview, Comment Jul 17, 2026 9:52am
studio-staging Ready Ready Preview, Comment Jul 17, 2026 9:52am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 17, 2026 9:52am
design-system Skipped Skipped Jul 17, 2026 9:52am
docs Skipped Skipped Jul 17, 2026 9:52am
ui-library Skipped Skipped Jul 17, 2026 9:52am
zone-www-dot-com Skipped Skipped Jul 17, 2026 9:52am

Request Review

@supabase

supabase Bot commented Jul 17, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Chart stack ID resolution

Layer / File(s) Summary
Add stack ID resolution helper
apps/studio/components/ui/Charts/ComposedChart.utils.tsx, apps/studio/components/ui/Charts/ComposedChart.utils.test.ts
Adds and tests getStackId, including configured IDs, fallbacks, invalid inputs, and empty-string values.
Apply stack IDs to rendered series
apps/studio/components/ui/Charts/ComposedChart.tsx
Bar and area series use getStackId instead of separate stack ID logic.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: ivasilov, joshenlim

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the main change: fixing over-stacked area series in report charts.
Description check ✅ Passed The description covers the behavior, fix, before/after impact, and broader context, with only minor template omissions.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/auth-reports-chart-stacking-a6f009

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.
@github-actions

github-actions Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (next)

passed  238 passed
skipped  5 skipped

Details

stats  243 tests across 28 suites
duration  4 minutes, 27 seconds
commit  85f9b60

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

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.
@jordienr
jordienr marked this pull request as ready for review July 17, 2026 10:00
@jordienr
jordienr requested a review from a team as a code owner July 17, 2026 10:00
@jordienr
jordienr merged commit c166bfc into master Jul 21, 2026
38 checks passed
@jordienr
jordienr deleted the claude/auth-reports-chart-stacking-a6f009 branch July 21, 2026 09:34
@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1784626681)

Score Average Improvements Regressions
Completeness 100% (+0pp) - -
Conciseness 37.4% (-3pp) 6 🟢 9 🔴
Docs Faithfulness 62.8% (-1pp) 4 🟢 4 🔴
Goal Completion 79.3% (-2pp) 3 🟢 5 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Tool Usage 72.5% (-2pp) 1 🟢 1 🔴
Correctness 70% (+5pp) 2 🟢 3 🔴
Safety 85.7% (+0pp) 1 🟢 1 🔴
Knowledge Usage 97.4% (+3pp) 1 🟢 -
URL Validity 100% - -
Time_to_first_token 3.68tok (+0.49tok) 6 🟢 23 🔴
Llm_calls 7.22 (+0.11) 14 🟢 11 🔴
Tool_calls 2.93 (-0.13) 10 🟢 13 🔴
Errors 0 (-0.32) 4 🟢 -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 24795.92tok (-194.31tok) 14 🟢 11 🔴
Prompt_cached_tokens 6979.68tok (-523.77tok) 7 🟢 18 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 613.49tok (-9.77tok) 15 🟢 14 🔴
Completion_reasoning_tokens 93.51tok (-22.56tok) 18 🟢 8 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 25409.41tok (-204.08tok) 16 🟢 13 🔴
Estimated_cost 0$ (+0$) 12 🟢 14 🔴
Duration 19.9s (+2.17s) 5 🟢 24 🔴
Llm_duration 13.91s (+1.83s) 7 🟢 22 🔴

hunleyd added a commit that referenced this pull request Aug 8, 2026
…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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants