From f04be0f7cee1557115bc0ec125e046355b4044b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Tue, 27 Oct 2026 11:28:23 +0000 Subject: [PATCH] fix(cli): check waits 10 s for a scene to become ready and says what a timeout means (#6539) check gave a scene 3 s to signal it was ready, then warned "checking the current page state" and sampled whatever was on screen. Scenes that build procedural textures or WebGL canvases routinely need longer, so a pass could miss late content with a warning nobody could act on. The default wait is now 10 s (it ends the moment the page is ready), the warning says the scene may still be building and to raise --timeout, and check_report records render_ready_timed_out so the cases can be counted. --- packages/cli/src/commands/check.ts | 4 ++-- packages/cli/src/telemetry/events.test.ts | 3 +++ packages/cli/src/telemetry/events.ts | 2 ++ packages/cli/src/utils/checkBrowser.ts | 7 +++++-- packages/cli/src/utils/checkPipeline.ts | 5 ++++- packages/cli/src/utils/checkTypes.ts | 1 + 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/commands/check.ts b/packages/cli/src/commands/check.ts index a078ff9f59..e1d38999f1 100644 --- a/packages/cli/src/commands/check.ts +++ b/packages/cli/src/commands/check.ts @@ -208,8 +208,8 @@ const CHECK_COMMAND_ARGS = { timeout: { type: "string", description: - "Initial render-ready timeout in ms, or with a unit (45s, 2m); also sets the navigation minimum (10s floor, default: 3000)", - default: "3000", + "Initial render-ready timeout in ms, or with a unit (45s, 2m); also sets the navigation minimum (10s floor, default: 10000)", + default: "10000", }, contrast: { type: "boolean", diff --git a/packages/cli/src/telemetry/events.test.ts b/packages/cli/src/telemetry/events.test.ts index 096842f6bc..c45b28a6fb 100644 --- a/packages/cli/src/telemetry/events.test.ts +++ b/packages/cli/src/telemetry/events.test.ts @@ -120,6 +120,7 @@ describe("trackCheckReport", () => { contrastWarnings: 10, craftWarnings: 16, launchSettleMs: 11, + renderReadyTimedOut: true, seekLoopMs: 12, contrastMs: 13, gridMs: 17, @@ -151,6 +152,7 @@ describe("trackCheckReport", () => { contrast_warnings: 10, craft_warnings: 16, launch_settle_ms: 11, + render_ready_timed_out: true, seek_loop_ms: 12, contrast_ms: 13, grid_ms: 17, @@ -184,6 +186,7 @@ describe("trackCheckReport", () => { contrastWarnings: 0, craftWarnings: 0, launchSettleMs: 0, + renderReadyTimedOut: false, seekLoopMs: 0, contrastMs: 0, gridMs: 0, diff --git a/packages/cli/src/telemetry/events.ts b/packages/cli/src/telemetry/events.ts index f736df0fae..dc62f1e945 100644 --- a/packages/cli/src/telemetry/events.ts +++ b/packages/cli/src/telemetry/events.ts @@ -1113,6 +1113,7 @@ export function trackCheckReport(props: { contrastWarnings: number; craftWarnings: number; launchSettleMs: number; + renderReadyTimedOut: boolean; seekLoopMs: number; contrastMs: number; gridMs: number; @@ -1143,6 +1144,7 @@ export function trackCheckReport(props: { contrast_warnings: props.contrastWarnings, craft_warnings: props.craftWarnings, launch_settle_ms: props.launchSettleMs, + render_ready_timed_out: props.renderReadyTimedOut, seek_loop_ms: props.seekLoopMs, contrast_ms: props.contrastMs, grid_ms: props.gridMs, diff --git a/packages/cli/src/utils/checkBrowser.ts b/packages/cli/src/utils/checkBrowser.ts index c64687de74..dd1ebf5410 100644 --- a/packages/cli/src/utils/checkBrowser.ts +++ b/packages/cli/src/utils/checkBrowser.ts @@ -373,7 +373,8 @@ export async function runBrowserCheck( const session = await openSettledCompositionPage(html, server.url, { navigationTimeoutMs: options.timeout, renderReadyTimeoutMs: options.timeout, - renderReadyWarningSuffix: "checking the current page state", + renderReadyWarningSuffix: + "the scene may still be building, so results can miss late content; raise --timeout (for example 20s)", prelaunched, browserGpuMode: options.browserGpuMode ?? resolveCliChromeGpuMode(), signal: deadline?.signal, @@ -430,6 +431,7 @@ export async function runBrowserCheck( return { ...result, timings: { ...result.timings, launchSettleMs }, + renderReadyTimedOut: session.renderReadyTimedOut, runtimeFindings: dropFailedProxyEchoes( dropMotionBlurConsoleEcho(keepBrokenImageAborts(merged, broken), blur), failedPaths, @@ -524,7 +526,8 @@ async function openHelperSession( const session = await openSettledCompositionPage(html, url, { navigationTimeoutMs: options.timeout, renderReadyTimeoutMs: options.timeout, - renderReadyWarningSuffix: "checking the current page state", + renderReadyWarningSuffix: + "the scene may still be building, so results can miss late content; raise --timeout (for example 20s)", browserGpuMode: options.browserGpuMode ?? resolveCliChromeGpuMode(), signal: owner.signal, onBrowser: owner.onBrowser, diff --git a/packages/cli/src/utils/checkPipeline.ts b/packages/cli/src/utils/checkPipeline.ts index a827918c05..8bd52c32ff 100644 --- a/packages/cli/src/utils/checkPipeline.ts +++ b/packages/cli/src/utils/checkPipeline.ts @@ -119,7 +119,7 @@ export const DEFAULT_CHECK_OPTIONS: CheckOptions = { maxIssues: 80, collapseStatic: true, tolerance: 2, - timeout: 3000, + timeout: 10_000, contrast: true, strict: false, snapshots: false, @@ -1631,6 +1631,7 @@ export async function runAuditGrid( overlapMs: collected.overlapMs, }, skipped: false, + renderReadyTimedOut: false, }; } @@ -2066,6 +2067,7 @@ function buildReport( contrastWarnings: contrastSection.warningCount, craftWarnings: craftSection.warningCount, launchSettleMs: browser.timings.launchSettleMs, + renderReadyTimedOut: browser.renderReadyTimedOut, seekLoopMs: browser.timings.seekLoopMs, contrastMs: browser.timings.contrastMs, gridMs: browser.timings.gridMs, @@ -2206,6 +2208,7 @@ function emptyBrowserResult(): CheckBrowserResult { overlapMs: 0, }, skipped: true, + renderReadyTimedOut: false, }; } diff --git a/packages/cli/src/utils/checkTypes.ts b/packages/cli/src/utils/checkTypes.ts index 34e0420f59..97cdfc6b1c 100644 --- a/packages/cli/src/utils/checkTypes.ts +++ b/packages/cli/src/utils/checkTypes.ts @@ -334,6 +334,7 @@ export interface CheckBrowserResult { craft: CraftResult; screenshots: CheckScreenshot[]; timings: CheckTimings; + renderReadyTimedOut: boolean; skipped: boolean; }