Skip to content

Refresh a pushed game's releases from the project the catalog lists - #590

Open
thehobbit85 wants to merge 1 commit into
elripalda:mainfrom
thehobbit85:claude/fix-push-refreshes-listed-repo
Open

thehobbit85 wants to merge 1 commit into
elripalda:mainfrom
thehobbit85:claude/fix-push-refreshes-listed-repo

Conversation

@thehobbit85

Copy link
Copy Markdown
Contributor

What this changes

Found while auditing #78 and #177.

When the website pushes that a game has a new release, the launcher refreshes that game's release list past the usual six-hour copy, then checks for updates. The push refreshed the project the game was installed from (g.repo). The update check reads the project the catalog lists now (listed_repo). For a game whose project moved, such as to its own Forgejo server, the push refreshed the old project's list. The update check then read the new project's cached copy, so the new release stayed hidden until that copy was six hours old or the player checked by hand.

The push now refreshes the project the catalog lists, through the same listed_repo the update check uses. A game the catalog lists no project for keeps its own, as before.

Limits: this only matters for games whose catalog project differs from the one they were installed from.

How you tested it

Run on macOS against eaf7ca2, with a synthetic catalog on disk.

  • New test: a game installed from old/proj that the catalog lists as new/proj. On main the push asked old/proj; with this change it asks new/proj.

  • Control test: a game the catalog lists no project for still uses its own.

  • Rust: 1,217 passed, 1 ignored. UI: 1,019 passed, 11 skipped. git diff --check clean.

  • npm test passes

  • node --test tests/*.test.cjs passes

  • Tried it in the launcher (npm run dev)

Checklist

  • One change per pull request
  • No version bump or patch notes (those are done at release time)
  • Does not change what developers can write in recomplauncher.json

A push for a game refreshed the releases of the project it was installed from. The update check reads the project the catalog lists now, so for a project that moved, the push refreshed the wrong list and a new release stayed hidden until the six-hour copy ran out. The push now asks the same project the update check reads.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant