[TS-3287] Cached ecosystem fetch#2126
Open
ethangreen-dev wants to merge 14 commits into
Open
Conversation
f57a80a to
364cf75
Compare
ebkr
requested changes
Apr 15, 2026
364cf75 to
a0946ca
Compare
ebkr
approved these changes
Apr 20, 2026
There was a problem hiding this comment.
Pull request overview
This PR adds a network-backed update path for the Thunderstore ecosystem schema: when the game selection screen loads, the app fetches the latest schema from the API, caches it to disk, and uses If-Modified-Since / 304 Not Modified to avoid downloading unchanged data.
Changes:
- Implement schema fetching, merge logic, and
Last-Modifiedpersistence inEcosystemSchema.ts. - Trigger schema update from
GameSelectionScreen.vueon mount. - Expand unit tests to cover fetch success,
304handling, failure behavior, merge behavior, and modloader package deduplication.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/r2mm/ecosystem/EcosystemSchema.ts |
Implements the cached fetch flow (including If-Modified-Since / Last-Modified) and merges fetched data with the bundled schema. |
src/pages/GameSelectionScreen.vue |
Calls the update routine when the game selection screen mounts. |
test/vitest/tests/unit/EcosystemSchema/EcosystemSchema.spec.ts |
Adds mocks and new test cases to validate fetch/caching/merge behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
96b8dad to
7e42239
Compare
ebkr
approved these changes
May 13, 2026
Fetches the latest schema from the API on game selection. Uses the 304 response of the API to determine if the remote version has been updated since the last request. Not a huge difference in performance locally but more efficient on the server side.
7e42239 to
ffa1e97
Compare
This is basically a four-step approach. The provider: 1. Checks to see if the images are bundled. 2. Checks to see if an instance of the schema is being served on localhost:1337 3. Checks to see if any images have been cached locally. 4. Retrieves the image from the CDN. Notably this also features the fire-once-and-fail-quick CDN check where it checks the connection once during startup and, if it fails, attempts steps 1-3 and then uses a default image.
[TS-3696] Use CDN image assets
[TS-3708] Pull game images from cdn / localhost in sync script
[TS-3714] Add new game image placeholder asset
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.
Fetches the latest schema from the API on game selection with a 12 hour refresh window (can be tuned or removed if not necessary). Schema is cached locally and update requests make proper use of the 304 response to avoid pulling the schema when it hasnt been updated.
This was initially a PR from the Thunderstore fork. Deleted that, make a new PR in this repo.
Depends on #2113