Skip to content

fix(explore-chart-panel): last queried at overlap - #37501

Closed
ramiroaquinoromero wants to merge 5 commits into
apache:masterfrom
ramiroaquinoromero:ramiro.aquino.romero/sc-97516/fix-last-queried-at-overlap
Closed

ramiroaquinoromero wants to merge 5 commits into
apache:masterfrom
ramiroaquinoromero:ramiro.aquino.romero/sc-97516/fix-last-queried-at-overlap

Conversation

@ramiroaquinoromero

@ramiroaquinoromero ramiroaquinoromero commented Jan 28, 2026 •

Copy link
Copy Markdown
Contributor

SUMMARY

Open up an existing chart from the charts list (note that it's easier to see this bug on a bar chart, area chart, line chart etc than it is on something like a Big Number)

PROBLEM

The chart container didn’t have a minimum size, so in a flex layout it could shrink too much and the chart ended up drawing in a tiny or unstable area. On top of that, the resize logic ran as soon as the component mounted and kept firing every 100 ms, so we were constantly measuring and re-rendering. That made the chart area jump around and caused the flicker. We were also using && to only show the chart when we had width and height, so when one of them was still 0 we could briefly render a “0” on screen and add to the layout mess.
The “Last queried at” label didn’t have its own reserved row it was just another flex item so when the panel was small, that row could get squeezed or end up on top of the chart instead of below it.
So in practice: no minimum size for the chart area, too much measuring right from the start, and no fixed space for the label. That’s what led to the clipping, flicker, and overlap.

###SOLUTION

We set minimum dimensions for the container. We turned off resize on mount and slowed updates to 250 ms, and we use a ternary so we only render the chart when we have real dimensions. We gave "Last queried at" a fixed row so it doesn’t overlap the chart. That fixes the clipping, overlap, and flicker.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before

before.mp4

After

after.mp4

After fix

after.mp4

TESTING INSTRUCTIONS

  1. Create a bar chart or similar (since it is more noticeable here).
  2. Save the chart.
  3. Go back to the dashboard.
  4. Re-enter the chart (the content on the "x" axis is not displayed properly and scrolling becomes enabled).

ADDITIONAL INFORMATION

  • Has associated issue: Fixes "Last queried at" timestamp overlaps charts in Explore #37219
  • 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

netlify Bot commented Jan 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 1bbf7b6
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/698f4a7d4e2152000889ce83
😎 Deploy Preview https://deploy-preview-37501--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.

@ramiroaquinoromero ramiroaquinoromero changed the title fix(explore-chart-panel): 'Last Queried at' Overlap fix(explore-chart-panel): last queried at overlap Jan 28, 2026
@ramiroaquinoromero
ramiroaquinoromero marked this pull request as ready for review January 29, 2026 04:10
@dosubot dosubot Bot added change:frontend Requires changing the frontend explore Namespace | Anything related to Explore labels Jan 29, 2026
@ramiroaquinoromero
ramiroaquinoromero force-pushed the ramiro.aquino.romero/sc-97516/fix-last-queried-at-overlap branch from f238dd5 to ed7f103 Compare January 29, 2026 04:12
Comment thread superset-frontend/src/explore/components/ExploreChartPanel/index.tsx Outdated
@bito-code-review

bito-code-review Bot commented Jan 29, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #76fbf3

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/src/explore/components/ExploreChartPanel/ExploreChartPanel.test.jsx - 1
    • Incomplete test assertion for queried time · Line 183-196
      The test checks for the presence of 'last queried at' text but does not validate the actual formatted time value. This could allow bugs in date parsing or formatting to go undetected. Consider asserting the complete label text to verify the behavior logic.
Review Details
  • Files reviewed - 3 · Commit Range: 63ee2df..ed7f103
    • superset-frontend/src/explore/components/ExploreChartPanel/ExploreChartPanel.test.jsx
    • superset-frontend/src/explore/components/ExploreChartPanel/index.tsx
    • superset-frontend/src/explore/components/ExploreChartPanel/useResizeDetectorByObserver.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 evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

Comment thread superset-frontend/src/explore/components/ExploreChartPanel/index.tsx Outdated
@msyavuz

msyavuz commented Jan 29, 2026

Copy link
Copy Markdown
Member

Also can you add some testing steps and highlight the bug on the summary. I attached the issue onto the pr but it would be easy to miss what's wrong from the videos

@reynoldmorel reynoldmorel 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.

I think this solution adds a small flickering according to your video recordings. I know this will sound very rookie on my end, but did you try adding minHeight and minWidth to the parent container? Using resize observer consumes a lot of resources in the client side, so probably avoiding as much as possible would be good.

Not sure about what you tried already, but just asking to make sure we tried everything we knew before going this way

@bito-code-review bito-code-review Bot 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.

Code Review Agent Run #988724

Actionable Suggestions - 1
  • superset-frontend/src/explore/components/ExploreChartPanel/useResizeDetectorByObserver.ts - 1
Review Details
  • Files reviewed - 3 · Commit Range: ed7f103..791dd36
    • superset-frontend/src/explore/components/ExploreChartPanel/ExploreChartPanel.test.jsx
    • superset-frontend/src/explore/components/ExploreChartPanel/index.tsx
    • superset-frontend/src/explore/components/ExploreChartPanel/useResizeDetectorByObserver.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 evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@ramiroaquinoromero
ramiroaquinoromero force-pushed the ramiro.aquino.romero/sc-97516/fix-last-queried-at-overlap branch from 791dd36 to 4a36e69 Compare February 12, 2026 02:54
@ramiroaquinoromero

Copy link
Copy Markdown
Contributor Author

@msyavuz Please review it.

@bito-code-review

bito-code-review Bot commented Feb 12, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #7d6ddc

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: cdec902..4a36e69
    • superset-frontend/src/explore/components/ExploreChartPanel/ExploreChartPanel.test.tsx
    • superset-frontend/src/explore/components/ExploreChartPanel/index.tsx
    • superset-frontend/src/explore/components/ExploreChartPanel/useResizeDetectorByObserver.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 evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@alexandrusoare

Copy link
Copy Markdown
Contributor

Superset uses Git pre-commit hooks courtesy of pre-commit. To install run the following:

pip3 install -r requirements/development.txt
pre-commit install

A series of checks will now run when you make a git commit.

Alternatively it is possible to run pre-commit by running pre-commit manually:

pre-commit run --all-files

@alexandrusoare

Copy link
Copy Markdown
Contributor

Can we also update the description to get more of context on what the issue was, what was the root cause and what the fix is?

@massucattoj

Copy link
Copy Markdown
Contributor

Hi! Just a heads up — the root cause of this issue was fixed in #39160 (merged April 8), which consolidated the resize observer refs that were causing the layout mismatch. The "Last queried at" overlap can no
longer be reproduced on current master. This PR can likely be closed. @msyavuz

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 explore Namespace | Anything related to Explore size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Last queried at" timestamp overlaps charts in Explore

7 participants