Repository navigation
fix: load modpack versions for FTB and CurseForge packs - #1153
Conversation
The Modpacks tab asked for versions by the pack slug. FTB only knows its numeric pack id and CurseForge's files endpoint only takes the numeric project id, so both answered with an error and the version picker showed a 502. The tab now sends the FTB pack id, and the CurseForge engine resolves a slug to its id before listing files. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 14 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
CI Report - 91e288brun 46166861670 - attempt 1 0 failed - 25 passed - 8 skipped - 47m7s elapsed Test selection: partial - per-suite table Coverageno coverage/* commit statuses found on 91e288b Changed
Slowest jobs
e2e buckets run
|
Problem
Choosing a version for an FTB or CurseForge modpack in the Modpacks tab failed with a 502.
The tab asked for the version list by the pack slug (
p.slug || p.id):mod registry versions failed: ftb: invalid pack id "ftb-evolution-2"./mods/{id}/filesonly takes the numeric project id, so it answeredcurseforge GET: upstream status 404.Both are mapped to 502 by the versions route. Seen in the API log of a live install, with and without "All loaders".
Tests did not catch it: the FTB fixture in
Modpacks_all_loaders.test.tsxhad id and slug swapped, and no test listed CurseForge versions by slug.Fix
MODRINTH_MODPACK,CF_SLUG), asspecs/035-curseforge-modpacks/data-model.mdsays.slugfilter (scoped to the game and, for Minecraft, the mod or modpack class) before listing files. A numeric id makes no extra request. This also covers the install check that runs when "All loaders" switches the server version.No visual change, so no design export.
Tests
Modpacks_all_loaders.test.tsx: fixture corrected to the real FTB shape (id: "135",slug: "ftb-evolution-2"); the assertion that the install postsproject: "135"is unchanged.TestCurseforgeVersionsResolvesSlug: slug lookup, numeric id without lookup, unknown slug is an error.Both test changes were signed off by the maintainer before the push.
Not verified
The slug lookup follows CurseForge's documented
slugsearch parameter; it was not run against the live CurseForge API (no key in the build environment).Generated by Claude Code