Skip to content

DO NOT MERGE: prove e2e tests fail without #2189 fix#2217

Closed
alex-fedotyev wants to merge 2 commits into
mainfrom
alex/HDX-4147-test-against-bug
Closed

DO NOT MERGE: prove e2e tests fail without #2189 fix#2217
alex-fedotyev wants to merge 2 commits into
mainfrom
alex/HDX-4147-test-against-bug

Conversation

@alex-fedotyev
Copy link
Copy Markdown
Contributor

Throwaway PR to verify the regression test in #2209 actually catches the HDX-4147 bug. Cherry-picks the e2e test commits onto plain main (which does NOT have #2189's selection-persistence fix). I'll watch the e2e shards fail, screenshot the failures, then close this PR.

If the e2e shards PASS here, the test is broken and I need to tighten it.

Adds Playwright regression coverage for the bug fixed in PR #2189:
the dashed drag-select rectangle on the Event Deltas heatmap collapsed
to a 2x2 px residue after mouseup unless u.select is mirrored from the
URL state.

Three scenarios in one spec:

1. Drag-select draws a persistent rectangle and writes URL state.
   Asserts URL gains xMin/xMax/yMin/yMax AND the .u-select element
   has width/height > 20 px, well above the 2x2 px collapse signature.

2. Reloading the page restores the rectangle from URL state. This is
   what specifically catches the ready-vs-onCreate timing issue: at
   onCreate u.scales.y.min/max aren't populated for mode-2 facet data,
   so the apply must run from uPlot's ready hook. The test reloads
   after a drag and asserts the rectangle returns with the same
   dimensions.

3. Clicking off the rectangle clears both URL state and the
   rectangle (collapses below 5 px on each axis).

New SearchPage methods: openEventDeltasMode, getHeatmap,
getHeatmapSelectionRect, dragHeatmapSelection. The drag helper spans
both axes so the resulting selection has non-zero width AND height
(uPlot treats single-axis drags as zero-size and skips the hook).
nuqs setFields and uPlot's ready hook both flush asynchronously after
mouseup and after page reload. The synchronous reads at line 27 (URL
params) and line 35/64 (post-reload boundingBox) raced with the flush
and failed in CI shard 2 across all 3 retries: the URL never carried
xMin= within the test window.

Wrap each URL read in expect.poll(...) per param and gate the rect
dimension reads on a polled width > 20 (or < 5 for the post-clear
collapse). Capture rect once after polling settles, then assert the
remaining dimensions and the cross-check round-trip.

Also fixes lint: simple-import-sort/imports, prettier multi-line
arg formatting on assertion messages.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

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

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment May 6, 2026 5:24pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 6, 2026

⚠️ No Changeset found

Latest commit: d821b03

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

E2E Test Results

3 tests failed • 164 passed • 3 skipped • 1208s

Status Count
✅ Passed 164
❌ Failed 3
⚠️ Flaky 5
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

@alex-fedotyev
Copy link
Copy Markdown
Contributor Author

Served its purpose: confirmed all three test cases in the regression spec on PR #2209 fail when the selection-persistence fix from #2189 is absent. See run 25450398876 shard 3 — drag-select, reload-restore, and click-to-clear all fail at the rectangle-size polling assertions, with retries also failing.

Closing without merge.

@alex-fedotyev alex-fedotyev deleted the alex/HDX-4147-test-against-bug branch May 6, 2026 17:32
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