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, ops follows its merge.
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
- 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: after merge
PR #45 waits for the merge session; ops refreshes within 10 min of it
Not done yet
- ops.bettter.us still runs widget 1.1.0: OperationalLayer PR #45 is open for the merge session (this repo's rule); ops picks it up within 10 minutes of the merge and was not checked live with 1.2.0.
- 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.
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).