refactor(cli): unify seek/settle and Chrome launch across browser commands

seekCompositionTimeline becomes the single seek implementation with
per-caller settle options (rAF mode, font wait, settle sleep), replacing
the divergent local seekTo copies in validate and layout. All three
launch paths now build args via the engine's buildChromeArgs; screenshot
paths keep the engine's software-GPU default for deterministic output.

inspect gains one transient content_overlap warning on product-promo
(t=12.22s): the gsap.ticker.tick flush samples timeline state the old
layout seek missed.
This commit is contained in:
Miguel Angel Simon Sierra
2026-07-10 13:27:52 -04:00
parent 6152437d2a
commit feb256df8a
5 changed files with 382 additions and 156 deletions
@@ -131,6 +131,16 @@ describe("waitForPreferredSeekTarget", () => {
await expect(waitForPreferredSeekTarget(page, 1)).resolves.toBeUndefined();
});
it("does not fail validation when the page stub throws synchronously", async () => {
const page = {
waitForFunction: vi.fn(() => {
throw new Error("waiting failed synchronously");
}),
};
await expect(waitForPreferredSeekTarget(page, 1)).resolves.toBeUndefined();
});
});
describe("extractCompositionErrorsFromLint", () => {