Skip to content

fix: load modpack versions for FTB and CurseForge packs - #1153

Merged
ValgulNecron merged 4 commits into
masterfrom
fix/modpack-version-project-ids
Nov 28, 2026
Merged

ValgulNecron merged 4 commits into
masterfrom
fix/modpack-version-project-ids

Conversation

@ValgulNecron

Copy link
Copy Markdown
Member

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):

  • FTB only knows numeric pack ids, so the API refused the request: mod registry versions failed: ftb: invalid pack id "ftb-evolution-2".
  • CurseForge's /mods/{id}/files only takes the numeric project id, so it answered curseforge 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.tsx had id and slug swapped, and no test listed CurseForge versions by slug.

Fix

  • web: the Modpacks tab sends the numeric pack id for FTB. Modrinth and CurseForge keep the slug, which is what the game image installs by (MODRINTH_MODPACK, CF_SLUG), as specs/035-curseforge-modpacks/data-model.md says.
  • api: the CurseForge engine resolves a slug to the numeric id with the search endpoint's exact slug filter (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 posts project: "135" is unchanged.
  • New 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 slug search parameter; it was not run against the live CurseForge API (no key in the build environment).


Generated by Claude Code

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>
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f2e51f7 and 91e288b.

Files selected for processing: 5

  • api/internal/registry/curseforge.go
  • api/internal/registry/curseforge_modpack_test.go
  • changelog/unreleased/1153-modpack-version-project-ids.md
  • web/src/routes/tabs/Modpacks.tsx
  • web/src/routes/tabs/Modpacks_all_loaders.test.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@ValgulNecron ValgulNecron added type: fix Bug fix area: api REST/WebSocket gateway area: web React dashboard labels Nov 28, 2026 — with Claude
@ValgulNecron ValgulNecron self-assigned this Nov 28, 2026
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

CI Report - 91e288b

run 46166861670 - attempt 1

0 failed - 25 passed - 8 skipped - 47m7s elapsed

Test selection: partial - per-suite table

Coverage

no coverage/* commit statuses found on 91e288b

Changed

Area Files +/-
api/ 2 +90/-1
changelog/ 1 +7/-0
web/ 2 +4/-2

Slowest jobs

Job Duration
e2e telemetry / amd64 (kind) 23m16s
e2e telemetry / arm64 (kind) 23m11s
e2e postgres / amd64 (kind) 20m30s
e2e restricted-workloads / arm64 (kind) 15m43s
build e2e images 14m38s

e2e buckets run

api-agent, api-auth, api-mods, api-rbac, api-roles, backup-archives, backup-preparation, bot-fast, management-placement, monitoring, multicluster, network-isolation, operator, optional-components, postgres-availability, postgres-ha, postgres-pitr, ratelimit, recovery, restricted-workloads, sftp, standalone, telemetry, themes, upgrade, wake-hostport

@ValgulNecron
ValgulNecron merged commit 05a8ede into master Nov 28, 2026
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: api REST/WebSocket gateway area: web React dashboard type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants