Skip to content

feat(marketing): scroll-scrubbed scene primitive, record marks and cross-page view transitions (#1254) - #1265

Merged
athvin merged 3 commits into
mainfrom
issue/1254-marketing-scenes-foundation
Nov 26, 2026
Merged

athvin merged 3 commits into
mainfrom
issue/1254-marketing-scenes-foundation

Conversation

@athvin

@athvin athvin commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Closes #1254

🚧 Claimed by an agent session — 2026-11-26T18:54:24Z, session Claude Code:30a1182e-8c7e-47e3-92ac-cda64c13fcfc on brians-MacBook-Pro.
The claim is this open draft PR: closing it releases the ticket.

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

The foundation for the cinematic marketing epic (#1253), with no visible page change yet beyond the cut between pages:

  • ScrollScene (components/marketing/scene/): a sticky stage scrubbed by the reader's own scroll position through CSS view timelines. It ships no script, intercepts no input and does not snap. Its unconditioned styles are a static poster layout; pinning and scrubbing only switch on under prefers-reduced-motion: no-preference with view-timeline support.
  • Meridian Supply in one place. meridian.ts holds the records, golden record and evidence, and score.ts holds the one Fellegi–Sunter helper every printed score comes from. RecordCard, EvidenceBar and GoldenCard are the marks every scene draws with.
  • Page cuts. Marketing pages cut into each other through React 19.3's <ViewTransition> (cut.tsx), and reduced motion makes the cut instant.
  • CHAPTERS moves to a React-free chapters.ts, and a spec now holds it to the page. The skill claimed this was enforced; nothing enforced it.

Why

Every page except home is static prose. The scenes that follow (#1255 onward) need one primitive, one dataset and one grammar, so a number or a shape on one page cannot contradict another.

Proof

Run locally on this branch (before the rebase onto de8687b9, which touched only the API schema and the docs spec):

  • corepack pnpm check — eslint, Prettier, tsc, the BFF/authz scripts, and vitest with the coverage floor: 1,100 tests passed.
  • corepack pnpm build — every marketing route still prints ○ (static) or ● (SSG).
  • The full Playwright tier on desktop-chromium, mobile-chrome and mobile-safari, --retries=0: 972 passed, 137 skipped, 1 failed.
    • The failure is a pre-existing race in marketing-pages.spec.ts › "every header link navigates": the URL can change before the new page commits, so reopening the menu toggled it shut.
    • I reproduced it deterministically by delaying the route's payload, and fixed it in the test. Afterwards, marketing-pages + marketing-scenes passed 360/360 with --repeat-each=2.
  • make skills-check and make agent-bridge-check are green.
  • make check was not run: no Rust, entity or SQL changes, so rust.yml's detect has nothing to build.

Risk & rollback

  • Risk: the cut runs on every marketing navigation. Without View Transitions support it is a plain swap, and under reduced motion it is instant (tested).
  • Rollback: git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:30a1182e-8c7e-47e3-92ac-cda64c13fcfc on brians-MacBook-Pro · 2026-11-26T19:41:28Z

  • main is green with this change on it — the merge SHA, and the run
    that proves it. A later head SHA with this commit as an ancestor counts;
    a cancelled run with zero jobs does not: merge 9fe0be5a; on that SHA rust 45884372303, frontend 45884372271, images 45884372343, marketing preview 45884372266, infra 45884372178 and devcontainer 45884372322 all success.
  • images built, or correctly never ran because nothing that goes into
    an image changed: images 45884372343 success on 9fe0be5a (the web image carries the marketing change).
  • deploy converged — proved by a line the running process emitted, not
    by the image digest and not by the workflow conclusion: deploy 45884605543 resolved er-web: 9fe0be5a… -> sha256:8f963b64…, deployed it to the inactive colour and cut over. The live web-api-green-74fd4c8d7c-v7bn9 (started 19:35:04Z) runs er-web@sha256:8f963b64…, ready=true, and its process logged ▲ Next.js 16.4.6 / ✓ Ready. From inside that pod, /product's stylesheet /_next/static/chunks/28jt_3kstsofs.css contains marketing-cut, the cut this PR adds. (Checked after the owner refreshed SSO, which had expired at the first attempt.)
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this change: deploy green (above). drift and kind's nightly leg have not run on 9fe0be5a yet and were already red on every scheduled run before it (drift 45765434785/45557667867/45337430745; kind 45770773490…, red since 2026-11-10, kind probe red since 2026-11-10: KeyError 'token_hash' after the credential-omission fix #1106). This diff touches only frontend/ and .claude/, which neither exercises.
  • the board card reached Done through the automation rather than by
    hand, and the issue closed: Marketing scenes: a scroll-scrubbed scene primitive, shared record marks and cross-page view transitions #1254 CLOSED/COMPLETED, closer PullRequest #1265; card Status: Done.
  • follow-ups are open for everything deferred here — numbers: n/a — nothing was deferred; the next scenes are already filed as Home hero: a self-playing opening scene where three Meridian records collapse into one #1255–Marketing: remove orphaned demos and animate the nav dropdowns #1264 under Cinematic marketing site — one entity's story across every page #1253.
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned: the landing-page skill's new Scenes section (the reduced-motion clamp vs scroll timelines, the animation shorthand reset, WebKit needing a viewport meta to scrub, opacity only on foreground text), plus the drift fixes in the same file.

Specific to this change

Context — plan, discoveries, measurements, files

Plan

  • ScrollScene + scene.css: progressive enhancement; the poster is the base layout
  • meridian.ts, score.ts, marks.tsx
  • MarketingCut (page-kit Page + the four pages without it, wrapped without re-indenting)
  • chapters.ts + marketing-scenes.spec.ts
  • landing-page skill: the scene rules and their traps; drift fixed (axe sweeps marketing on phones too; CHAPTERS now enforced); REHEARSAL.md snapping lines corrected
  • probes: CSS.supports and scrubbing per Playwright project; what animations: "disabled" does to a scrub; whether the reduced-motion clamp stops it

Discoveries

  • The global reduced-motion clamp does not stop a scrubbed animation. A probe with animation-duration: 0.01ms !important under emulated reduced motion still sat at 250 of 1,000px at a quarter of the range, in Chromium. That is why scene.css enables scrubbing only inside no-preference.

  • Playwright's animations: "disabled" leaves a scroll-driven animation tracking. After a screenshot its playState was still running, and it read 250 at a quarter of the range. Scene baselines use the reduced-motion poster anyway, as every existing marketing baseline does.

  • WebKit only scrubs when the page has a viewport meta tag. Without <meta name="viewport"> it reported CSS.supports true and never moved. With the tag it matched Chromium across six forms, including the exact view-timeline-inset + animation-range: contain form scene.css uses. Next emits the tag on every page.

  • Re-indenting docs/page.tsx to wrap it would have produced a ~680-line diff in a file other sessions edit. The four pages without Page gain a two-line default export instead.

  • React cancels the root view transition (documentElement.style.viewTransitionName = "none"). Only <ViewTransition> boundaries animate, so the header and footer stay live through a cut. Each page renders its own boundary, because a layout persists and never enters or exits.

  • A pre-existing race in the header-links test. Seen once under the full tier's load. It is not caused by the cut: warm navigations close the menu in the same frame as the URL change, whether or not motion is on. A cold first navigation can commit about 600ms after the URL changes, though, and the test reopened the menu in that window. I first read this as React holding passive effects until a view transition finishes, and measured it before changing any product code. That theory was wrong, so the nav component is untouched and only the test waits for the close.

Measurements

  • Probe: node scratchpad/probe/sda-probe.mjs and sda-webkit.mjs (local, not committed). Chromium translates 0/500/1000 at contain 0/50/100%. WebKit (iPhone 15) with the viewport meta translates 0/500/1000 for named+range.
  • Mutation tests, each observed failing before being trusted:
    • Dropping audit from CHAPTERS → Expected value: "audit".
    • Removing the reduced-motion emulation from the cut spec → Expected: 0, Received: 2 (Chromium) and 4 (WebKit).
  • Stability: marketing-scenes.spec.ts ran --repeat-each=4 on all three projects with 36/36 passing. One earlier mobile-safari run hit Target page, context or browser has been closed once; it did not reproduce in 48 runs. The assertion now matches cut animations by name instead of reading effect.pseudoElement.

Files

  • frontend/src/components/marketing/scene/{scroll-scene.tsx,scene.css,marks.tsx,meridian.ts,score.ts}
  • frontend/src/components/marketing/{cut.tsx,cut.css,chapters.ts,story-chapters.tsx,pages/page-kit.tsx}
  • frontend/src/app/(marketing)/{page,pricing/page,docs/page,docs/api/page}.tsx: a two-line cut wrapper each
  • frontend/tests/{unit/marketing-scene-score.test.ts,component/marketing-scene.test.tsx,functional/marketing-scenes.spec.ts}
  • .claude/skills/landing-page/SKILL.md, frontend/src/components/marketing/demo/REHEARSAL.md

bmoore813 and others added 3 commits November 26, 2026 11:24
…ks and page cuts

ScrollScene pins a stage under the header and scrubs it with the reader's
own scroll position through CSS view timelines: no script, nothing
intercepted, a static poster under reduced motion or without support.
Meridian Supply's records, golden record and evidence live once, and every
score comes from one Fellegi-Sunter helper. Marketing pages cut into each
other through React 19.3's ViewTransition. CHAPTERS moves to a React-free
module and a spec now holds it to the page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… a navigation

The URL can change before the new page commits, and the menu closes on that
commit: reopening it earlier toggled the still-open menu shut. Reproduced by
delaying the route's payload; seen once under the full tier's load.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@athvin
athvin force-pushed the issue/1254-marketing-scenes-foundation branch from 94bc583 to def04cf Compare November 26, 2026 19:24
@athvin
athvin marked this pull request as ready for review November 26, 2026 19:25
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

The marketing preview was removed because this PR is closed or merged.

@athvin
athvin merged commit 9fe0be5 into main Nov 26, 2026
44 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 26, 2026 19:32 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — def04cfb Deployed Nov 26, 2026 by athvin via remove closed PR previews #66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Marketing scenes: a scroll-scrubbed scene primitive, shared record marks and cross-page view transitions

2 participants