Skip to content

Session handover — 2026-07-12 pt4

Two finished slices from pt3's "Next session" list — header-CTA auto-detection (fast-follow #2) and carousel frames (ADR-0009 Slice 5a) — then a pivot to the Wix API for the hero-video/media plane, spike-validated and locked as ADR-0010. The video-migration build (5b) was not coded — the Wix API supersedes the URL-reconstruction approach, so it becomes an ADR-0010 build slice next session.

What shipped (code + data; one live D1 write)

  1. Header-CTA auto-detection — fast-follow #2 CLOSED (ADR-0009 Slice 3; known-patterns "A pinned-outside-<header> button IS the header CTA"). WCP's SERVICE AREAS pill is pinned in pinnedTopRight (outside <header>), so the header-scoped probe missed it. A capture-plane pinned-layer walker (chrome.headerRaw.ctaCandidates + pure classifyHeaderCta in lib/section-style.js) now finds it — guarded by button-styling + a nav-row floor (proven on garvanbay, whose styled topbar "Book an appointment" pill is correctly rejected → headerCta:null) + a header-band ceiling. One detector, two payoffs: auto-detects WCP's CTA (matches the committed seed, reproducible) AND flips the globals headerCta false-mismatch → agree (both live+ours now measure SERVICE AREAS → /service-areas). CMS lane; S/T/G byte-identical; +17 validate checks. No live change (WCP seed + D1 already carried the CTA).

  2. Carousel frames — ADR-0009 Slice 5a, WCP home renders its carousel LIVE (known-patterns "Enumerating a lazy-mounted Wix hero carousel"). The measured carousel variant collapsed to a single poster because the count-only capture never recorded the frame URLs. A --slides-gated captureHeroSlides (capture-section-backgrounds.js, ported from capture-layout.js#captureSlides) enumerates the 8 real hero frames — three traps fixed: lazy-mount needs interaction passes; the crawl's full-page scroll de-activates the slideshow (scrollIntoView re-activates → 1/8 became 8/8); the migration skips https:// URLs (emit the /assets/images/ form). Joined onto fcr.hero.slideshowUrls by makeStyleLookup+transformer like variant/style (reproducible-from-capture, proven). Migrated to r2: (transform-seed-images; 7 uploaded + 1 idempotent). WCP home renders the 8-frame rotating carousel (screenshot-verified, all frames loaded from R2); slides-dropped/media-missing/image-unmigrated cleared → home hero [video-unmigrated] only. garvanbay no-op; hero-4.astro untouched (renderer was already capable).

  3. Wix API pivot + spike — ADR-0010 (known-patterns "A Wix site-level API call takes wix-site-id only"). Rather than reconstruct video.wixstatic.com URLs and scrape lazy carousels, pivoted to the Wix Media Manager API. Spike (throwaway scratchpad/wix-probe.cjs, WCP metaSiteId dd5a7db4-…) proved it: listFiles returns WCP's hero video with real MP4 URLs at every resolution + its original filename (VID-20251205-WA0007.mp4), and all 7 captured carousel frame ids matched the API image pool (7/7). Account model confirmed FCR-owned → the API is a portfolio content/media plane (one key, sharded like ADR-0008), not a per-site OAuth slog. Matched by media id to the scrape's segmentation (ADR-0009 §4 realized). No client code built — spike + decision only.

Wiki changes

  • ADR-0010 — NEW. Wix API as the content/media plane; account model, auth shape, by-id match, spike evidence, deferred build slices (A client / B video-via-API / C image-provenance / D business-info+blog).
  • ADR-0009 — Slice 3 (header CTA) + Slice 5 (carousel frames) trackers appended (append-mostly).
  • known-patterns.md — three new entries (pinned-outside header CTA; lazy-mounted carousel enumeration; Wix wix-site-id-only auth).
  • known-issues.md — header fast-follow #2 marked CLOSED + globals headerCta mismatch closed; carousel-frames CLOSED; the hero-video entry repointed at ADR-0010 slice B (reconstruction superseded by the API).

State

Committed to master this session-end: lib/section-style.js (+validate), lib/capture-section-backgrounds.js (header-CTA ctaCandidates + --slides captureHeroSlides), lib/cms/seed-from-build.js + lib/cms/transformer.js (slideUrls join), apps/cms/seed/waterfordcountypainters.json (carousel hero slideshowUrls → 8 r2: frames — 1-line diff, no collateral), ADR-0010, the wiki files + this handover. Live writes: WCP D1 slideshowUrls surgically patched (8 r2: refs; 12 other blocks preserved, no reseed) + 7 carousel frames uploaded to R2; no worker redeploy (the carousel renderer was already in the WCP bundle). No garvanbay change. Wix creds (WIX_API_KEY/WIX_ACCOUNT_ID) added to apps/cms/.dev.vars (gitignored). Untracked/unrelated left alone: infra/ (undecided ownership), .claude/settings.local.json, scripts/.tmp/ + apps/cms/scripts/.tmp/ (throwaway patch/probe scripts). builds/* regenerated (gitignored).

Next session (priority order)

  1. Wix API content/media plane — ADR-0010 build. Start slice A (the apps/cms/scripts/wix-api.mjs client: auth + listFiles + by-id lookup + cursor paging), then slice B (video migration via the API — scrape id → API MP4 url → R2, retiring the 5b reconstruction). Auth contract + evidence are in ADR-0010; creds already in .dev.vars.
  2. Image provenance enrichment (ADR-0010 slice C) — replace derived basenames with API filenames/dimensions/alt.
  3. Hero render gaps (separate from acquisition): whether live WCP home plays a moving video slide vs 8 stills (unconfirmed — probe was cut short by the pivot); if moving, carousel video-slide support in hero-4 is the faithful fix.
  4. Section-style density dimension + Slice 6 calibration (fit lib/calibration.json; promote hero-variant/scrim/textTone to scored dims).