Skip to content

fix(sqllab): show truncated table list warning#41617

Merged
rusackas merged 5 commits into
apache:masterfrom
YinkaMetrics:yinka/table-selector-has-more-warning
Jul 10, 2026
Merged

fix(sqllab): show truncated table list warning#41617
rusackas merged 5 commits into
apache:masterfrom
YinkaMetrics:yinka/table-selector-has-more-warning

Conversation

@YinkaMetrics

Copy link
Copy Markdown
Contributor

SUMMARY

Fixes #40407.

TableSelector now uses the existing hasMore value returned by useTables to show a helper message when the API reports more tables than were returned in the current response. This makes truncated table lists visible to users and prompts them to refine their search.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Not included. The UI change is a small helper message below the table selector:

Some tables are not shown. Refine your search.

TESTING INSTRUCTIONS

  • cd superset-frontend
  • npm run test -- src/components/TableSelector/TableSelector.test.tsx
  • npx prettier --check src/components/TableSelector/index.tsx src/components/TableSelector/TableSelector.test.tsx
  • npx oxlint --config oxlint.json --quiet src/components/TableSelector/index.tsx src/components/TableSelector/TableSelector.test.tsx
  • npm run plugins:build
  • npm run type
  • prek run --all-files

Note: prek run --all-files passed the frontend hooks relevant to this change, including prettier (frontend), oxlint (frontend), custom rules (frontend), and Type-Checking (Frontend). The repo-wide run still failed on unrelated existing/local-environment items: mypy errors in tests/unit_tests/semantic_layers/mapper_test.py, missing yarn for docs eslint, missing helm-docs, existing Python ruff findings, and local python command resolution for two Python hooks.

ADDITIONAL INFORMATION

@YinkaMetrics
YinkaMetrics marked this pull request as ready for review July 1, 2026 08:10
@dosubot dosubot Bot added change:frontend Requires changing the frontend sqllab Namespace | Anything related to the SQL Lab labels Jul 1, 2026
@bito-code-review

bito-code-review Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #4eed2c

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 4f4a183..4f4a183
    • superset-frontend/src/components/TableSelector/TableSelector.test.tsx
    • superset-frontend/src/components/TableSelector/index.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

@rusackas

rusackas commented Jul 5, 2026

Copy link
Copy Markdown
Member

Thanks @YinkaMetrics! Of the three open PRs for #40407, I think this is the one we should carry forward... it has a test and reuses the existing .table-length styling.

One thing I flagged on #40656 applies here too: the message fires purely on hasMore, so in a readOnly control (like the DatasourceEditor in non-edit mode) it tells people to refine a search they can't run. Mind gating it on the same condition the Select already uses?

The jest failures look unrelated to this change... a rebase on current master should tell us for sure. I'll update the branch now.

@pull-request-size pull-request-size Bot added size/M and removed size/S labels Jul 5, 2026
@bito-code-review

bito-code-review Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #b006b2

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/src/components/TableSelector/index.tsx - 1
    • Test coverage gap · Line 343-343
      The fix correctly aligns message visibility with Select disabled state. However, consider adding a test case for when `disabled` is true due to missing schema (without `readOnly`) to prevent future regression.
Review Details
  • Files reviewed - 2 · Commit Range: 4f4a183..fc1079c
    • superset-frontend/src/components/TableSelector/TableSelector.test.tsx
    • superset-frontend/src/components/TableSelector/index.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

@bito-code-review

bito-code-review Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #7cb0db

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: fc1079c..50ece80
    • superset-frontend/src/components/TableSelector/TableSelector.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 Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.80%. Comparing base (bd61e09) to head (f664dce).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #41617      +/-   ##
==========================================
+ Coverage   64.77%   64.80%   +0.02%     
==========================================
  Files        2740     2740              
  Lines      153135   153111      -24     
  Branches    35127    35123       -4     
==========================================
+ Hits        99193    99219      +26     
+ Misses      52043    51995      -48     
+ Partials     1899     1897       -2     
Flag Coverage Δ
javascript 69.79% <100.00%> (+<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.

@rusackas rusackas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is exactly what I was after, thanks! Gating on !disabled covers both the readOnly and no-schema cases, and the two new tests prove it. Approving!

@rusackas rusackas added the merge-if-green If approved and tests are green, please go ahead and merge it for me label Jul 10, 2026
@rusackas
rusackas merged commit 35712ff into apache:master Jul 10, 2026
68 checks passed
@bito-code-review

Copy link
Copy Markdown
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

@YinkaMetrics

Copy link
Copy Markdown
Contributor Author

Thanks @rusackas for the review, approval, and guidance along the way. Really happy to help improve Superset, and glad the !disabled gating covered both cases. Appreciate you getting this over the line!

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

Labels

change:frontend Requires changing the frontend merge-if-green If approved and tests are green, please go ahead and merge it for me size/M sqllab Namespace | Anything related to the SQL Lab

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] TableSelector silently truncates table list when DB has more tables than API page limit

2 participants