@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/shower.js +15 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/msger",
3
- "version": "0.1.393",
3
+ "version": "0.1.394",
4
4
  "description": "Fast, lightweight, cross-platform message box - Rust-powered alternative to msgview",
5
5
  "type": "module",
6
6
  "main": "./index.js",
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 app_name so the Rust side scopes its WebView2 user-data
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. Sent under
576
- // BOTH keys: the Rust struct is rename_all=camelCase, so the
577
- // snake_case key alone was silently dropped (aumid fallback
578
- // masked it); app_name kept for binaries with the alias only.
579
- if (!rustOptions.app_name)
580
- rustOptions.app_name = _appName;
581
- rustOptions.appName = rustOptions.app_name;
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. Pass app_name so the Rust side scopes its profile
721
- // under `%LOCALAPPDATA%\<appName>\webview2` instead of the shared
722
- // `%LOCALAPPDATA%\msger\webview2`. Sent under BOTH keys — the Rust
723
- // struct is rename_all=camelCase, so snake_case alone was dropped.
724
- if (!rustOptions.app_name)
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)}`);