Compare commits

..

3 Commits

Author SHA1 Message Date
NimBold 7744b386d2 test(startup): isolate post-load log read (#37)
- Issue #37: compare the post-load bool IPC command with the failing startup control.\n- Keep this diagnostic limited to the Windows/Linux packaged smoke workflow.\n\nRefs #37.
2026-08-27 23:43:50 +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
2 changed files with 25 additions and 6 deletions
+13 -1
View File
@@ -18553,6 +18553,17 @@ pub fn run() {
main_window_builder = main_window_builder
.inner_size(startup_size.width as f64, startup_size.height as f64)
.prevent_overflow();
#[cfg(target_os = "windows")]
{
// Wry installs its parent WM_SETFOCUS handler while WebView2
// is still being initialized. Keep the host hidden and
// non-activatable until RunEvent::Ready so Windows cannot
// re-enter that handler during native construction.
main_window_builder = main_window_builder
.visible(false)
.focused(false)
.focusable(false);
}
main_window_builder
.build()
.map_err(|error| format!("failed to create main window: {error}"))?;
@@ -19890,7 +19901,8 @@ pub fn run() {
.run(|app_handle, event| match event {
tauri::RunEvent::Ready => {
mark_main_window_startup_complete(app_handle);
#[cfg(not(target_os = "windows"))]
#[cfg(target_os = "windows")]
reveal_main_window(app_handle);
restore_pending_main_window(app_handle);
}
#[cfg(target_os = "macos")]
+12 -5
View File
@@ -1,8 +1,15 @@
import { invoke } from "@tauri-apps/api/core";
void invoke<number>("begin_dock_badge_session");
const rootElement = document.getElementById("root");
if (rootElement) {
rootElement.textContent = "Firelink startup control";
}
if (rootElement) 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<boolean>("is_log_paused");
if (rootElement) rootElement.textContent = "Firelink post-load log read";
});