3 Commits
Author SHA1 Message Date
poli0981andClaude Opus 5.5 62d7178eab fix(updates): end the elevated session before applying; robust errors; X cancels the download
- Download and apply are separate steps: applying first ends the elevated session and waits for the
  Elevator to exit (it runs from the folder Velopack replaces, and the non-elevated updater can't
  kill it or overwrite its locked files), and a command started during the download postpones the
  restart instead of being killed halfway.
- UpdateErrorMapper.Map(Exception) looks through wrapper/aggregate exceptions for the HTTP status;
  HttpClient timeouts now map to Offline instead of being rethrown as cancellations (which left the
  dialog stuck on "Checking"). User cancellation is still distinguished.
- Closing the update dialog with its title-bar X cancels the download; otherwise it finished in the
  background and restarted the app, possibly mid-command.
- The startup prompt never opens over another dialog; the "command running" guard reads the shared
  ExecutionViewModel (now a singleton) instead of MainWindow.DataContext.
- Settings' "Last checked" only updates when a check actually succeeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 20:36:20 +07:00
poli0981andClaude Opus 5.5 b4cbf68cce test: migrate the suite to xUnit v3
Pass TestContext.Current.CancellationToken to cancellable calls (xUnit1051), dispose pipes
asynchronously, drop null-forgiving operators that xUnit v3's nullability annotations make
redundant, and rename the ExecutionTests helper that shadowed the fake runner's RunAsync.
All 204 test cases pass under VSTest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:56:42 +07:00
poli0981andClaude Opus 4.8 44cdfe838b Phase 4: Velopack auto-update
Add the update path per the roadmap: IUpdateService -> VelopackUpdateService
(GithubSource against the project repo; per-user install, no UAC), a minimal
"Check for updates" dialog (check -> prompt -> progress -> apply & restart),
mapped error dialogs (404/403/429/5xx/offline; 419 is not special-cased), an
"auto-check on startup" setting, and scripts/pack.ps1 for vpk packaging.

- Application stays Velopack-free: UpdateError, UpdateCheckResult, pure
  UpdateErrorMapper, widened IUpdateService, CheckForUpdateUseCase.
- Infrastructure: VelopackUpdateService (lazy manager, degrades to NotInstalled
  in dev) + VelopackBootstrap so the WPF layer never references Velopack.
- WPF: UpdateViewModel/UpdateDialog, IUpdateDialogService, Tools menu item,
  VelopackApp.Build().Run() at startup + non-blocking auto-check, gated on the
  Phase 3 "command running" guard before applying.
- Tests: error mapping (429 handled, 419 -> Unknown), use-case pass-through,
  DI resolution.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 22:34:32 +07:00