Skip to content

Conversation

@LevisNgigi
Copy link
Contributor

SUMMARY

This change prevents request storms caused by Dynamic Group By chart customizations by aligning chart refresh behavior with the existing native filters pattern.
Previously, applying or saving chart customizations triggered a forced re-query of all charts on the dashboard, regardless of whether they were affected. This caused unnecessary request fan-out and excessive /api/v1/chart/data traffic on dashboards with many charts.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:
Screenshot from 2026-01-07 20-47-03

AFTER;
Screenshot from 2026-01-07 21-02-31

TESTING INSTRUCTIONS

1)Open a dashboard with multiple charts (ideally 10+).
2)Configure Dynamic Group By / Chart Customization for one or more charts.
3)Open the browser DevTools → Network tab (filter by /api/v1/chart/data).
4)Apply the chart customization.

Verify:

1)Only charts affected by the customization issue /api/v1/chart/data requests.
2)Unaffected charts do not re-query.
3)Each affected chart triggers only one request per apply action.
4)No repeated or cascading requests are observed.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 7, 2026

Code Review Agent Run #a7fcbb

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: b3e113d..b3e113d
    • superset-frontend/src/dashboard/actions/chartCustomizationActions.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot bot added the dashboard:performance Related to Dashboard performance label Jan 7, 2026
@codeant-ai-for-open-source
Copy link
Contributor

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Possible Bug
    The code assumes getRelatedChartsForChartCustomization always returns an array of valid chart IDs and directly spreads its result into affectedChartIds. If the helper returns null, undefined, a non-array, or values that are not numeric IDs, this will cause incorrect entries or runtime errors. Add defensive checks and normalize values to numbers before using them to build the affected list.

  • Possible Bug
    The code calls getRelatedChartsForChartCustomization(...) and pushes its result into affectedChartIds without validating the return value or element types. If the utility returns undefined, non-array, or non-numeric identifiers, dispatch(triggerQuery(true, chartId)) may be called with invalid arguments. Also ensure this behavior is correct for customizations that are removed (should they still trigger queries?).

  • Potential Dispatch Storm
    Even after narrowing down to related charts, the code dispatches a triggerQuery for every affected chart in a tight loop. For dashboards with many affected charts this can still cause many simultaneous requests. Consider filtering to existing slices, batching, or otherwise limiting concurrency.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI finished reviewing your PR.

@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit ee76300
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/695f99a76b8f8900085c6097
😎 Deploy Preview https://deploy-preview-36955--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 7, 2026

Code Review Agent Run #e57967

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: b3e113d..497a574
    • superset-frontend/src/dashboard/actions/chartCustomizationActions.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@LevisNgigi LevisNgigi closed this Jan 7, 2026
@LevisNgigi LevisNgigi reopened this Jan 7, 2026
@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 7, 2026

Code Review Agent Run #4ba813

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: 497a574..9d222f4
    • superset-frontend/src/dashboard/actions/chartCustomizationActions.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
    • superset-frontend/src/dashboard/util/getRelatedCharts.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@geido geido added the 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR label Jan 8, 2026
@github-actions github-actions bot added 🎪 9d222f4 🚦 building Environment 9d222f4 status: building 🎪 9d222f4 📅 2026-01-08T11-07 Environment 9d222f4 created at 2026-01-08T11-07 🎪 9d222f4 🤡 geido Environment 9d222f4 requested by geido 🎪 ⌛ 48h Environment expires after 48 hours (default) and removed 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR labels Jan 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

🎪 Showtime is building environment on GHA for 9d222f4

@geido
Copy link
Member

geido commented Jan 8, 2026

Can we add some test cases?

@github-actions github-actions bot added 🎪 9d222f4 🚦 deploying Environment 9d222f4 status: deploying 🎪 9d222f4 🚦 running Environment 9d222f4 status: running 🎪 🎯 9d222f4 Active environment pointer - 9d222f4 is receiving traffic and removed 🎪 9d222f4 🚦 building Environment 9d222f4 status: building 🎪 9d222f4 🚦 deploying Environment 9d222f4 status: deploying labels Jan 8, 2026
@github-actions github-actions bot added 🎪 c3b83fd 🚦 deploying Environment c3b83fd status: deploying 🎪 c3b83fd 🚦 running Environment c3b83fd status: running 🎪 🎯 c3b83fd Active environment pointer - c3b83fd is receiving traffic 🎪 c3b83fd 🌐 35.85.215.129:8080 Environment c3b83fd URL: http://35.85.215.129:8080 (click to visit) and removed 🎪 c3b83fd 🚦 building Environment c3b83fd status: building 🎪 c3b83fd 🚦 deploying Environment c3b83fd status: deploying 🎪 c3b83fd 🚦 running Environment c3b83fd status: running 🎪 🎯 c3b83fd Active environment pointer - c3b83fd is receiving traffic labels Jan 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

