Compare commits

..

1 Commits

Author SHA1 Message Date
NimBold de97fa1e65 test(startup): isolate renderer logger IPC (#37)
- Issue #37: isolate the renderer logger startup command from the full Windows launch path.\n- Keep the logger IPC call while removing unrelated renderer imports and application startup work.
2026-08-27 21:10:02 +03:30
2 changed files with 9 additions and 23 deletions
+4 -6
View File
@@ -18200,12 +18200,9 @@ 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)
fn is_log_paused(caller: tauri::WebviewWindow) -> bool {
properties_window::ensure_main_window(&caller).is_ok()
&& LOG_PAUSED.load(std::sync::atomic::Ordering::Relaxed)
}
#[tauri::command]
@@ -19903,6 +19900,7 @@ 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")]
+5 -17
View File
@@ -1,20 +1,8 @@
import { invoke } from '@tauri-apps/api/core';
import { initLogger } from "./utils/logger";
const rootElement = document.getElementById('root');
void initLogger();
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';
});