Compare commits

..

4 Commits

Author SHA1 Message Date
NimBold 89a1ab60aa test(startup): isolate post-load IPC control (#37)
- Issue #37: test whether a single command is safe after the document load callback returns.
- Keep the native shell unchanged while replacing the renderer with one post-load IPC call.

Refs #37.
2026-08-27 23:14:49 +03:30
NimBold 639f5bf091 fix(startup): defer renderer IPC past load callback (#37)
- Issue #37: Windows still overflowed when startup IPC ran from the WebView2 load callback.
- Release the renderer startup gate on the next event-loop task after load returns.
- Keep logger and console forwarding behind the same post-load boundary.

Fixes #37.
2026-08-27 22:45:55 +03:30
NimBold 97f15dee37 fix(startup): gate renderer IPC on document load (#37)
- Issue #37: Windows 1.4.0 exited with STATUS_STACK_OVERFLOW before showing the main window.
- Gate lazy entrypoint imports, Zustand persistence, logger initialization, and console forwarding until WebView2 document load.
- Preserve the native Ready reveal and pending-window restore lifecycle across platforms.
- Show a closeable startup error if the main entrypoint cannot load.

Fixes #37.
2026-08-27 22:26:53 +03:30
NimBold 8d1cde8d2c fix(startup): restore Windows renderer startup (#37)
- Issue #37: Windows 1.4.0 exited before showing its main window.\n- Keep the logger state read independent of WebViewWindow extraction during WebView2 bootstrap.\n- Preserve main-window authorization for logging mutations and keep the process-wide pause state consistent across renderers.\n\nFixes #37.
2026-08-27 21:23:00 +03:30
2 changed files with 21 additions and 6 deletions
+4 -1
View File
@@ -18201,6 +18201,10 @@ fn toggle_log_pause(caller: tauri::WebviewWindow, pause: bool) -> Result<(), Str
#[tauri::command]
fn is_log_paused() -> bool {
// This read is needed during renderer bootstrap, including by standalone
// Properties windows. Avoid extracting a WebviewWindow here: on Windows,
// WebView2 can invoke the command while its host is still initializing.
// Mutating logging commands remain restricted to the main window below.
LOG_PAUSED.load(std::sync::atomic::Ordering::Relaxed)
}
@@ -19899,7 +19903,6 @@ pub fn run() {
mark_main_window_startup_complete(app_handle);
#[cfg(target_os = "windows")]
reveal_main_window(app_handle);
#[cfg(not(target_os = "windows"))]
restore_pending_main_window(app_handle);
}
#[cfg(target_os = "macos")]
+17 -5
View File
@@ -1,8 +1,20 @@
import { initLogger } from "./utils/logger";
import { invoke } from '@tauri-apps/api/core';
void initLogger();
const rootElement = document.getElementById("root");
const rootElement = document.getElementById('root');
if (rootElement) {
rootElement.textContent = "Firelink startup control";
rootElement.textContent = 'Firelink startup control';
}
const documentLoaded = new Promise<void>(resolve => {
const releaseAfterNativeLoad = () => window.setTimeout(resolve, 0);
if (document.readyState === 'complete') {
releaseAfterNativeLoad();
} else {
window.addEventListener('load', releaseAfterNativeLoad, { once: true });
}
});
void documentLoaded.then(async () => {
await invoke<number>('begin_dock_badge_session');
if (rootElement) rootElement.textContent = 'Firelink post-load IPC control';
});