Skip to content

test(explore): add end-to-end regression test for DatasourcePanel through the real AutoSizer + react-window List pipeline - #43023

Open
rusackas wants to merge 2 commits into
apache:masterfrom
rusackas:test/datasource-panel-real-autosizer-regression
Open

test(explore): add end-to-end regression test for DatasourcePanel through the real AutoSizer + react-window List pipeline#43023
rusackas wants to merge 2 commits into
apache:masterfrom
rusackas:test/datasource-panel-real-autosizer-regression

Conversation

@rusackas

Copy link
Copy Markdown
Member

SUMMARY

Investigated #43008 (metrics/columns not showing in the Explore Datasource
Panel, bisected to the react-window v1->v2 bump in #42528).

Dosu's automated diagnosis on that issue claims DatasourceItems.tsx and
DatasourcePanelItem.tsx are still using the old v1 VariableSizeList API.
That's not accurate against current master -- both files were correctly
migrated to react-window v2's List/rowHeight/rowCount/rowProps/
rowComponent API in the same commit the bisect flagged, and haven't
changed since.

I couldn't reproduce the blank-panel bug in code:

  • An isolated real-browser (Playwright/Chromium) repro of the exact
    List + AutoSizer wiring pattern, using the pinned react-window@2.3.0
    and react-virtualized-auto-sizer@1.0.26 versions, renders rows
    correctly.
  • The existing unit test suite for this component passes on master, but
    it mocks react-virtualized-auto-sizer to a fixed height, which bypasses
    react-window's own sizing path entirely and wouldn't catch a regression
    here.

This PR adds a test that exercises the real (unmocked) AutoSizer + real
List + real DatasourcePanelItem end to end, driving an actual
ResizeObserver callback the way the browser does. It renders metrics and
columns correctly against the current code. I verified the test actually
catches breakage by temporarily zeroing out rowCount in
DatasourceItems.tsx and confirming the test fails.

No code fix is included since I couldn't find a bug to fix -- this adds
permanent regression coverage for the one gap in this area's existing test
suite either way.

BEFORE/AFTER

N/A -- test-only change, no behavior change.

TESTING INSTRUCTIONS

npm run test -- src/explore/components/DatasourcePanel/DatasourcePanel.real-autosizer.test.tsx

ADDITIONAL INFORMATION

…ough the real AutoSizer + react-window List pipeline

Adds a test that exercises the real (unmocked) react-virtualized-auto-sizer
and react-window List/DatasourcePanelItem together, unlike the existing
suite which mocks AutoSizer to a fixed height and never engages
react-window's own sizing path. Guards against regressions like apache#43008.
@bito-code-review

bito-code-review Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #e527cd

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 050793e..050793e
    • superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanel.real-autosizer.test.tsx
  • 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 evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.59%. Comparing base (2eb1e04) to head (db68d1f).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #43023      +/-   ##
==========================================
- Coverage   66.59%   66.59%   -0.01%     
==========================================
  Files        2863     2863              
  Lines      161716   161716              
  Branches    37258    37258              
==========================================
- Hits       107698   107689       -9     
- Misses      51974    51982       +8     
- Partials     2044     2045       +1     
Flag Coverage Δ
javascript 73.62% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a frontend regression test to exercise the Explore DatasourcePanel through the real react-virtualized-auto-sizer + react-window v2 List sizing/measurement path (via a ResizeObserver callback), covering the regression reported in #43008.

Changes:

  • Introduces a new Jest/RTL test that renders DatasourcePanel inside ExploreContainer without mocking AutoSizer.
  • Stubs window.ResizeObserver to simulate browser resize notifications and provide deterministic sizing.
  • Asserts that representative metrics and columns render (guarding against blank/empty panel regressions).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Drop `implements ResizeObserver` on the fake observer (matches the
plain-class stub pattern used elsewhere in the repo, e.g.
AnnotationLayer.test.tsx) and fix a stale comment referencing "the
rest of this test file" mocking AutoSizer when this file is standalone.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit db68d1f
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a7a7b6e1505b800081c1d6a
😎 Deploy Preview https://deploy-preview-43023--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@bito-code-review

bito-code-review Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #8afb08

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 050793e..db68d1f
    • superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanel.real-autosizer.test.tsx
  • 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 evan@preset.io.

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

explore Namespace | Anything related to Explore size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants