fix(storage): scope update detection to the same source repo #88
No reviewers
Labels
No labels
bug
cant-reproduce
documentation
duplicate
enhancement
good first issue
help wanted
invalid
low-priority
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-itsPLK/ps5-payload-manager!88
Loading…
Reference in a new issue
No description provided.
Delete branch "lucaszhongsj/fix/cross-repo-update-detection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
When the same payload exists in multiple sources, the storage page flags it as "update available" based on filename + version comparison alone, ignoring which source each side actually came from.
Two forks of the same tool — e.g.
ps5-payload-dev/ftpsrv v0.21in the official repo anddrakmor/ftpsrv 1.15-ng-stablein a community source — would show up as updates of each other even though they're different codebases. Installing one would cause the other to prompt an "Update" button, and applying that "update" would silently swap fork implementations.Fix
Match on source identity before comparing versions. Resolution order:
source.url(repository URL the payload was installed from)source.idsource.nameUSB-installed payloads never participate in repo update detection.
Changes
frontend/src/utils/payloadStatus.js(new): version + source-identity matching logicfrontend/src/utils/payloadStatus.test.js(new): 8 test cases covering cross-fork, missing-identity, USB, and legacy-fallback pathsfrontend/src/components/views/StorageHub.jsx: passsource_id/source_name/source_urlfrom each catalog entry into the per-payload status resolverfrontend/package.json: addnpm testscriptBackward compatibility
Sidecar metadata written before multi-source support lacks source identity fields. These entries fall back to the old same-source behavior, so existing installs don't suddenly change semantics.
Test plan
All 8 tests pass, including:
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.