Skip to content

fix(explore): Stop Heat Map drag-to-zoom writing duplicate history entries#119336

Merged
gggritso merged 1 commit into
masterfrom
georgegritsouk/dain-1774-heat-map-zoom-actions-dont-populate-browser-history
Jul 10, 2026
Merged

fix(explore): Stop Heat Map drag-to-zoom writing duplicate history entries#119336
gggritso merged 1 commit into
masterfrom
georgegritsouk/dain-1774-heat-map-zoom-actions-dont-populate-browser-history

Conversation

@gggritso

@gggritso gggritso commented Jul 9, 2026

Copy link
Copy Markdown
Member

Guard the metrics query-param provider's setQueries navigation with the shared navigateIfQueryChanged helper so drag-to-zoom on a Heat Map widget no longer writes duplicate browser-history entries. Heat Maps hit a slightly different path from time series zoom actions because a Heat Map zoom also updates the query, so this change check is needed.

Closes DAIN-1774

…tries

Drag-to-zoom on a Heat Map widget writes the new `value` filter into the
`metric` URL param directly. The row's search query builder then re-derives
that same query from the URL and echoes it back through onChange -> handleSearch
-> setQueries, which pushed a second, redundant history entry. That extra entry
broke browser back/forward navigation between zoom states.

Guard the provider's setQueries navigation with the shared navigateIfQueryChanged
helper so the echo becomes a no-op when the query is unchanged, matching how the
spans and logs query-param providers already behave.

Fixes DAIN-1774

Co-Authored-By: Claude <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jul 9, 2026

Copy link
Copy Markdown

DAIN-1774

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 9, 2026
@gggritso

gggritso commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@cursor review

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ea929fc. Configure here.

@gggritso gggritso marked this pull request as ready for review July 9, 2026 19:47
@gggritso gggritso requested a review from a team as a code owner July 9, 2026 19:47

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

I wonder if we should have like a lint rule or agent sweep about this? ✅

@gggritso gggritso merged commit f8034eb into master Jul 10, 2026
78 of 79 checks passed
@gggritso gggritso deleted the georgegritsouk/dain-1774-heat-map-zoom-actions-dont-populate-browser-history branch July 10, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants