Repository navigation
fix: stop offering a package update that is already installed - #956
Conversation
An older installed version compared itself with the Store alone, so its page kept offering the Store's version after that version was installed and in use. Updating also trusted the installed list read when Settings opened, and refused with "already installed" when the version had been installed since. The offer now skips versions the source's own copy already has, and updating rereads what's installed first.
An update is still offered when no install record says whose files the newer copy holds. Updating stops when rereading the packages folder fails or the offer changed, and applying an update rereads it too, so one installed while its access review was open is accepted.
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Before and after
203 unchanged screens
Visual review: 203 screens, none changed. |
The access review can stay open while a later version from the same source is installed, such as from the command line. Confirming it then pinned the bar to the reviewed, older version. Stop instead and say the newer one is installed.
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
## [0.20.0](v0.19.0...v0.20.0) (2026-11-29) ### Features * animate widgets that a profile shows or hides ([#948](#948)) by @M4n0x ([eec8544](eec8544)), closes [#947](#947) [#947](#947) * log quit causes and show unexpected quits in Status ([#953](#953)) by @M4n0x ([ea5a64e](ea5a64e)), closes [#952](#952) ### Bug Fixes * choose a submenu item opened from the App menus tray ([#944](#944)) by @MaHofseth ([add49b0](add49b0)), closes [#942](#942) * draw borders in whole pixels so they keep every edge on 1x screens ([#934](#934)) by @M4n0x ([8590fcd](8590fcd)), closes [#933](#933) [#933](#933) * keep a package version installed when its folder is hidden ([#962](#962)) by @M4n0x ([2d97d15](2d97d15)), closes [#961](#961) * keep the Sound details open and smooth when picking a device ([#931](#931)) by @M4n0x ([df96453](df96453)), closes [#928](#928) [#928](#928) * keep windows clear of the bar after a double-click fills them ([#936](#936)) by @M4n0x ([c1478d1](c1478d1)), closes [#935](#935) [#935](#935) * leave the keyboard with the app while StableBar shows its menus ([#943](#943)) by @MaHofseth ([abc1c4f](abc1c4f)), closes [#941](#941) * play an app's first sound at its mixer volume ([#899](#899)) by @M4n0x ([2c38350](2c38350)), closes [#897](#897) [#897](#897) * show a turned-off widget's last output when it comes back ([#950](#950)) by @M4n0x ([6776fcb](6776fcb)), closes [#949](#949) [#949](#949) * show Countdown and Join in Settings after picking it ([#940](#940)) by @MaHofseth ([6ecaa72](6ecaa72)) * stop offering a package update that is already installed ([#956](#956)) by @M4n0x ([4592ebc](4592ebc))
|
🎉 This PR is included in version 0.20.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Problem
Settings › Packages offered Update to X on the page of an older installed version even when X was already installed from the Store and in use. Pressing it could fail with "Package ai-usage 1.5.1 is already installed. Choose a new version to replace it." when the version was installed after Settings read its installed list. Fixes #955.
Changes
update(for:)no longer offers a version when the offering source's own copy of it, or of a later version, is installed. A folder build of that version, or a copy without an install record, doesn't count, since it may hold other files; those keep the offer and the existing file check.update(_:)rereads the installed versions before downloading, and stops if the reread fails or the offer changed, so the page shows the new offer instead of applying one that wasn't seen.applyUpdaterereads before deciding to install or claim, so a version installed while the "Review additional access" dialog is open is claimed instead of failing.applyUpdatealso stops when a later version from the same source was installed meanwhile, so confirming doesn't pin the bar to the older one.loadInstalled()reads manifests and records before publishing either, and returns whether it succeeded. A throwingreloadInstalled()letsapplyUpdatereport a failed read.No visible layout changes: the wrong button no longer appears, and the error no longer happens.
Testing
Tests/StableBarTests/PackageUpdateOfferTests.swift: an older version offers nothing when the Store's newer copy is installed; updating rereads a version installed meanwhile; a copy without a record keeps the offer; confirming an access review after the version was installed meanwhile succeeds. The first two and the last failed before the fix.PackagesViewTests,PackageSourceTests,PackageStoreClientTests, theme gallery, widget package tests), andscripts/check.sh --quickpasses.BarContextMenuTests,KeyWindowTests,PresentationIntegrationTests) fail on this Mac regardless of branch, because they read its real menu bar; CI runs them.confirmingAnUpdateKeepsANewerVersionInstalledDuringItsReviewfailed before that fix.Merging
Merge commit or rebase: all three commits are
fixand describe their part.Claude Opus 5.5 via Claude Code