@bobfrankston/msger 0.1.393 → 0.1.394
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/shower.js +15 -15
package/package.json
CHANGED
package/shower.js
CHANGED
|
@@ -569,16 +569,18 @@ function createMessageBoxHandle(options) {
|
|
|
569
569
|
rustOptions.aumid = rustOptions.appUserModelId;
|
|
570
570
|
}
|
|
571
571
|
delete rustOptions.appUserModelId;
|
|
572
|
-
// Pass
|
|
572
|
+
// Pass appName so the Rust side scopes its WebView2 user-data
|
|
573
573
|
// dir per app (one wedged profile no longer takes out every
|
|
574
574
|
// msger-hosted app's state). _appName defaults to "msger" so
|
|
575
|
-
// legacy callers retain the old shared profile path.
|
|
576
|
-
//
|
|
577
|
-
//
|
|
578
|
-
//
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
rustOptions.appName
|
|
575
|
+
// legacy callers retain the old shared profile path. camelCase
|
|
576
|
+
// ONLY — the Rust struct is rename_all=camelCase (snake_case
|
|
577
|
+
// was silently dropped for months; aumid fallback masked it),
|
|
578
|
+
// and now that the binary also ALIASES app_name, sending both
|
|
579
|
+
// keys is a serde duplicate-field PANIC at boot (the 2026-07-15
|
|
580
|
+
// "window flashes and vanishes" incident).
|
|
581
|
+
if (!rustOptions.appName)
|
|
582
|
+
rustOptions.appName = rustOptions.app_name ?? _appName;
|
|
583
|
+
delete rustOptions.app_name;
|
|
582
584
|
const jsonToSend = JSON.stringify(rustOptions);
|
|
583
585
|
// If detached, resolve immediately after stdin is closed
|
|
584
586
|
if (options.detach) {
|
|
@@ -717,13 +719,11 @@ export function showService(options) {
|
|
|
717
719
|
}
|
|
718
720
|
delete rustOptions.appUserModelId;
|
|
719
721
|
// Per-app WebView2 profile dir — see corresponding showMessageBox path
|
|
720
|
-
// for rationale.
|
|
721
|
-
//
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
rustOptions.app_name = _appName;
|
|
726
|
-
rustOptions.appName = rustOptions.app_name;
|
|
722
|
+
// for rationale. camelCase ONLY: with the binary's app_name alias,
|
|
723
|
+
// sending both keys is a serde duplicate-field panic at boot.
|
|
724
|
+
if (!rustOptions.appName)
|
|
725
|
+
rustOptions.appName = rustOptions.app_name ?? _appName;
|
|
726
|
+
delete rustOptions.app_name;
|
|
727
727
|
const jsonToSend = JSON.stringify(rustOptions);
|
|
728
728
|
if (process.env.MSGER_DEBUG)
|
|
729
729
|
console.log(`[service] Sending to Rust: ${jsonToSend.slice(0, 200)}`);
|