Support MSIX .appinstaller updates for FW Lite testers - #2496
Conversation
Enables the OS-driven .appinstaller update track alongside the existing
in-app updater, so a subset of testers can be moved onto it without
disrupting the majority who install the plain .msixbundle.
- GenerateAppInstaller: drop <OnLaunch> (no on-launch check, so no update
popup and no race with the in-app updater); keep the silent background
task. Harden ConvertVersionToAppInstallerVersion (int.Parse over
TrimStart('0')) and lock the format with a test, since a mismatch with
the bundle manifest is a hard install failure.
- AppUpdateService: pick the update path at runtime. When the install is
on the App Installer track (GetAppInstallerInfo() is non-null), update
via AddPackageByAppInstallerFileAsync; otherwise keep the existing
AddPackageByUriAsync bundle path. Using the bundle API on a tracked
install would detach it from the track.
- Remove the stale controller comment: octet-stream + 302 from GitHub was
verified working, so no proxy is needed.
- Document the verification results and rollout plan in docs/research.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughChangesApp Installer update integration
Estimated code review effort: 3 (Moderate) | ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@backend/FwLite/FwLiteMaui/Platforms/Windows/AppUpdateService.cs`:
- Around line 176-187: Update GetAppInstallerUri and its caller so only a
successful lookup returning null triggers the direct bundle fallback. When
Package.Current or GetAppInstallerInfo throws, preserve the tracked-install
path, log the exception, and return UpdateResult.Failed instead of passing null
to AddPackageByUriAsync.
In `@docs/research/msix-appinstaller-fwlite.md`:
- Around line 31-35: Update the research document to remove stale verification
findings and completed action items across the referenced sections. Align all
migration, redirect/octet-stream, and version-conversion descriptions with the
current GenerateAppInstaller and ConvertVersionToAppInstallerVersion
implementations, including int.Parse rather than TrimStart; retain only
genuinely unresolved work such as capability validation and download-page
rollout.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4955cea1-3ee1-4a59-832e-8f68a082b1c2
📒 Files selected for processing (5)
backend/FwLite/FwLiteMaui/Platforms/Windows/AppUpdateService.csbackend/LexBoxApi/Controllers/FwLiteReleaseController.csbackend/LexBoxApi/Services/FwLiteReleases/FwLiteReleaseService.csbackend/Testing/LexCore/Services/FwLiteReleaseServiceTests.csdocs/research/msix-appinstaller-fwlite.md
💤 Files with no reviewable changes (1)
- backend/LexBoxApi/Controllers/FwLiteReleaseController.cs
Address CodeRabbit: the detailed-findings body was still written in pre-implementation tense (UNCERTAIN markers, action items, and a section describing the removed TrimStart code). Add a banner marking those sections as the original 2026-07-28 research, and annotate sections D/E/F with their resolved status so nothing instructs already-done work. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
myieye
left a comment
There was a problem hiding this comment.
LGTM 👍 (I did not test anything)
worked with Claude today to figure this out. The plan is that nothing will change for anyone once this is released. But we can test out the app installer ourselves, and with some testers who were having issues with the previous update path. Once we're happy we will remove the
if (appInstallerUri is null)path which installs the package directly, and install via the appInstaller, this will register the windows auto update.This PR is in conflict with #2468 because it only works if we're using
AddPackageByUriAsyncbut that would disconnect the app installer.🤖 AI summary
Enables the OS-driven Windows
.appinstallerupdate track for FW Lite, so a subset of testers can be moved onto it without disturbing the majority who install the plain.msixbundle. Whether an existing bare-bundle install can be migrated onto the track was verified by hand (install once through the.appinstaller→ in-place update, project data preserved,GetAppInstallerInfo().Uripopulated), as was serving the bundle straight from GitHub (application/octet-stream+ 302 redirect both work — no proxy needed).Changes
GenerateAppInstaller— drop<OnLaunch>so Windows never checks on start: no update popup, and no race with the in-app updater. Keep the silent<AutomaticBackgroundTask>(~8h). HardenConvertVersionToAppInstallerVersion(int.Parseinstead ofTrimStart('0'), nowpublic static) and lock the format with a test — a mismatch with the bundle's manifest identity version is a hard install failure.AppUpdateService.ApplyUpdate(FwLiteMaui/Windows) — pick the update path at runtime:Package.Current.GetAppInstallerInfo()?.Urinon-null) →AddPackageByAppInstallerFileAsync..msixbundle, most users today) → the existingAddPackageByUriAsyncpath, unchanged.Using the bundle API on a tracked install would detach it from the track, so this branch is required.
docs/research/msix-appinstaller-fwlite.mddocumenting the primary-source research, the hands-on verification results, the rollout plan, and a MAUI gotcha (the desktop app reads no env/appsettings config, so behaviour changes there require a code + signed build).Rollout — intentionally not rolled out to everyone. This keeps two install paths coexisting: most users on bundle + in-app updater; a few testers on the
.appinstaller. Shipping a later build migrates the fleet automatically (their in-app updater installs through the appinstaller, attaching them). Coexistence is safe because the in-app updater now uses the App Installer API when on the track.For testers (once merged + deployed). Install/migrate onto the track with a single command; existing project data is preserved:
Kept private for now — the public download page is not updated.
Watch items (see the research doc): if a tester's first in-app update fails with a capability/access error, add the
packageManagementrescapcapability toPackage.appxmanifest;GetLatestRelease(WindowsAppInstaller)still throws (harmless — the controller special-cases that edition).Test plan
ConvertVersionToAppInstallerVersionunit test passes (v2026-07-06-… → 2026.7.6.1, incl. the October10case).FwLiteMauiWindows target builds clean (0 warnings)..appinstaller→ publish newer version → auto-updates..msixbundleinstall, then install once via.appinstaller→ in-place update, data preserved, now on the track.<MainBundle Uri>pointing directly at the GitHub asset installs (octet-stream + 302).…/download-latest?edition=windowsAppInstallerserves the generated.appinstallerand a tester machine updates viaAddPackageByAppInstallerFileAsync.