Skip to content

fix: don't refetch the trace heatmap or filters when a column changes - #3750

Draft
knudtty wants to merge 5 commits into
aaron/prevent-unnecessary-histogram-rerenderfrom
aaron/skip-column-refetch-heatmap-filters
Draft

knudtty wants to merge 5 commits into
aaron/prevent-unnecessary-histogram-rerenderfrom
aaron/skip-column-refetch-heatmap-filters

Conversation

@knudtty

@knudtty knudtty commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stacked on #3749. That PR stops the search histogram refetching when a table column is added or removed. Two other search page queries were built from the same config and still refetched:

  • Trace heatmap (the "Heatmap" option in the RED/Heatmap toggle for trace sources): it was passed every alias from the table's columns as a WITH clause. Adding an aliased column, or the alias map reloading after any column change, changed its query.
  • Filter sidebar values and distributions: their config carried the table's full select and every alias. The filter queries set their own select, so neither affects their SQL; they only changed the query key.

Both now take the same referencedAliasWith as the histogram (only aliases the where, filters or group by use), and the filter config drops the table select.

Screenshots or video

No visual change; this removes a loading flash. I couldn't capture screenshots here — @aaronknudtson to add a before/after video if wanted.

How to reproduce

Starting point: yarn app:dev:local connected to the demo server.

On main:

  1. Open Search, choose the Traces source, set the time range to "Last 15 minutes".
  2. Pick "Heatmap" in the RED/Heatmap toggle.
  3. In the filter sidebar, click "Add column" on any field.
  4. The heatmap and filter value lists reload.

On this branch:

  1. Repeat steps 1-3.
  2. Only the results table reloads; the heatmap and filter values stay as they are.

How to test on Vercel preview

Preview routes: /search

Steps:

  1. Select the Traces source and set the time range to "Last 15 minutes".
  2. Click "Heatmap" in the RED/Heatmap toggle.
  3. In the filter sidebar, click the "Add column" toggle on any field.
  4. Verify the heatmap does not show a loading state and the filter value lists do not reload.

References

@knudtty
knudtty added this pull request to stack #3751 November 20, 2026 21:30
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Ready Ready Preview Nov 20, 2026 10:19pm UTC
hyperdx-storybook Ready Ready Preview Nov 20, 2026 10:19pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fac5298

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/app Patch
@hyperdx/api Patch
@hyperdx/otel-collector Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 473 passed • 1 skipped • 1259s

Status Count
✅ Passed 473
❌ Failed 0
⚠️ Flaky 9
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

@knudtty knudtty changed the title aaron/skip column refetch heatmap filters fix: don't refetch the trace heatmap or filters when a column changes Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 108 in total (1.13%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

…n/skip-column-refetch-heatmap-filters

# Conflicts:
#	packages/app/src/DBSearchPage.tsx

This branch was successfully deployed

2 active deployments
Preview – hyperdx-storybook — fac52982 Deployed Nov 20, 2026 by vercel[bot]
Preview – hyperdx-oss — fac52982 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant