Record visibility when startup paint probes are skipped
CI / verify (push) Canceled after 0s

This commit is contained in:
Sucukdeluxe committed 2026-10-15 11:16:01 +02:00
1 parent 2133d7a88c
commit ba01b17f8e
1 file changed
+3 -1
+3 -1
View File
@@ -1639,7 +1639,7 @@ function createWindow() {
const bounds = header?.getBoundingClientRect(); const bounds = header?.getBoundingClientRect();
return { readyState: document.readyState, apiAvailable: typeof window.api === 'object', bodyBackground: body ? getComputedStyle(body).backgroundColor : null, styleSheetCount: document.styleSheets.length, headerVisible: !!bounds && bounds.width > 0 && bounds.height > 0, viewportWidth: innerWidth, viewportHeight: innerHeight }; return { readyState: document.readyState, apiAvailable: typeof window.api === 'object', bodyBackground: body ? getComputedStyle(body).backgroundColor : null, styleSheetCount: document.styleSheets.length, headerVisible: !!bounds && bounds.width > 0 && bounds.height > 0, viewportWidth: innerWidth, viewportHeight: innerHeight };
})()`)); })()`));
startupDiagnostics.write('dom-probe', { checkpoint, generation, initialized: closeHandshakeReady, ...dom }); startupDiagnostics.write('dom-probe', { checkpoint, generation, initialized: closeHandshakeReady, windowVisible: diagnosticWindow.isVisible(), windowMinimized: diagnosticWindow.isMinimized(), ...dom });
} catch { } catch {
startupDiagnostics.write('dom-probe-unavailable', { checkpoint, generation, initialized: closeHandshakeReady }); startupDiagnostics.write('dom-probe-unavailable', { checkpoint, generation, initialized: closeHandshakeReady });
} }
@@ -1647,6 +1647,8 @@ function createWindow() {
if (diagnosticWindow.isVisible() && !diagnosticWindow.isMinimized()) { if (diagnosticWindow.isVisible() && !diagnosticWindow.isMinimized()) {
const image = await bounded(diagnosticWindow.webContents.capturePage()); const image = await bounded(diagnosticWindow.webContents.capturePage());
startupDiagnostics.write('paint-probe', { checkpoint, generation, ...summarizeStartupPixels(image) }); startupDiagnostics.write('paint-probe', { checkpoint, generation, ...summarizeStartupPixels(image) });
} else {
startupDiagnostics.write('paint-probe-skipped', { checkpoint, generation, windowVisible: diagnosticWindow.isVisible(), windowMinimized: diagnosticWindow.isMinimized() });
} }
} catch { } catch {
startupDiagnostics.write('paint-probe-unavailable', { checkpoint, generation }); startupDiagnostics.write('paint-probe-unavailable', { checkpoint, generation });