Skip to content

test: check the large graph's failure against the graph viewport, not the window - #9

Merged
GauJosh merged 1 commit into
mainfrom
fix/e2e-large-graph-viewport
Oct 29, 2026
Merged

GauJosh merged 1 commit into
mainfrom
fix/e2e-large-graph-viewport

Conversation

@GauJosh

@GauJosh GauJosh commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Fixes the E2E failure on main at e57926c (run 40910770495): explorer.spec.ts "large graph: opens readable on the failure…", node def:s6-j3 not in viewport, ratio 0.

Cause

The app centres the failing node in the graph viewport; the test checked it against the browser window. At 1280×720 the graph viewport starts around y≈505 and extends below the fold, so the test passed only while part of the node stayed above the window edge. The tabs added above the graph in this release wrap onto another row with wider fonts, pushing the graph down.

Reproduced in the Playwright Linux image (v1.63.0-noble) with fonts-dejavu-core: fails 5/5 at e57926c, passes 5/5 at e76ec44. Also fails on Windows at 1280×600.

Change (test only; no app code)

  • expectOpenOnFailure: scroll the graph viewport into view, then require the whole node visible (ratio: 1) and centred in the viewport within 2 px (stricter than the previous any-pixel check).
  • New test: same check in a 1280×600 window, where the old assertion fails on every platform.

Local validation

  • Large-graph tests ×10 on Windows: 20/20; ×5 in Linux + DejaVu: 10/10.
  • Negative control (app not centring on the failure): both tests fail.
  • Lint, typecheck, 485 unit tests, build; full Playwright on Windows 173 passed / 2 skipped; full Playwright in Linux + DejaVu passed.

🤖 Generated with Claude Code

… the window

The large-graph test asserted that the failing node was in the browser
window. The app centres the failure in the graph viewport, which at
1280x720 starts around y=505 and runs below the fold, so the test passed
only while part of the node stayed above the window's edge. The tabs
added above the graph wrap to another row with wider fonts; with DejaVu
Sans (Linux Playwright image) the node fell entirely below the fold and
the test failed every time, as in the E2E run on main at e57926c.

- expectOpenOnFailure: bring the graph viewport into view, then require
  the whole node to be visible and centred in the viewport (within 2 px).
- New test: the same check in a 1280x600 window, where the old assertion
  fails on every platform.

App code is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GauJosh
GauJosh merged commit 26cac60 into main Oct 29, 2026
5 checks passed
@GauJosh
GauJosh deleted the fix/e2e-large-graph-viewport branch October 29, 2026 17:37
GauJosh added a commit that referenced this pull request Oct 29, 2026
Brings in the large-graph E2E fix (#9) so the hosting branch is validated
against the current main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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