Skip to content

Wait for the pdf-diff compare to finish before counting highlights - #4

Merged
jesse-anderson merged 1 commit into
mainfrom
fix-pdf-diff-multipage-flake
Nov 18, 2026
Merged

jesse-anderson merged 1 commit into
mainfrom
fix-pdf-diff-multipage-flake

Conversation

@jesse-anderson

Copy link
Copy Markdown
Owner

The multi-page test read the highlight overlay as soon as the summary appeared, but the tool shows the summary before it redraws the pages with highlights. On a slow runner the overlay was still empty (CI run 44215751195, pdf-diff.spec.cjs:299). The test now polls window.pdfDiffState.isProcessing until the compare finishes.

Verified by adding a temporary 500 ms delay to renderPage: the old test failed at line 299, the fixed one passed. Test-only change; all 13 pdf-diff tests pass.

The summary appears before the pages are redrawn with highlights, so the
multi-page test could count the overlay while it was still empty on a
slow runner (CI run 44215751195). It now waits until the compare
finishes.
@jesse-anderson
jesse-anderson merged commit 542a5d1 into main Nov 18, 2026
2 checks passed

This branch was previously deployed

1 inactive deployment
github-pages — 542a5d15 Deployed Nov 18, 2026 by jesse-anderson via deploy #176
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