ModpackApiService: regex extracts semver from CurseForge displayName "All the Mods 9-0.1.0" → version: "0.1.0", display_name: full string Widget: short name + version helpers "All the Mods 9 - ATM9" → "ATM9" Display: "ATM9 0.1.0 → 1.0.0 ↑" (update) or "✓ ATM9 — 1.0.0" (current) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.0 KiB
MSG-2026-04-13-version-display-format
From: Chronicler #85
Date: 2026-04-13
Priority: MEDIUM — cosmetic but ships with live panel deploy today
Status: OPEN
Problem
Current update display in wrapper.tsx line 160:
↑ {data.current_version} → {data.latest_version}
Outputs: ↑ 1.0.0 → All the Mods 9-0.1.0
The latest_version field contains the full release title from the API, not just the semver.
Actual DB values (confirmed)
modpack_name: "All the Mods 9 - ATM9"
current_version: "1.0.0"
latest_version: "All the Mods 9-0.1.0"
Desired Output
↑ ATM9 1.0.0 → 0.1.0
Logic Needed
Two helper extractions in the TSX (or a utility function):
-
Short name — extract the part after
-inmodpack_name:"All the Mods 9 - ATM9"→"ATM9"- Fallback: use full
modpack_nameif no-present
-
Short version — extract the part after the last
-inlatest_version:"All the Mods 9-0.1.0"→"0.1.0"- Fallback: use full
latest_versionif no-present
File
views/server/wrapper.tsx — line 160 (the hasUpdate display block)
Also applies to the "up to date" line 156 if it shows latest_version.
After Code Pushes
Chronicler will copy wrapper.tsx to Dev Panel, rebuild frontend, verify display.
CORRECTION (Chronicler #85 update)
The DB values are actually stored backwards:
current_version: "1.0.0" ← this is the LATEST from the API
latest_version: "All the Mods 9-0.1.0" ← this is what's INSTALLED
Test server has 0.1.0 installed, and 1.0.0 is the latest available.
So there are TWO issues:
- Cron bug —
current_versionandlatest_versionare being stored in the wrong columns - Display — once fixed, should read:
ATM9 0.1.0 → 1.0.0 ↑
Please check CheckModpackUpdates.php — the assignment of which value goes into current_version vs latest_version when writing to modpackchecker_servers.