Repository navigation
perf(marketing): cut flow-sprite keyframes so the home glide holds 60fps in WebKit - #1220
Merged
Merged
Conversation
…fps in WebKit useFlowMotion sampled every path each 4px, giving each of the home page's 50 sprites 83-603 keyframes. WebKit re-resolves them on every scroll frame, paused or not, so the Next-chapter glide rendered at ~5fps in Safari. simplifySamples keeps only the samples linear interpolation cannot reproduce (<=0.5px, <=1% opacity drift): 6-27 keyframes per sprite. Closes #1219 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
The marketing preview was removed because this PR is closed or merged. |
athvin
temporarily deployed
to
marketing-preview
November 25, 2026 09:25 — with
GitHub Actions
Inactive
This was referenced Nov 25, 2026
athvin
pushed a commit
that referenced
this pull request
Nov 27, 2026
…the unmerge, the rule holding Section 06 was an SVG diagram a visitor could only play. It never showed how to decide a close call or how to undo a merge, and its packets sampled 60 WAAPI keyframes each, which is the WebKit scroll-cost trap from #1220. It becomes a short film about Meridian Supply with two decisions the visitor makes. Each step is one the product verifiably takes: 1. The gray zone. The run's pairs settle onto the threshold scale, and three wait between 0.80 and 0.95. 2. Your call, on Salesforce ↔ API at 0.93. - Match writes an always-match rule, and the API card folds under the Salesforce card into E-1042. - Not a match writes a never-match rule, and the API record stays E-2077 (resolve_review in the er-cli drain). 3. Unmerge. A week later Meridian Supply Ltd (London) joins on its own at 0.99: it carries the parent's account number and orders@ mailbox. The visitor selects it and presses "Unmerge 1 selected". One never-match rule is written against a kept member, as unmerge_entity does, and the split lands with the reconcile job. 4. It holds. The next run scores both pairs the same, and the rules decide. The record's history fills in beside the window. - Playback. The film starts once 40% of it is on screen and waits at each decision. "Play it for me" makes the usual choices. Pause, Replay and a step rail are there too. - Timing. One WAAPI clock times each moment, so pausing, scrolling away and hiding the tab all hold it. - Fallbacks. Reduced motion and the page without JavaScript show step 4 as the poster, the whole story in one frame. - Layout. The four shots share one grid cell, so the window never changes height as it cuts. A container query gives phones their own layout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
pushed a commit
that referenced
this pull request
Nov 27, 2026
…the unmerge, the rule holding Section 06 was an SVG diagram a visitor could only play. It never showed how to decide a close call or how to undo a merge, and its packets sampled 60 WAAPI keyframes each, which is the WebKit scroll-cost trap from #1220. It becomes a short film about Meridian Supply with two decisions the visitor makes. Each step is one the product verifiably takes: 1. The gray zone. The run's pairs settle onto the threshold scale, and three wait between 0.80 and 0.95. 2. Your call, on Salesforce ↔ API at 0.93. - Match writes an always-match rule, and the API card folds under the Salesforce card into E-1042. - Not a match writes a never-match rule, and the API record stays E-2077 (resolve_review in the er-cli drain). 3. Unmerge. A week later Meridian Supply Ltd (London) joins on its own at 0.99: it carries the parent's account number and orders@ mailbox. The visitor selects it and presses "Unmerge 1 selected". One never-match rule is written against a kept member, as unmerge_entity does, and the split lands with the reconcile job. 4. It holds. The next run scores both pairs the same, and the rules decide. The record's history fills in beside the window. - Playback. The film starts once 40% of it is on screen and waits at each decision. "Play it for me" makes the usual choices. Pause, Replay and a step rail are there too. - Timing. One WAAPI clock times each moment, so pausing, scrolling away and hiding the tab all hold it. - Fallbacks. Reduced motion and the page without JavaScript show step 4 as the poster, the whole story in one frame. - Layout. The four shots share one grid cell, so the window never changes height as it cuts. A container query gives phones their own layout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
added a commit
that referenced
this pull request
Nov 27, 2026
… zone, unmerge, the rule holds (#1298) * wip: claim #1297 — home 06 interactive audit film * feat(marketing): home 06 — an interactive audit film: the gray zone, the unmerge, the rule holding Section 06 was an SVG diagram a visitor could only play. It never showed how to decide a close call or how to undo a merge, and its packets sampled 60 WAAPI keyframes each, which is the WebKit scroll-cost trap from #1220. It becomes a short film about Meridian Supply with two decisions the visitor makes. Each step is one the product verifiably takes: 1. The gray zone. The run's pairs settle onto the threshold scale, and three wait between 0.80 and 0.95. 2. Your call, on Salesforce ↔ API at 0.93. - Match writes an always-match rule, and the API card folds under the Salesforce card into E-1042. - Not a match writes a never-match rule, and the API record stays E-2077 (resolve_review in the er-cli drain). 3. Unmerge. A week later Meridian Supply Ltd (London) joins on its own at 0.99: it carries the parent's account number and orders@ mailbox. The visitor selects it and presses "Unmerge 1 selected". One never-match rule is written against a kept member, as unmerge_entity does, and the split lands with the reconcile job. 4. It holds. The next run scores both pairs the same, and the rules decide. The record's history fills in beside the window. - Playback. The film starts once 40% of it is on screen and waits at each decision. "Play it for me" makes the usual choices. Pause, Replay and a step rail are there too. - Timing. One WAAPI clock times each moment, so pausing, scrolling away and hiding the tab all hold it. - Fallbacks. Reduced motion and the page without JavaScript show step 4 as the poster, the whole story in one frame. - Layout. The four shots share one grid cell, so the window never changes height as it cuts. A container query gives phones their own layout. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(marketing): the audit film's model, island and specs; shots that never change the page's height - Unit (marketing-audit-model): the film's numbers agree with score.ts (0.93 in review, 0.99 over auto-join), and three pairs wait in the band. A match writes always and Not a match writes never. Unmerge needs a selection and writes exactly one never rule against a member that stays. Both branches hold on the next run. A jump fills in the usual choices. The narration never claims an automatic flag, and the records are fictional (Ofcom's drama range, .example mail). - Component: the server render is the poster with no dead controls, both branches can be driven through the rail, the AI recommendation is opt-in, and only the current shot is reachable. - Functional: the three audit specs are rewritten for the film. This is a deliberate behaviour change, because it now waits at a decision, so its clock test plays on with "Play it for me". A new marketing-scenes block covers starting when seen, waiting for the call, both branches, and one window height across every cut. That last spec failed first, on both phone profiles (87px). The record view and the next run drew some rows only in some states, and the same 87px broke the footer spec on WebKit through the status bar growing at hydration. - Every shot now draws one structure in every state. - The status line reserves its longest sentence: all of them sit in its cell, invisible. - The controls row reserves one button. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(marketing): the audit never moves the page under a reader, WebKit included The footer spec failed on mobile-safari: with the reader already parked at the foot of the page, hydration moved the scroll by 104px. The page height did not change, no script scrolled, and `overflow-anchor: none` did nothing. Bisecting with injected styles found two element swaps: - 56px from the step rail, where a <span> became a <button>; - 48px from the London row, where a <span> became a <label>. WebKit clamps a reader at the maximum scroll when an in-flow element is replaced. Pure insertions into reserved space did nothing. - The rail keeps its words, and a transparent button is laid over them once hydrated. - The row is a <label> from the server render on, and only its 18px box becomes the checkbox. - The film stays the still poster until it comes within a screen of the viewport, so it does not change state at hydration either. - The member list always keeps four slots, and the history card reserves both branches' full records, so no step changes the window's height on any phone (it varied by 56px). Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(marketing): the audit history's entries sit at the top of their reserved space The history card reserves the height of the longest full record. The real list shared that grid cell, stretched to it, and spread its entries down the card (a filmed desktop frame showed "YOU" floating far above its sentence). Each list now sits at the top at its own height. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(marketing): the audit film's poster baselines, and the CTA's on phones Regenerated in the pinned Linux image (mcr.microsoft.com/playwright:v1.63.0-jammy). - marketing-audit x3: the new poster, step 4 of the film. - marketing-cta, mobile-chrome and mobile-safari: the section moved up by a fraction of a pixel, because the audit section above it changed height. Its antialiasing shifts by a row (4.8-6.2% of pixels), over the comparison's 1% tolerance. The run also rewrote reviews-mobile-chrome and marketing-hero-mobile-chrome (two rows at the top, 0.24%). This diff does not explain either, so they are not committed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(marketing): on a phone the audit's call comes before its evidence Filmed in WebKit on the iPhone 15 profile (659px tall): with the stage at the top of the screen, Match and Not a match sat at the very bottom, under the floating next-chapter button. On narrow stages the score, its sentence and the decision now come first and the evidence bars follow as the reasons, so the call is on the first screen. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1219
What
useFlowMotionnow keeps only the keyframes linear interpolation cannot reproduce (new puresimplifySamples, ≤0.5px / ≤1% opacity drift). Sprites go from 83–603 keyframes to 6–27; the motion is unchanged.Why
The home page's Next-chapter glide ran at ~5fps in WebKit/Safari: WebKit re-resolves every keyframe of all 50 sprites on each scroll frame, even when they are paused. Chrome was unaffected, which is why Chrome profiles looked clean.
Proof
New unit test
tests/unit/flow-keyframes.test.tspasses, and it fails when simplification is disabled (seen failing). WebKit A/B of twobuild:previewexports is in Context.make frontendwas not run to completion locally; CI is the gate for this PR, at the owner's request.Risk & rollback
Visual only, and only on marketing flow animations. Worst case, a sprite drifts by ≤0.5px at a corner. Rollback:
git revert <merge-sha>.Post-merge ledger
Closed by: agent · session
Claude Code:a6b4a198-683e-4e70-ad0b-986e4470df62onbrians-MacBook-Pro· 2026-11-25T09:41:17Zmainis green with this change on it — merge 53e2192; rust/frontend/infra/devcontainer/images all success on 53e2192imagesbuilt — er-web from 53e2192 →sha256:d8b2fa3b…(run 45585261937); er-api correctly skippeddeployconverged — the 53e2192 deploy failed on a pre-existing digest-pagination bug (deploy-resolve-digests: --output text paginates the reuse query, so a reused digest is two lines and the deploy fails #1223), fixed by fix(ci): resolve a reused image digest from all pages, and refuse anything but one (#1223) #1224. Its deploy (run 45586659977) rolled er-webd8b2fa3b…to dev + prod. Proved live: dupezero.com serves 6–26 keyframes per sprite (was 83–603)webkit-keyframe-count-scroll-jankSpecific to this change
Context — plan, discoveries, measurements, files
Plan
Discoveries
Measurements
Playwright WebKit, DPR 2, 1512×860; frames recorded by an in-page rAF loop.
Chromium on the same build: 60fps locked before and after.
Bisect on live dupezero.com: hiding
.story-wiressprites alone restored 60fps. Pausing or cancelling animations, removingwill-change,contain: strict, hiding SVGs or whole sections did not. Decimating keyframes did, which pinned the cause as keyframe count.Files
frontend/src/components/marketing/demo/flow-keyframes.ts(new)frontend/src/components/marketing/demo/flow-motion.tsxfrontend/tests/unit/flow-keyframes.test.ts(new)🤖 Generated with Claude Code