mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
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.
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -334,6 +334,7 @@ export interface CheckBrowserResult {
|
||||
craft: CraftResult;
|
||||
screenshots: CheckScreenshot[];
|
||||
timings: CheckTimings;
|
||||
renderReadyTimedOut: boolean;
|
||||
skipped: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user