Clone-fidelity fix waves 1-3 (+ wave 4 in flight): capture settling, media, iframes

Fixes from the cropin.com / ooni.com audit reviews:
- walker: preserve whitespace-only text in inline elements ("ofthe" bug);
  capture ::placeholder styles for inputs
- css: emit visibility (hidden-at-rest wordmark artifact); exempt list
  markers from inherited elision (lost bullets); ::placeholder rules
- seo: sanitize og:type to Next's enum (render crash -> dev badge leak);
  generated next.config disables devIndicators
- capture/stabilize: promote lazy-loader data attrs before snapshots
  (collapsed sections, viewport-inconsistent captures); settle autoplay
  carousels to home slide before every snapshot; force-reveal hidden
  videos for poster shots + log failures
- generate: ship downloaded video files as local <video src>; keep
  picture>source through IR prune with srcset rewrite (mobile-crop-on-
  desktop heroes); pin Tailwind named screens to computeBands boundaries
- capture/graft: capture cross-origin iframe subtrees (Klaviyo signup
  forms) with element-screenshot fallback; asset download retry +
  visual-assets-missing reporting

Checkpoint commit: wave 4 (reveal settling, 206 range-response fix,
hidden-geometry banding, bare-zero utility gating) is mid-implementation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samraaj Bath
2026-07-03 17:45:42 -07:00
co-authored by Claude Fable 5
parent da537e68b8
commit 9aed2540aa
31 changed files with 2579 additions and 121 deletions
+25
View File
@@ -16,6 +16,7 @@ import {
seoRouteFiles,
} from "../src/generate/seo.js";
import { agentsMd, architectureMd } from "../src/generate/docs.js";
import { NEXT_CONFIG } from "../src/generate/app.js";
function fixtureIr(): IR {
return {
@@ -169,4 +170,28 @@ describe("SEO inventory and emission", () => {
assert.ok(agentsMd(docsInput).includes("src/app/ditto"));
assert.ok(architectureMd(docsInput).includes("data-ditto-id"));
});
it("passes a Next-supported og:type through to openGraph", () => {
const ir = fixtureIr();
ir.doc.head!.meta!.push({ property: "og:type", content: "article" });
const report = buildSeoInventory(ir, fixtureAssets(), fixtureCapture());
const metadata = metadataExport(report);
assert.ok(metadata.includes('"type": "article"'));
assert.ok(!metadata.includes('"og:type"'));
});
it("routes an unsupported og:type into metadata.other (Next throws on unknown enum values)", () => {
const ir = fixtureIr();
ir.doc.head!.meta!.push({ property: "og:type", content: "product.group" });
const report = buildSeoInventory(ir, fixtureAssets(), fixtureCapture());
const metadata = metadataExport(report);
assert.ok(metadata.includes('"og:type": "product.group"'));
assert.ok(!metadata.includes('"type": "product.group"'));
});
});
describe("generated Next config", () => {
it("disables the dev-tools badge so it cannot leak into screenshots", () => {
assert.ok(NEXT_CONFIG.includes("devIndicators: false"));
});
});