From ba01b17f8e571fdfcac9b2e7493f87f6c0ad1e9f Mon Sep 17 00:00:00 2001 From: Sucukdeluxe <259325684+Sucukdeluxe@users.noreply.github.com> Date: Thu, 15 Oct 2026 11:16:01 +0200 Subject: [PATCH] Record visibility when startup paint probes are skipped --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index e1d22cd..f1e7ea8 100644 --- a/main.js +++ b/main.js @@ -1639,7 +1639,7 @@ function createWindow() { 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 }; })()`)); - 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 { startupDiagnostics.write('dom-probe-unavailable', { checkpoint, generation, initialized: closeHandshakeReady }); } @@ -1647,6 +1647,8 @@ function createWindow() { if (diagnosticWindow.isVisible() && !diagnosticWindow.isMinimized()) { const image = await bounded(diagnosticWindow.webContents.capturePage()); startupDiagnostics.write('paint-probe', { checkpoint, generation, ...summarizeStartupPixels(image) }); + } else { + startupDiagnostics.write('paint-probe-skipped', { checkpoint, generation, windowVisible: diagnosticWindow.isVisible(), windowMinimized: diagnosticWindow.isMinimized() }); } } catch { startupDiagnostics.write('paint-probe-unavailable', { checkpoint, generation });