Skip to content

An agent skill for building premium, immersive, scroll-driven websites. Works with Codex, Claude Code, and other coding agents. Also available as a Claude Code plugin.

fix: iOS scrub-clip priming, plus a real-device diagnostic page

Nate Herke95798551874
diff --git a/plugins/nateherk-design/skills/scrollcraft/CHANGELOG.md b/plugins/nateherk-design/skills/scrollcraft/CHANGELOG.md
index 5278f61..929b9a9 100644
--- a/plugins/nateherk-design/skills/scrollcraft/CHANGELOG.md
+++ b/plugins/nateherk-design/skills/scrollcraft/CHANGELOG.md
@@ -4,6 +4,46 @@ Dated notes on what changed in the skill and which build's finding drove it.
Builds live in `OtherWorlds/Ultimate Websites/builds/`; each carries a
`BUILD-REPORT.md`.
+## 2026-08-23: iOS clip priming hardened; real-device diagnostic added
+
+Driven by a build whose hero clip sat frozen on the owner's actual iPhone
+through four rounds of fixes while every headless probe reported it scrubbing.
+The working clip further down the same page was the clue; the only difference
+between them was being first.
+
+**Engine, `engine/scrollcraft.js`**
+
+- Each clip is primed at `loadedmetadata`, not only on a later gesture. A
+ muted inline `play()` needs no activation outside Low Power Mode; where it
+ is rejected, gesture listeners retry per clip until every clip is primed.
+ (The previous one-shot first-touch prime lost a race: the reader touches to
+ scroll while the hero is still downloading, and the shot was spent on a
+ sourceless element.)
+- `touchend` and `click` joined the prime listeners. The HTML spec's
+ activation-triggering events include `touchend` but not `touchstart`, so a
+ Low Power Mode phone gets a valid attempt when the finger lifts.
+- The priming flag releases on a 2s timer. iOS may leave a `play()` promise
+ pending forever, which jammed the retry permanently.
+- A seek stuck past 700ms is re-issued. `tick()` skips a clip while
+ `el.seeking` is true, so one hung seek froze that clip for the life of the
+ page through the guard meant to protect it.
+- The poster reveal fires on a 2.5s timeout as well as on `seeked`, so a clip
+ whose `seeked` never arrives cannot stay invisible forever.
+- `muted` and `playsInline` are set as properties at load time, not only as
+ attributes; iOS treats the two differently.
+
+**Docs and references**
+
+- `references/verify.md`: new sections "The phone is a different machine"
+ (what headless cannot see, what the engine now handles on iOS), "Ship the
+ diagnostic with the site", and "Ask what differs before asking what's
+ broken", plus three failure-table rows. Mobile named a first-class target.
+- `references/device-diag.html`: standalone real-device scrub diagnostic.
+ Suspect clip loaded two ways beside a known-good clip, MOVING / FROZEN
+ verdict per pane, prime results and distinct-frame counts on screen. Edit
+ its TESTS array and deploy beside the site on the first mobile report.
+- `SKILL.md` Step 5 now states the real-device gap explicitly.
+
## 2026-08-22: bespoke fixed-stage verification state
Driven by the owner's cold-scroll finding on PHASE: "Nothing happens when I
diff --git a/plugins/nateherk-design/skills/scrollcraft/SKILL.md b/plugins/nateherk-design/skills/scrollcraft/SKILL.md
index fb51a56..6125cf1 100644
--- a/plugins/nateherk-design/skills/scrollcraft/SKILL.md
+++ b/plugins/nateherk-design/skills/scrollcraft/SKILL.md
@@ -354,6 +354,17 @@ wrong, not the brief. Confirm on the sheet that the peak is the largest visual
change and holds the most scroll room, and that the last screen resolves instead
of fading to nothing.
+**And say what a green run does not cover: a real phone.** Headless Chrome
+cannot reproduce an iPhone's video decoder, autoplay policy, Low Power Mode,
+or touch scrolling; a build once shipped four green rounds while the hero clip
+sat frozen on the actual device. Mobile is a first-class target throughout,
+not a pass at the end: portrait phone clips, touch-tuned lerp, grown tap
+targets are all authored (see assets.md and verify.md). When any mobile defect
+is reported, deploy `references/device-diag.html` beside the site on the
+**first** round and let the device answer, rather than theorising from a
+machine that cannot reproduce the failure. The full iOS clip-lifecycle notes
+live in verify.md, "The phone is a different machine".
+
Fix what you found and shoot it again. Report what you actually verified and
what you did not.
diff --git a/plugins/nateherk-design/skills/scrollcraft/engine/scrollcraft.js b/plugins/nateherk-design/skills/scrollcraft/engine/scrollcraft.js
index d55e5ef..9612e60 100644
--- a/plugins/nateherk-design/skills/scrollcraft/engine/scrollcraft.js
+++ b/plugins/nateherk-design/skills/scrollcraft/engine/scrollcraft.js
@@ -304,7 +304,7 @@
var rec = {
el: v, host: host || v,
ready: false, loading: false, painted: false,
- cur: 0, target: 0, live: false,
+ cur: 0, target: 0, live: false, stuckAt: 0,
lerp: lerpRate(v) || LERP
};
v.muted = true; v.playsInline = true; v.preload = 'none';
@@ -602,16 +602,34 @@
// replace its poster until the reader scrolled it off zero.
try { V.el.currentTime = Math.max(V.target * (V.el.duration || 1), 0.001); } catch (e) {}
read();
+ // Prime the decoder the moment the clip can be primed, without
+ // waiting for a gesture. A muted inline play() is allowed with no
+ // user activation on every platform except a restricted one (Low
+ // Power Mode, data saver), and there the rejection is harmless: the
+ // gesture listeners below retry on the next real touch.
+ primeClip(V);
});
// Reveal only once a real frame has painted. iOS keeps a seeked-but-
// never-played muted video blank, so hiding the poster on metadata
// alone flashes an empty stage.
- V.el.addEventListener('seeked', function () {
+ var reveal = function () {
+ if (V.painted) return;
V.painted = true;
V.host.classList.add('sc-has-clip');
V.el.classList.add('sc-has-clip');
- }, { once: true });
+ };
+ V.el.addEventListener('seeked', reveal, { once: true });
+ // Never let visibility depend only on an event that may not arrive.
+ // On iOS a clip that has not been played can accept a seek and never
+ // fire 'seeked', which leaves the element at opacity 0 for the life of
+ // the page: the poster stays up, the act looks frozen, and every later
+ // act is fine because by then the reader has touched the screen and
+ // the decoder is live. Reveal on a timer as well. A stage that is
+ // briefly blank is a smaller fault than one that never shows its clip.
+ setTimeout(reveal, 2500);
V.el.preload = 'auto';
+ V.el.muted = true; // as a property, not only an attribute
+ V.el.playsInline = true;
V.el.src = URL.createObjectURL(blob);
})
.catch(function () { V.loading = false; });
@@ -938,7 +956,19 @@
if (!V.ready) continue;
// Never queue a seek while the decoder is still resolving the last one.
// On a phone a fast flick otherwise piles seeks up and freezes the clip.
- if (V.el.seeking) continue;
+ // But a seek that never completes would freeze the clip for the life of
+ // the page through this very guard, so a seek stuck past 700ms is
+ // re-issued rather than waited on forever.
+ if (V.el.seeking) {
+ var nw = performance.now();
+ if (!V.stuckAt) V.stuckAt = nw;
+ else if (nw - V.stuckAt > 700) {
+ V.stuckAt = nw;
+ try { V.el.currentTime = V.el.currentTime + 0.001; } catch (e) {}
+ }
+ continue;
+ }
+ V.stuckAt = 0;
// An offscreen clip that has already arrived stops costing anything.
if (!V.live && Math.abs(V.cur - V.target) < 0.002) continue;
V.cur += (V.target - V.cur) * (reduce ? 1 : V.lerp);
@@ -950,22 +980,71 @@
}
// iOS will not paint a muted video that has never been handed a user
- // gesture, so a clip can be loaded, seeked and still show nothing. One
- // play-pause on the first touch unlocks every clip on the page at once.
- var primed = false;
- function prime() {
- if (primed) return;
- primed = true;
- playheads.forEach(function (V) {
+ // gesture, so a clip can be loaded, seeked and still show nothing.
+ //
+ // This used to fire once, on the first touch, across every playhead. That
+ // loses a race it cannot win. The first act's clip is still being fetched
+ // when the reader's first touch arrives (they touch the screen in order to
+ // scroll, and the clip is megabytes) so play() is called on a video with
+ // no source, does nothing, and the one shot is spent. Every later act loads
+ // long after that touch, with user activation already granted, and works
+ // without ever needing this. That is the exact shape of the bug: the hero
+ // frozen, everything below it fine.
+ //
+ // So: keep listening, prime each clip once it actually has a source, and
+ // stop only when they are all done. And force a seek afterwards, because a
+ // primed decoder still shows the stale frame until something asks it for a
+ // different time, and the deadband in tick() will not ask if the playhead is
+ // already where it should be.
+ var primedCount = 0;
+ function primeClip(V) {
+ // priming guards the retry: play() is a promise, and calling it again
+ // while the last one is unsettled produces "interrupted by pause" and can
+ // leave the element playing.
+ if (V.primed || V.priming || !V.el.src) return;
+ V.priming = true;
+ var done = function () {
+ V.priming = false;
+ if (!V.primed) { V.primed = true; primedCount++; }
+ try { V.el.pause(); } catch (e) {}
+ // repaint: nudge past the deadband so the next tick writes for real
try {
- var pr = V.el.play();
- if (pr && pr.then) pr.then(function () { V.el.pause(); }, function () {});
- else V.el.pause();
+ var dur = V.el.duration || 1;
+ V.cur = clamp(V.cur, 0, 0.999);
+ V.el.currentTime = clamp(V.cur * dur + 0.05, 0, dur * 0.999);
} catch (e) {}
- });
+ };
+ var fail = function () { V.priming = false; };
+ // A play() promise is allowed to stay pending forever (iOS does this to a
+ // video it has decided not to start). If that happened here, `priming`
+ // would jam and no gesture could ever retry, so the flag is released on a
+ // timer as well. A late resolution after the release still lands in
+ // done(), which is idempotent.
+ setTimeout(function () { if (V.priming) fail(); }, 2000);
+ var pr;
+ try { pr = V.el.play(); } catch (e) { fail(); return; }
+ if (pr && pr.then) pr.then(done, fail);
+ else done();
+ }
+ function prime() {
+ for (var i = 0; i < playheads.length; i++) primeClip(playheads[i]);
+ if (playheads.length && primedCount >= playheads.length) {
+ removeEventListener('touchstart', prime);
+ removeEventListener('touchend', prime);
+ removeEventListener('pointerdown', prime);
+ removeEventListener('click', prime);
+ removeEventListener('scroll', prime);
+ }
}
- addEventListener('touchstart', prime, { passive: true, once: true });
- addEventListener('pointerdown', prime, { passive: true, once: true });
+ // touchend and click are here because the HTML spec's list of activation-
+ // triggering events includes touchend but NOT touchstart. A restricted
+ // device (Low Power Mode) that rejects the touchstart prime for lacking
+ // activation gets a second, valid chance the moment the finger lifts.
+ addEventListener('touchstart', prime, { passive: true });
+ addEventListener('touchend', prime, { passive: true });
+ addEventListener('pointerdown', prime, { passive: true });
+ addEventListener('click', prime, { passive: true });
+ addEventListener('scroll', prime, { passive: true });
// ---- pointer devices --------------------------------------------------
var tilts = [], magnets = [], spots = [];
diff --git a/plugins/nateherk-design/skills/scrollcraft/references/device-diag.html b/plugins/nateherk-design/skills/scrollcraft/references/device-diag.html
new file mode 100644
index 0000000..ead92bb
--- /dev/null
+++ b/plugins/nateherk-design/skills/scrollcraft/references/device-diag.html
@@ -0,0 +1,214 @@
+<!doctype html>
+<!--
+ device-diag: real-device scrub diagnostic for scrollcraft builds.
+
+ Headless verification cannot reproduce a phone's video decoder, autoplay
+ policy, Low Power Mode, or touch scrolling. When a clip is reported frozen
+ on a real device, deploy this page beside the site (same origin as the
+ clips), open it on the device, scroll up and down a few times, and read the
+ verdicts. One screenshot isolates the failing layer:
+
+ suspect-blob FROZEN, suspect-direct MOVING -> the blob: URL path is the problem
+ suspect FROZEN, known-good MOVING -> something specific to that clip's lifecycle
+ all MOVING -> the video is fine; the fault is in the
+ engine's reveal/tick path on the real page
+ all FROZEN -> the device refuses scrub decode; use the
+ poster fallback for that act
+
+ To use: edit the TESTS array below. Point the first two entries at the
+ suspect clip (same file, loaded two ways) and the third at a clip known to
+ work on the device. Paths resolve against this page's URL.
+
+ Scrubbing is driven by a rAF poll of scrollY, not scroll events, because a
+ driven browser can move the page without firing them.
+-->
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="robots" content="noindex, nofollow">
+<title>scrub diagnostic</title>
+<style>
+ * { margin: 0; box-sizing: border-box; }
+ html { background: #0b0f14; color: #e8edf2; font: 13px/1.45 ui-monospace, Menlo, Consolas, monospace; }
+ body { height: 520vh; }
+ .panel { position: fixed; inset: 0; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
+ h1 { font-size: 14px; font-weight: 600; }
+ .hint { color: #8fa0b3; }
+ .row { display: flex; gap: 8px; flex: 0 0 auto; }
+ .cell { flex: 1 1 0; min-width: 0; }
+ .cell video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; display: block; border: 1px solid #26303c; border-radius: 6px; }
+ .name { font-weight: 600; margin: 6px 0 2px; }
+ .verdict { font-size: 15px; font-weight: 700; padding: 2px 6px; border-radius: 4px; display: inline-block; }
+ .wait { background: #26303c; }
+ .ok { background: #0f5132; color: #b6f0cd; }
+ .bad { background: #6b1220; color: #ffc2cd; }
+ .stats { color: #aab7c4; font-size: 11.5px; white-space: pre-line; }
+ #meta { color: #8fa0b3; font-size: 11.5px; }
+ #log { flex: 1 1 auto; overflow: auto; background: #10161d; border: 1px solid #26303c; border-radius: 6px; padding: 8px; font-size: 11px; color: #9fb4c8; white-space: pre-wrap; }
+</style>
+</head>
+<body>
+<div class="panel">
+ <h1>scrub diagnostic — SCROLL UP AND DOWN A FEW TIMES, then read the verdicts</h1>
+ <div class="hint">A: suspect clip, blob URL (how the engine loads it) &nbsp; B: suspect clip, direct file &nbsp; C: a clip that works on this device, blob URL</div>
+ <div class="row" id="cells"></div>
+ <div id="meta"></div>
+ <div id="log"></div>
+</div>
+<script>
+(function () {
+ 'use strict';
+
+ // EDIT THESE for the build under test.
+ var SUSPECT = 'assets/01-suspect-m.mp4';
+ var KNOWN_GOOD = 'assets/02-known-good-m.mp4';
+ var TESTS = [
+ { key: 'A', label: 'A suspect blob', src: SUSPECT, mode: 'blob' },
+ { key: 'B', label: 'B suspect direct', src: SUSPECT, mode: 'direct' },
+ { key: 'C', label: 'C known-good blob', src: KNOWN_GOOD, mode: 'blob' }
+ ];
+
+ var logEl = document.getElementById('log');
+ function log(m) {
+ logEl.textContent += m + '\n';
+ logEl.scrollTop = logEl.scrollHeight;
+ }
+ window.addEventListener('error', function (e) { log('JS ERROR: ' + e.message); });
+
+ var maxScrolled = 0;
+ var cellsEl = document.getElementById('cells');
+ var canvas = document.createElement('canvas');
+ canvas.width = 16; canvas.height = 16;
+ var ctx = canvas.getContext('2d', { willReadFrequently: true });
+
+ function make(t) {
+ var cell = document.createElement('div');
+ cell.className = 'cell';
+ cell.innerHTML = '<div class="name">' + t.label + '</div>' +
+ '<span class="verdict wait" id="v' + t.key + '">…</span>' +
+ '<video muted playsinline preload="auto" id="el' + t.key + '"></video>' +
+ '<div class="stats" id="s' + t.key + '"></div>';
+ cellsEl.appendChild(cell);
+
+ var T = {
+ key: t.key, el: cell.querySelector('video'),
+ verdict: cell.querySelector('.verdict'),
+ stats: cell.querySelector('.stats'),
+ seeked: 0, hashes: {}, hashCount: 0, prime: 'not tried',
+ primed: false, priming: false, err: ''
+ };
+ T.el.muted = true; T.el.playsInline = true;
+
+ T.el.addEventListener('seeked', function () { T.seeked++; });
+ T.el.addEventListener('error', function () {
+ var e = T.el.error;
+ T.err = 'MediaError code ' + (e ? e.code : '?');
+ log(t.key + ': ' + T.err);
+ });
+ T.el.addEventListener('loadedmetadata', function () {
+ log(t.key + ': metadata, duration ' + T.el.duration.toFixed(2) + 's');
+ try { T.el.currentTime = 0.001; } catch (e) {}
+ prime(T, 'load'); // same as the engine: try with no gesture first
+ });
+
+ if (t.mode === 'blob') {
+ fetch(t.src)
+ .then(function (r) { if (!r.ok) throw new Error('HTTP ' + r.status); return r.blob(); })
+ .then(function (b) {
+ log(t.key + ': fetched ' + (b.size / 1048576).toFixed(2) + ' MB, blob URL set');
+ T.el.src = URL.createObjectURL(b);
+ })
+ .catch(function (e) { T.err = 'fetch failed: ' + e.message; log(t.key + ': ' + T.err); });
+ } else {
+ T.el.src = t.src;
+ log(t.key + ': direct src set');
+ }
+ return T;
+ }
+
+ function prime(T, why) {
+ if (T.primed || T.priming || !T.el.src) return;
+ T.priming = true;
+ var pr;
+ try { pr = T.el.play(); } catch (e) { T.priming = false; T.prime = 'threw (' + why + ')'; return; }
+ setTimeout(function () {
+ if (T.priming) { T.priming = false; if (T.prime === 'not tried') T.prime = 'play() never settled (' + why + ')'; }
+ }, 2000);
+ if (pr && pr.then) {
+ pr.then(function () {
+ T.priming = false; T.primed = true; T.prime = 'OK (' + why + ')';
+ try { T.el.pause(); } catch (e) {}
+ log(T.key + ': primed via ' + why);
+ }, function (e) {
+ T.priming = false; T.prime = (e && e.name ? e.name : 'rejected') + ' (' + why + ')';
+ log(T.key + ': play() rejected via ' + why + ': ' + (e && e.name));
+ });
+ } else { T.priming = false; T.primed = true; T.prime = 'OK sync (' + why + ')'; try { T.el.pause(); } catch (e) {} }
+ }
+
+ var tests = TESTS.map(make);
+
+ function primeAll(ev) { tests.forEach(function (T) { prime(T, ev); }); }
+ ['touchstart', 'touchend', 'pointerdown', 'click', 'scroll'].forEach(function (ev) {
+ addEventListener(ev, function () { primeAll(ev); }, { passive: true });
+ });
+
+ // scroll position drives every clip, exactly like the engine. Polled from a
+ // rAF loop rather than a scroll listener, so the diagnostic cannot be blinded
+ // by an environment that moves the page without firing scroll events.
+ var lastY = -1, lastPrimeTry = 0;
+ function loop() {
+ var maxY = document.body.scrollHeight - innerHeight;
+ var p = maxY > 0 ? Math.max(0, Math.min(1, scrollY / maxY)) : 0;
+ if (scrollY !== lastY) {
+ if (lastY !== -1 && performance.now() - lastPrimeTry > 600) {
+ lastPrimeTry = performance.now();
+ primeAll('scrollmove');
+ }
+ lastY = scrollY;
+ maxScrolled = Math.max(maxScrolled, p);
+ }
+ tests.forEach(function (T) {
+ if (!T.el.duration || T.el.seeking) return;
+ var t = p * T.el.duration * 0.98;
+ if (Math.abs(T.el.currentTime - t) > 0.02) {
+ try { T.el.currentTime = t; } catch (e) {}
+ }
+ });
+ requestAnimationFrame(loop);
+ }
+ requestAnimationFrame(loop);
+
+ function frameHash(T) {
+ if (T.el.readyState < 2) return null;
+ try {
+ ctx.drawImage(T.el, 0, 0, 16, 16);
+ var d = ctx.getImageData(0, 0, 16, 16).data, h = 0;
+ for (var i = 0; i < d.length; i += 7) h = (h * 31 + d[i]) >>> 0;
+ return h;
+ } catch (e) { return null; }
+ }
+
+ setInterval(function () {
+ tests.forEach(function (T) {
+ var h = frameHash(T);
+ if (h !== null && !T.hashes[h]) { T.hashes[h] = 1; T.hashCount++; }
+ T.stats.textContent =
+ 'prime: ' + T.prime +
+ '\nreadyState ' + T.el.readyState + ' · seeks done ' + T.seeked +
+ '\ntime ' + T.el.currentTime.toFixed(2) + 's · frames seen ' + T.hashCount +
+ (T.err ? '\n' + T.err : '');
+ if (T.hashCount >= 3) { T.verdict.textContent = 'MOVING'; T.verdict.className = 'verdict ok'; }
+ else if (T.err) { T.verdict.textContent = 'ERROR'; T.verdict.className = 'verdict bad'; }
+ else if (maxScrolled > 0.35) { T.verdict.textContent = 'FROZEN'; T.verdict.className = 'verdict bad'; }
+ });
+ }, 250);
+
+ document.getElementById('meta').textContent =
+ navigator.userAgent + ' · ' + innerWidth + 'x' + innerHeight +
+ ' · dpr ' + devicePixelRatio;
+})();
+</script>
+</body>
+</html>
diff --git a/plugins/nateherk-design/skills/scrollcraft/references/verify.md b/plugins/nateherk-design/skills/scrollcraft/references/verify.md
index 49b805a..afa9e76 100644
--- a/plugins/nateherk-design/skills/scrollcraft/references/verify.md
+++ b/plugins/nateherk-design/skills/scrollcraft/references/verify.md
@@ -229,7 +229,64 @@ only a ledger read with a single consumer settles it.
Copy reflows and does not collide with the fixed bar. Confirm the phone encodes
actually load. Check the portrait crop of every clip: a 16:9 move composed
around left-hand negative space loses exactly that space at 9:16
-(see [assets.md](assets.md)).
+(see [assets.md](assets.md)). Mobile is a first-class target, not a check at
+the end: the phone clips are cut portrait, the lerp is retuned for touch, tap
+targets are grown, and every one of those is authored, not inherited.
+
+### The phone is a different machine
+
+Headless Chrome on the build box cannot reproduce an iPhone's video decoder,
+its autoplay policy, Low Power Mode, or touch scrolling. On one build every
+probe reported the hero clip scrubbing perfectly for **four consecutive
+rounds while the real phone showed a frozen frame**. A green harness run says
+the page is correct where the harness runs. It says nothing about iOS video.
+
+What iOS does to a scrub clip, and what the engine now handles for you:
+
+- iOS will not *paint* a muted video that has never been played. Seeks land,
+ `seeked` fires, and the picture stays on one frame. The decoder has to be
+ primed with one `play()`/`pause()`.
+- The engine primes each clip at `loadedmetadata` (a muted inline `play()`
+ needs no gesture outside Low Power Mode) and retries on `touchstart`,
+ `touchend`, `pointerdown`, `click` and `scroll`. `touchend` matters: the
+ HTML spec's activation-triggering events include `touchend` but **not**
+ `touchstart`, so a Low Power Mode phone that rejects the touchstart attempt
+ gets a valid one when the finger lifts.
+- A prime must be re-attemptable per clip. A one-shot prime on first touch
+ loses a race: the reader touches to scroll within the first second, while
+ the hero's megabytes are still downloading, and the shot is spent on a
+ sourceless element. The tell is exactly "the first clip is frozen and every
+ later one works".
+- iOS may leave a `play()` promise pending forever, and may leave `seeking`
+ true forever. Both were permanent silent freezes; the engine now releases
+ the priming flag on a timer and re-issues any seek stuck past 700ms. The
+ reveal also fires on a 2.5s timeout, never only on `seeked`.
+
+Do not re-implement any of that in page JS, and do not strip it when copying
+the engine. If a phone still shows a frozen clip, the cause is past what this
+machine can measure, which is what the next section is for.
+
+### Ship the diagnostic with the site
+
+You get one question per round with a real device, so make the round count.
+`references/device-diag.html` is a standalone page that scrubs the suspect
+clip two ways (blob URL, exactly as the engine loads it, and direct file src)
+beside a known-good clip, prints a MOVING / FROZEN verdict over each pane,
+and reports prime results, seek counts and distinct painted frames. Edit its
+`TESTS` array to point at the build's own clips, deploy it next to the site,
+and one screenshot from the phone isolates the layer: blob loading, the file,
+the device's decode policy, or the engine's lifecycle. Deploy it **with** the
+first mobile fix, not after the fourth.
+
+### Ask what differs before asking what's broken
+
+The debugging lesson that cost three wasted rounds: "desktop works, the phone
+does not" reads as a platform difference and invites platform theories
+(codecs, keyframes, resolution). **"One clip works and another does not, on
+the same device"** cannot be a platform difference. Before theorising, write
+down every way the working case differs from the broken one; the bug lives in
+that list. On the build above the list had one entry: the hero is first, so
+it loads while the first touch is being spent.
**Keyboard.** Tab through. Focus order matches visual order, the focus ring is
visible against every ground it crosses, and nothing reachable is parked at
@@ -293,6 +350,9 @@ until it was measured.
| Every cue and reveal in a quiet act snapping 0 to 1 | A pinned act at `data-sc-span` ≤ 1, which is one pixel of travel. Minimum useful pinned span is ~1.2 |
| A clip that scrubs beautifully, stops, and then slides up the page as a still photograph | The clip was mapped to the act's pinned travel, which is 0 through the entire entry slide and 1 through the entire exit slide. The engine now maps clip time across the stage's whole visible life by default. See devices.md §1 |
| A custom fixed stage passing while its first screens do nothing | The page used `flow` markers, which are intentionally excluded from ordinary dead-scroll checks, but published no `data-sc-verify-state`. Report the actual rendered state and declare only genuine resolved holds |
+| The hero clip frozen on a real iPhone, later clips fine, every probe green | iOS never paints an unplayed muted video, and the one-shot gesture prime was spent while the hero was still downloading. The engine now primes per clip at `loadedmetadata` and retries on every gesture, including `touchend` |
+| A phone clip soft and stuttering while the same file is smooth on desktop | A landscape mobile encode in a portrait viewport: cover-fit decoded the full frame and threw three quarters of it away. Cut the phone clips portrait from the masters (see assets.md) |
+| Four rounds of mobile fixes verified green, phone still broken | Headless Chrome cannot reproduce the iOS decoder, Low Power Mode, or touch. Deploy `references/device-diag.html` beside the site on the first mobile report and let the phone answer |
The first three are invisible to every check except looking at rendered output.
That is the argument for this whole pass.