Commit 53ff55a
fix(updater): anchor WinUI runtime so transient dialog close doesn't kill in-flight download (#644)
UpdateDialog is a WindowEx (its own full WinUI Window), not a ContentDialog.
On the startup update path it is the only window in the process. WinUI 3
Desktop's default DispatcherShutdownMode is OnLastWindowClose, so clicking
'Download' (which calls Close() on the dialog) shuts down the WinUI runtime
mid-extraction. The Updatum-managed ZipFile.ExtractToDirectory only got
~199 of 1505 files written to %TEMP% before the process was terminated,
the .bat script that drives the in-place file replacement was never
written, and the install dir was never updated. Because the shutdown
came from the native side it bypassed AppDomain.ProcessExit, so no
'Process exiting (ExitCode=...)' line was logged and no managed
exception was thrown, making the failure silent.
Switch the DispatcherShutdownMode to OnExplicitShutdown so the runtime
only exits when we call Application.Exit() (which we already do in the
existing shutdown paths). The keep-alive window remains because it is
still required as a persistent XamlRoot host for ContentDialogs that
fire when no Hub window is open.
Verified on Windows by upgrading v0.5.1 -> v0.6.0:
(Get-Item ".\OpenClaw.Tray.WinUI.exe").VersionInfo.ProductVersion
0.6.0+...
Co-authored-by: Keith Mahoney <you@example.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent bfeb3b5 commit 53ff55a
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
377 | 387 | | |
378 | 388 | | |
379 | 389 | | |
| |||
0 commit comments