Echo thumbnails fade in via timeout, not rAF
Deploy / deploy (push) Successful in 1m5s

The 'shown' class only needs a later tick for the opacity transition
to run - requestAnimationFrame never fires in headless engines
(caught in hwatu verification), and a timeout is equivalent in real
browsers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-08-23 13:16:53 +02:00
co-authored by Claude Fable 5
parent 0221253cba
commit 0def91f8ab
+4 -1
View File
@@ -254,7 +254,10 @@ class GestureWidget {
const ctx = thumb.getContext('2d');
ctx.scale(dpr, dpr);
this.drawPath(ctx, msg.path, rect.width, rect.height, this.theme().echo, 1.5, 0.15);
requestAnimationFrame(() => thumb.classList.add('shown'));
// A timeout, not requestAnimationFrame: the class must land on
// a later tick for the opacity transition to run, and rAF
// doesn't tick at all in headless engines.
setTimeout(() => thumb.classList.add('shown'), 30);
}
// ── Rendering ──────────────────────────────────────────────────