You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v1.10.2: Self-heal Start Menu shortcut after Velopack update
Fixes the regression observed on 2026-04-20 during the first
real-world v1.10.0 -> v1.10.1 auto-update on Lewis's machine:
Velopack's update apply step logged success for the Start Menu
.lnk but left the parent folder empty. Windows Search could not
find the app; users could only launch via Desktop shortcut.
Rather than wait for an upstream Velopack fix (which would take
weeks to reach users), v1.10.2 self-heals on every startup.
## New IShortcutHealer service
Runs once in App.OnFrameworkInitializationCompleted, after DI is
built (so logging is wired) and before MainWindow.Show() (so no
race with user activity). Four branches:
- SkippedDevBuild: running exe outside %LOCALAPPDATA%\...\current\
- AlreadyPresent: expected .lnk exists, no-op
- HealedMissing: .lnk recreated via WScript.Shell COM
- Failed: recreation threw; logged, launcher continues normally
Two layers of DI abstraction for testability:
1. IShellLinkWriter: thin abstraction over WScript.Shell COM.
WScriptShellLinkWriter is the real implementation with proper
Marshal.ReleaseComObject cleanup.
2. WindowsShortcutHealer takes two injectable delegates
(getRunningExePath, fileExists) so unit tests drive every
branch without touching real filesystem or COM.
## Tests
6 new tests in WindowsShortcutHealerTests covering:
- Dev-build skip (file-exists probe should NEVER be called)
- Shortcut present, no write
- Shortcut missing, writer succeeds
- Shortcut missing, writer fails
- Case-insensitive path comparison (Velopack records case-
preserving, Windows FS is case-insensitive)
- Probe exception collapses to Failed, never propagates out of
HealIfMissing (startup must not crash due to heal bug)
Total: 253 tests (247 + 6 new).
## CA1416 warning fix
WindowsShortcutHealerTests annotated with [SupportedOSPlatform
("windows")] because it tests a Windows-only class. Per the
never-suppress hard rule, fixing at the root rather than with
NoWarn. 12 warnings -> 0 warnings.
## Docs
- ROADMAP.md: v1.10.2 entry with full design walkthrough
- docs/dev/VELOPACK.md:
* Marked the Velopack bug as worked-around in-app
* NEW: MSIX-sandboxed PowerShell virtualization gotcha
(discovered while fixing Lewis's broken shortcut - paths
built from $env:LOCALAPPDATA inside Claude Desktop's
sandbox resolve to Packages\...\LocalCache\..., invisible
outside the sandbox; use $env:USERPROFILE instead)
- docs/dev/LEARNINGS.md: New "self-heal at startup" architecture
invariant + corrected a stale VELOPACK.md cross-ref from
BUILD-AND-TOOLING.md
## Live-verified
Dev build: HealIfMissing returns SkippedDevBuild without disk touch.
Log line: "Shortcut heal skipped: running from '...\bin\Debug\...',
not Velopack install path '...\current\...' (dev build?)".
The installed-path branch will be exercised naturally when users
receive v1.10.2 as the first Velopack update after the regression.
## Gates
- 253/253 tests passing
- 0 warnings, 0 errors
- All files <=200 lines
- Dev build startup still clean (no spurious shortcut writes)