Skip to content

Comments

fix(Tabs): prevent infinite rerenders with nested tabs#37018

Merged
msyavuz merged 4 commits intomasterfrom
msyavuz/fix/infinite-refresh-bug
Jan 10, 2026
Merged

fix(Tabs): prevent infinite rerenders with nested tabs#37018
msyavuz merged 4 commits intomasterfrom
msyavuz/fix/infinite-refresh-bug

Conversation

@msyavuz
Copy link
Member

@msyavuz msyavuz commented Jan 9, 2026

SUMMARY

#35265 introduced a bug where refreshing a dashboard with nested tabs would cause infinite rerenders. This pr fixes that bug by introducing a lazy option to dashboard refresh action that doesn't update the global refresh time.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

tab-refresh-before.mp4

After:

tab-refresh-after.mp4

TESTING INSTRUCTIONS

  1. Create a dashboard with nested tabs.
  2. Refresh it using Refresh dashboard button on three-dot menu.

This should not cause infinite rerenders.

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

@netlify
Copy link

netlify bot commented Jan 9, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 45bb64d
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/696147da56df590008bfd387
😎 Deploy Preview https://deploy-preview-37018--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.

@msyavuz msyavuz marked this pull request as ready for review January 9, 2026 18:28
@dosubot dosubot bot added the dashboard:tab Related to the usage of tabs in the Dashboard label Jan 9, 2026
@sadpandajoe sadpandajoe added the 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR label Jan 9, 2026
@github-actions github-actions bot added 🎪 45bb64d 🚦 building Environment 45bb64d status: building 🎪 45bb64d 📅 2026-01-09T19-01 Environment 45bb64d created at 2026-01-09T19-01 🎪 45bb64d 🤡 sadpandajoe Environment 45bb64d requested by sadpandajoe 🎪 ⌛ 48h Environment expires after 48 hours (default) and removed 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR labels Jan 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

🎪 Showtime is building environment on GHA for 45bb64d

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

github-actions bot commented Jan 9, 2026

🎪 Showtime deployed environment on GHA for 45bb64d

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

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 9, 2026

Code Review Agent Run #998926

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: d983c0d..45bb64d
    • superset-frontend/src/dashboard/actions/dashboardState.js
    • superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.jsx
    • superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.test.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 evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@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

@github-actions github-actions bot added the 🎪 92e5cac 🚦 building Environment 92e5cac status: building label Jan 10, 2026
@github-actions github-actions bot added 🎪 92e5cac 📅 2026-01-10T14-41 Environment 92e5cac created at 2026-01-10T14-41 🎪 92e5cac 🤡 msyavuz Environment 92e5cac requested by msyavuz labels Jan 10, 2026
@github-actions
Copy link
Contributor

🎪 Showtime is building environment on GHA for 92e5cac

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

Sequence Diagram

The PR changes tab refresh behavior so that when a tab becomes visible after a dashboard-level refresh, the Tab component triggers a lazy chart refresh (isLazyLoad=true) and guards duplicate handling to avoid updating global refresh state — preventing infinite rerenders with nested tabs.

sequenceDiagram
    participant Dashboard UI
    participant Tab Component
    participant Redux Dispatcher
    participant Chart Refresher

    Dashboard UI->>Tab Component: Tab becomes visible (renderType=RENDER_TAB_CONTENT)
    Tab Component->>Tab Component: check lastRefreshTime > tabActivationTime && not handled
    Tab Component->>Redux Dispatcher: dispatch onRefresh(chartIds, force=true, interval=0, dashboardId, isLazyLoad=true)
    Redux Dispatcher->>Chart Refresher: refreshCharts(chartIds,...)
    Chart Refresher-->>Redux Dispatcher: refresh complete
    note right of Redux Dispatcher: because isLazyLoad=true, global ON_REFRESH and filters refresh are NOT dispatched
Loading

