Taking the screenshot can no longer block feedback
The feedback widget's screenshot now has Cancel, Escape and an 8-second limit, and pages that froze or lost their screenshot get one in under 4 seconds; live on the lab and on ops, both checked in a real browser.
Seconds until the feedback card opens, widget 1.2.0 (labels: what 1.1.0 did on the same page)
What people see
Before (1.1.0)
- "Taking a screenshot…" can stay forever (Vlada, 12 Nov)
- No Cancel; Escape does nothing
- The page's sticky header stays shifted while it waits
- One bad picture: the item goes without a screenshot
Now (1.2.0)
- Cancel or Escape at any moment: write without a screenshot
- After 8 s the card opens anyway; everything else is sent
- The page is always put back as it was
- A picture that does not arrive is grey; "Try again" keeps the text
Before: still taking a screenshot after 30 seconds

Now: Cancel and Esc are on the veil

Live on the lab: the card with its screenshot

Without a screenshot: the reason, and Try again

The 2,000-card page scrolled to 20,000 px (seconds)
The screenshot still matches the page

Where it is
- Widget 1.2.0
OperationalLayer PR #45: the fix, tests, demo, contract field; merged 13 Nov 01:44 UTC
- Lab merged
Lab PRs #35 and #36 merged into the lab's main
- Lab live
Deployed 13 Nov 00:06 UTC from main a9497db; checked in a real browser
- Ops live
Deployed 13 Nov 01:51 UTC from main 19bb872 by ops's own refresh; checked in a real browser
Not done yet
- On ops, the three design pictures that the lab's site shows on the Activity page come out grey in the screenshot: the lab's site does not let other sites read its pictures (no CORS header), so no browser can copy them. The inbox labels them "did not load in time", which is not the real reason.
- On the ops Activity page (about 2,400 elements) the page pauses for about 1.5 to 1.7 s while the screenshot copy is made; the card still opens in 2.7 s.
- The platform (Upcycle-Studio) has its own copy of the widget; its session (9f1ff34421) is fixing it with the same behaviour, not released yet.
- On the lab, a browser that loaded the page in the last hours may keep 1.1.0 for up to about 1.5 h (the lab sends no cache header for the widget file); ops sends no-cache.
Why it froze
- The screenshot is drawn from the page itself by html-to-image. It fetched every picture again, full size, off-screen ones too, with no time limit: one picture that never answered kept "Taking a screenshot…" up for good, and its open requests used up the site's six connections.
- One picture that was not a picture (an error page, a broken file) cost the whole screenshot.
- On long pages it copied every element with about 470 styles each, in one go: the page froze for seconds.
- Nothing could stop it: no Cancel, no Escape, no limit; the sticky header stayed shifted until it ended.
- The 1×1 grey placeholder both widgets carried was itself a broken PNG (found by the platform session).
What the widget does now
- An 8-second limit (screenshotTimeout), Cancel and Escape; the page is put back however it ends; picture requests stop with it.
- Pictures the page shows are drawn from the page at the size shown; another site's are fetched with 3 s each (at most 12 MB, six at a time) and shrunk; off-screen ones are never fetched; anything that fails is grey.
- Boxes entirely off-screen are copied without their contents (same size, nothing moves).
- Each item says what happened to its screenshot (context.screenshot: attached, left out, timeout, cancelled or failed, the time, pictures missing); the inbox shows it. Additive v1 contract field.
Checks run
- node --test shared/feedback-widget/test/capture.test.js: 9 passed (time limit, Cancel, failure, picture paths, 12 MB cap, valid placeholder, cut-off copy). Breaking the restore, the timer or the abort makes them fail.
- python3 -m unittest discover -s opsdash/tests: 65 passed; docs/contracts/check.py: 0 problems.
- Lab: 18-23 widget tests passed; the full lab suite fails the same 3 tests and 2 errors on main with and without the change (missing local data and pins).
- Browser (local Chrome, browser-use): eight demo pages before and after; timeout, Cancel, Escape, Send and Try again; a stress page compared with 1.1.0 pixel by pixel.
- Lab rebuild compared with the live site before deploying: of 1,567 files only the build stamp, the build time and the two widget files differed.
- Ops live (13 Nov 01:52 UTC, local Chrome): it serves exactly the 1.2.0 files on main (the same hashes as the lab) behind its login; the screenshot was attached in 2.7 s, Escape opened the card with "No screenshot: you skipped it", and Send stored the item with its screenshot. The check item was deleted at 01:53 UTC (store backed up first); the ops inbox is empty again.
- The ops deploy first waited on another project's status page: since 01:10 UTC an apostrophe in its header stopped every ops refresh. Its session fixed it at 01:46 UTC, and the 01:50 refresh deployed this release.
New feedback from people (checked 13 Nov 00:07 UTC)
- Ops inbox: none.
- Adapter: Elena Hordiienko left 32 items on 12 Nov (23 blazers on v1.6.21, 9 trousers), still new; the Adapter session (1505d1af9f) was told.
- Platform: one new question (12 Nov 13:11 UTC) about the test preselection spreadsheet.
- Lab: Catarina's notes tb-0073 to tb-0103 are being integrated by the lab session (416b42ca30).