🎪 Showtime deployed environment on GHA for c3b83fd

Environment: http://35.85.215.129:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

@pull-request-size pull-request-size bot removed the size/L label Jan 8, 2026
@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

Copy link
Contributor

@bito-code-review bito-code-review bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Agent Run #715f0f

Actionable Suggestions - 1
  • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/GroupByFilterCard.tsx - 1
Additional Suggestions - 1
  • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationForm.tsx - 1
    • Race condition in async fetch · Line 432-437
      The async fetch logic has a race condition: if the dataset changes while a fetch is in progress, the old fetch may complete later and overwrite the state with stale data. To fix, track the current fetching dataset ID and only apply state updates if they match.
Review Details
  • Files reviewed - 7 · Commit Range: ee76300..9eed291
    • superset-frontend/src/dashboard/actions/chartCustomizationActions.ts
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationForm.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/GroupByFilterCard.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
    • superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts
    • superset-frontend/src/dashboard/util/getRelatedCharts.test.ts
    • superset-frontend/src/dashboard/util/getRelatedCharts.ts
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Eslint (Linter) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 9, 2026

Code Review Agent Run #38263c

Actionable Suggestions - 0
Review Details
  • Files reviewed - 7 · Commit Range: 9eed291..5a7667f
    • superset-frontend/src/dashboard/actions/chartCustomizationActions.ts
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationForm.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/GroupByFilterCard.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
    • superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts
    • superset-frontend/src/dashboard/util/getRelatedCharts.test.ts
    • superset-frontend/src/dashboard/util/getRelatedCharts.ts
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@geido geido added the 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR label Jan 9, 2026
const previouslyAffectedChartIds: number[] = [];
const originalCustomizations = chartCustomizationItems || [];

originalCustomizations.forEach(oldItem => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole logic seems fragile to me. It definitely needs some drying up also.

@github-actions github-actions bot removed 🎪 c3b83fd 🚦 running Environment c3b83fd status: running 🎪 c3b83fd 📅 2026-01-08T17-47 Environment c3b83fd created at 2026-01-08T17-47 🎪 c3b83fd 🌐 35.85.215.129:8080 Environment c3b83fd URL: http://35.85.215.129:8080 (click to visit) 🎪 c3b83fd 🤡 yousoph Environment c3b83fd requested by yousoph labels Jan 10, 2026
@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 11, 2026

Code Review Agent Run #6c5b7e

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/utils.ts - 1
    • Logic error in validation · Line 90-90
      The return statement here unconditionally returns true for any non-string, non-array value, but the JSDoc specifies that only 'truthy values' are valid. This could incorrectly validate falsy values like 0 or false. Update to 'return !!column;' to align with the documented behavior.
      Code suggestion
       @@ -86,5 +86,5 @@
      -  if (Array.isArray(column)) {
      -    return column.length > 0;
      -  }
      -
      -  return true;
      +  if (Array.isArray(column)) {
      +    return column.length > 0;
      +  }
      +
      +  return !!column;
Review Details
  • Files reviewed - 8 · Commit Range: 5a7667f..d07daf9
    • superset-frontend/src/dashboard/actions/chartCustomizationActions.ts
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationForm.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/GroupByFilterCard.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/utils.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
    • superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts
    • superset-frontend/src/dashboard/util/getRelatedCharts.test.ts
    • superset-frontend/src/dashboard/util/getRelatedCharts.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 11, 2026

Code Review Agent Run #3bc615

Actionable Suggestions - 0
Review Details
  • Files reviewed - 8 · Commit Range: d07daf9..14eb0ce
    • superset-frontend/src/dashboard/actions/chartCustomizationActions.ts
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationForm.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/GroupByFilterCard.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/utils.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
    • superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts
    • superset-frontend/src/dashboard/util/getRelatedCharts.test.ts
    • superset-frontend/src/dashboard/util/getRelatedCharts.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard:performance Related to Dashboard performance 🎪 🔒 showtime-blocked 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR size/XL 🎪 ⌛ 48h Environment expires after 48 hours (default)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants