Repository navigation
Commit 8480f25
fix(updater): anchor WinUI runtime so transient dialog close doesn't kill in-flight download
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: Copilot <[email protected]>1 parent f4d4793 commit 8480f25
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
463 | 473 | | |
464 | 474 | | |
465 | 475 | | |
| |||
0 commit comments