From e5125e6e6e7fef6f71ba8c8bd31f02e33aa39e1c Mon Sep 17 00:00:00 2001 From: Hibryda Date: Wed, 25 Mar 2026 17:18:09 +0100 Subject: [PATCH] fix(electrobun): enable stub page + deferred native resize for testing --- ui-electrobun/src/bun/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui-electrobun/src/bun/index.ts b/ui-electrobun/src/bun/index.ts index 1bfd778..e5f934d 100644 --- a/ui-electrobun/src/bun/index.ts +++ b/ui-electrobun/src/bun/index.ts @@ -203,7 +203,7 @@ relayClient.onStatus((machineId, status, error) => { async function getMainViewUrl(): Promise { // TEMPORARY: load resize test stub via Vite dev server (keeps RPC bridge) - const RESIZE_TEST = false; // DISABLED — use normal app for now + const RESIZE_TEST = true; // STUB MODE — minimal page for resize testing if (RESIZE_TEST) { const testUrl = DEV_SERVER_URL + "/resize-test.html"; console.log(`[RESIZE_TEST] Loading stub via Vite: ${testUrl}`); @@ -244,9 +244,13 @@ mainWindow = new BrowserWindow({ }, }); -// Native resize COMPLETELY DISABLED for stability testing -// TODO: re-enable after verifying the app starts without it -console.log("[native-resize] DISABLED — testing app startup stability"); +// Native resize via C shared library — deferred 3s for GTK widget realization +setTimeout(() => { + try { + const { initNativeResize } = require("./native-resize.ts"); + initNativeResize((mainWindow as any).ptr, 8); + } catch (e) { console.error("[native-resize] init failed:", e); } +}, 3000); // Prevent GTK's false Ctrl+click detection from closing the window on initial load. // WebKitGTK reports stale modifier state (0x14 = Ctrl+Alt) after SIGTERM of previous instance,