Skip to content

feat(dashboard): add chart query inspector - #43376

Open
jsk1004ha wants to merge 3 commits into
apache:masterfrom
jsk1004ha:codex/chart-query-inspector
Open

feat(dashboard): add chart query inspector#43376
jsk1004ha wants to merge 3 commits into
apache:masterfrom
jsk1004ha:codex/chart-query-inspector

Conversation

@jsk1004ha

Copy link
Copy Markdown

SUMMARY

Enhances the dashboard chart View query action into a permission-aware Query inspector, following the troubleshooting workflow popularized by Grafana's panel inspector.

The inspector keeps the existing generated SQL behavior and adds:

  • a Response tab showing the cached queriesResponse as copyable JSON;
  • a Stats tab showing query count, returned payload rows, cache hits, response size, and chart update duration;
  • no additional chart-data request for Response or Stats.

Raw response JSON is only available when the user can already explore the chart or use View as table. Users with only query-view permission retain access to generated SQL and aggregate stats.

Discussion: #43375

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Not included because this development environment does not have a running Superset backend. The UI behavior is covered by focused React tests.

TESTING INSTRUCTIONS

  1. Open a dashboard containing a rendered chart.
  2. Open the chart menu and select Query inspector.
  3. Verify the Query tab shows generated SQL.
  4. Verify the Response tab shows cached chart JSON for a role with View table or Explore permission.
  5. Verify Stats shows query count, returned rows, cache count, response size, and duration.

Automated checks:

  • ViewQueryModal.test.tsx: 7 passed
  • SliceHeaderControls.test.tsx: 46 passed
  • OXC lint, stylelint, custom frontend rules, and oxfmt passed for changed files
  • npm run type passed after building workspace declarations

ADDITIONAL INFORMATION

  • Has associated issue: GitHub Discussion linked above
  • Required feature flags:
  • Changes UI
  • Includes DB Migration
    • 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

@dosubot dosubot Bot added change:frontend Requires changing the frontend dashboard Namespace | Anything related to the Dashboard explore Namespace | Anything related to Explore labels Aug 21, 2026
@bito-code-review

bito-code-review Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #a1e87b

Actionable Suggestions - 0
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • superset-frontend/src/explore/components/controls/ViewQueryModal.test.tsx - 1
Review Details
  • Files reviewed - 6 · Commit Range: 54b1ba7..54b1ba7
    • superset-frontend/src/dashboard/components/SliceHeader/index.tsx
    • superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx
    • superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
    • superset-frontend/src/dashboard/components/SliceHeaderControls/types.ts
    • superset-frontend/src/explore/components/controls/ViewQueryModal.test.tsx
    • superset-frontend/src/explore/components/controls/ViewQueryModal.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Eslint (Linter) - ✖︎ Failed

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 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.56098% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 66.84%. Comparing base (f7d505e) to head (f4d63bc).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
...src/explore/components/controls/ViewQueryModal.tsx 97.05% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #43376   +/-   ##
=======================================
  Coverage   66.84%   66.84%           
=======================================
  Files        2876     2876           
  Lines      164066   164102   +36     
  Branches    37863    37878   +15     
=======================================
+ Hits       109666   109702   +36     
  Misses      52226    52226           
  Partials     2174     2174           
Flag Coverage Δ
javascript 74.13% <97.56%> (+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.

@bito-code-review

bito-code-review Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #f48370

Actionable Suggestions - 0
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • superset-frontend/src/explore/components/controls/ViewQueryModal.test.tsx - 1
Review Details
  • Files reviewed - 1 · Commit Range: 54b1ba7..4f0cbd7
    • superset-frontend/src/explore/components/controls/ViewQueryModal.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 an incremental AI Review.

  • /review full - 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

@netlify

netlify Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit f4d63bc
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a884782f2f5720008ed2238
😎 Deploy Preview https://deploy-preview-43376--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 21, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #eb65ed

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 4f0cbd7..f4d63bc
    • superset-frontend/src/explore/components/controls/ViewQueryModal.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 an incremental AI Review.

  • /review full - 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

change:frontend Requires changing the frontend dashboard Namespace | Anything related to the Dashboard explore Namespace | Anything related to Explore size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant