Repository navigation
fix: state-integrity pass on the update loop (detail by name, honest checks, badge lifecycle) - #30
Merged
Merged
Conversation
…checks, badge lifecycle) Five confirmed audit findings, all in the category 'the UI lies about state or loses it': - The open detail page was tracked by raw index into the catalog vector, which every refresh replaces AND reorders (GitHub sorts by last push): a refresh landing while a detail page was open silently swapped it to a different app's page. The selection is now keyed by repo name and resolved through App::active_repo(); a repo that vanished falls back to the grid instead of showing someone else's detail. - Update badges were never cleared: after a successful update the card kept showing 'Update vX -> vX' until the next global check, and an uninstalled app kept its badge. Both paths now clear the entry. - The launcher update check swallowed every failure into 'up to date': offline, rate-limited, or a bad tag all pretended the check ran. check_launcher_update now returns Result; failures surface (as an error toast for a manual click, in the status line for the automatic check) and never claim currency. 'Up to date' only toasts on a manual check - the automatic boot check stays quiet - and the boot no longer runs the check twice (the direct dispatch duplicated the CheckUpdates-chained one). - auto_check_updates now defaults ON: a store that never checks leaves its update badges permanently invisible. The check is batched and makes zero API calls for apps pinned to a fixed tag. - The scan cache was written on every scan but never read: with the startup scan disabled, every boot showed '0 apps'. Boot now restores the cached scan when the scan is skipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Five confirmed defects where the UI misreports state or loses it.
Changes
App::active_repo(), and a repository that disappeared falls back to the grid.check_launcher_updateturned every error into "up to date" (offline, rate limit, non-semver tag). It now returns aResult: the failure is shown (an error toast on a manual click, the status line for an automatic check) and never claims Colony is current. The "up to date" toast only appears for a manual check, and boot no longer runs the check twice.auto_check_updatesis ON by default. A store that never checks leaves its badges invisible forever. The check is batched and costs zero API calls for apps pinned to a fixed tag.Testing
cargo buildandclippy --all-targetsclean, 88 tests pass, boot smoke test OK (session restored, 3 repositories detected, no double launcher check).