From 14daec375efbca87cfacb2e57990c36afb0cbe4e Mon Sep 17 00:00:00 2001 From: James Stringer <38541878+jamesstringer90@users.noreply.github.com> Date: Tue, 2 Jun 2026 21:50:51 -0400 Subject: [PATCH] Flush queued WebView2 messages once the UI is ready (L1) ui.c: on the uiReady action, call webview2_flush_queue() so messages posted before the JS message listener registered (e.g. early ui_log lines) are delivered instead of silently dropped. --- src/app_win/ui.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app_win/ui.c b/src/app_win/ui.c index bf9b517..0fd8c8d 100644 --- a/src/app_win/ui.c +++ b/src/app_win/ui.c @@ -869,6 +869,9 @@ static void on_webview2_message(const wchar_t *json) return; if (wcscmp(action, L"uiReady") == 0) { + /* JS has loaded and registered its message listener; deliver any + * messages queued before WebView2 was ready (e.g. early ui_log lines). */ + webview2_flush_queue(); if (!prereq_check_all()) { webview2_post(L"{\"type\":\"prereqRequired\"}"); return;