Generated by CodeAnt AI

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

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Potential filter staleness
    The PR also skips onFiltersRefresh() for lazy loads. Make sure this will not leave filter state inconsistent when nested tab charts are refreshed lazily — verify that filters remain correct and that UI doesn't show inconsistent data when onFiltersRefresh is suppressed.

  • Reducer / side-effect changes
    Skipping the ON_REFRESH action and onFiltersRefresh() for lazy loads may prevent reducers or middleware from running logic previously tied to that action (for example, global refresh time updates, metrics, or other side effects). Audit reducers and middleware listening for ON_REFRESH or ON_FILTERS_REFRESH to ensure skipping them for lazy loads doesn't produce stale state or missed telemetry.

  • Callsite compatibility
    The new isLazyLoad parameter changes the semantics of onRefresh. Consumers that need lazy refresh behavior must pass true; otherwise behavior remains unchanged due to the default. Verify all call sites (including extensions and presets) that trigger refreshes for nested tabs or lazy-loaded components are updated to pass the flag where appropriate. If any callers dispatch onRefresh indirectly (e.g., via wrapper actions), confirm they propagate the new parameter.

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

CodeAnt AI finished reviewing your PR.

@github-actions github-actions bot added 🎪 92e5cac 🚦 deploying Environment 92e5cac status: deploying 🎪 92e5cac 🚦 running Environment 92e5cac status: running 🎪 🎯 92e5cac Active environment pointer - 92e5cac is receiving traffic 🎪 92e5cac 🌐 34.209.227.96:8080 Environment 92e5cac URL: http://34.209.227.96:8080 (click to visit) and removed 🎪 92e5cac 🚦 building Environment 92e5cac status: building 🎪 92e5cac 🚦 deploying Environment 92e5cac status: deploying 🎪 92e5cac 🚦 running Environment 92e5cac status: running 🎪 🎯 92e5cac Active environment pointer - 92e5cac is receiving traffic 🎪 45bb64d 🌐 18.236.111.15:8080 Environment 45bb64d URL: http://18.236.111.15:8080 (click to visit) 🎪 45bb64d 🤡 sadpandajoe Environment 45bb64d requested by sadpandajoe 🎪 45bb64d 📅 2026-01-09T19-01 Environment 45bb64d created at 2026-01-09T19-01 🎪 45bb64d 🚦 running Environment 45bb64d status: running labels Jan 10, 2026
@github-actions
Copy link
Contributor

🎪 Showtime deployed environment on GHA for 92e5cac

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

@msyavuz msyavuz merged commit 0294c30 into master Jan 10, 2026
69 checks passed
@msyavuz msyavuz deleted the msyavuz/fix/infinite-refresh-bug branch January 10, 2026 15:38
@bito-code-review
Copy link
Contributor

Bito Automatic Review Skipped – PR Already Merged

Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.
No action is needed if you didn't intend to review it. To get a review, you can type /review in a comment and save it

sadpandajoe pushed a commit that referenced this pull request Jan 12, 2026
@sadpandajoe sadpandajoe added the v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch label Jan 12, 2026
sadpandajoe pushed a commit that referenced this pull request Jan 12, 2026
JCelento pushed a commit to JCelento/superset that referenced this pull request Jan 19, 2026
@sadpandajoe sadpandajoe added the 🎪 🛑 showtime-trigger-stop Destroy ephemeral environment and clean up AWS resources label Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard:tab Related to the usage of tabs in the Dashboard preset-io 🎪 🛑 showtime-trigger-stop Destroy ephemeral environment and clean up AWS resources size/L v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch 🎪 ⌛ 48h Environment expires after 48 hours (default) 🎪 92e5cac 🤡 msyavuz Environment 92e5cac requested by msyavuz 🎪 92e5cac 🚦 running Environment 92e5cac status: running 🎪 92e5cac 🌐 34.209.227.96:8080 Environment 92e5cac URL: http://34.209.227.96:8080 (click to visit) 🎪 92e5cac 📅 2026-01-10T14-41 Environment 92e5cac created at 2026-01-10T14-41

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants