• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

microlinkhq / browserless / 29433523371
79%

Build:
DEFAULT BRANCH: master
Ran 15 Jul 2026 04:43PM UTC
Jobs 9
Files 35
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jul 2026 04:42PM UTC coverage: 82.326% (-0.7%) from 83.062%
29433523371

push

github

web-flow
fix(pdf): navigation-tolerant readiness gate; skip screenshot poll for painted pages (#837)

* fix(pdf): navigation-tolerant readiness gate; skip screenshot poll for painted pages

prepare()'s `auto` mode gated readiness on a screenshot poll (waitUntilAuto):
screenshot -> isWhite? -> repeat. Two problems in the GPU-less fleet (llvmpipe):
the screenshots are software-rasterized (seconds each), and the poll throws
`Execution context was destroyed` / `Target closed` when a page client-navigates
under it (SPAs re-commit their own URL after load), failing the whole render.

Add `waitForReady` to @browserless/screenshot: a navigation-tolerant gate that
resolves once the page is visually quiet (document height stable, every image
decoded, readyState complete) held for `quietMs`, taking no screenshots. When
`page.evaluate` throws on a destroyed context it resets the quiet window and
keeps polling instead of failing.

prepare() now runs waitForReady first; real painted content (decoded images in a
document taller than the viewport) returns immediately, and only a page that
settles still-blank falls back to the original screenshot poll, preserving the
blank-SPA protection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(pdf): gate fast path on settle; harden readiness gate; simplify poll

Address PR #837 review:

- Fast path in `waitUntilAuto` now requires `!ready.timedOut`. A gate that
  timed out never settled, so its partial snapshot can't be trusted to skip
  the blank-SPA screenshot poll (Cursor Bugbot).
- `waitForReady` fails fast on a non-number `timeout` instead of computing a
  NaN deadline and silently returning `timedOut: true` (CodeRabbit).

Cleanups from /simplify:

- Reuse `node:timers/promises` `setTimeout` instead of a hand-rolled `sleep`.
- Collapse the standalone white-screen check into the poll loop's first
  iteration — it screenshotted with identical options and no page change in
  between, wasting a software-ra... (continued)

691 of 850 branches covered (81.29%)

Branch coverage included in aggregate %.

98 of 169 new or added lines in 2 files covered. (57.99%)

3669 of 4446 relevant lines covered (82.52%)

112701.11 hits per line

Uncovered Changes

Lines Coverage ∆ File
71
62.03
packages/screenshot/src/wait-for-ready.js
Jobs
ID Job ID Ran Files Coverage
1 @browserless/errors - 29433523371.1 15 Jul 2026 04:43PM UTC 1
99.32
GitHub Action Run
2 @browserless/lighthouse - 29433523371.2 15 Jul 2026 04:44PM UTC 3
97.83
GitHub Action Run
3 @browserless/screenshot - 29433523371.3 15 Jul 2026 04:43PM UTC 9
76.0
GitHub Action Run
4 @browserless/goto - 29433523371.4 15 Jul 2026 04:45PM UTC 3
75.71
GitHub Action Run
5 @browserless/function - 29433523371.5 15 Jul 2026 04:43PM UTC 3
97.0
GitHub Action Run
6 @browserless/devices - 29433523371.6 15 Jul 2026 04:43PM UTC 1
94.92
GitHub Action Run
7 @browserless/screencast - 29433523371.7 15 Jul 2026 04:43PM UTC 1
95.74
GitHub Action Run
8 @browserless/capture - 29433523371.8 15 Jul 2026 04:43PM UTC 11
86.63
GitHub Action Run
9 browserless - 29433523371.9 15 Jul 2026 04:44PM UTC 3
79.48
GitHub Action Run
Source Files on build 29433523371
  • Tree
  • List 35
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29433523371
  • b599f2ee on github
  • Prev Build on master (#29321620806)
  • Next Build on master (#29505076470)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc