Repository navigation
fix: put a modpack back on its own platform from the migration plan - #556
Merged
Merged
Conversation
A pack-owned mod the loader refuses ended in "change it from the modpack update flow" - a dead end when the pack card reads "up to date", which is exactly the state of an instance re-versioned with its pack left attached (Fabulously Optimized 14.0.0-beta.4 targets 26.2 in an instance on 26.1.1). The plan now lists the pack's versions when such a row exists and returns a PackVerdict: whether the instance left the installed version's platform (Minecraft first; loader only where the source lists loaders), the entry a restore re-applies, and how many other versions fit the instance. A failed request or a delisted version is Unavailable, never a platform claim. The stranded section opens with a block for the pack: "Restore Minecraft 26.2" re-applies the installed version through the update flow, which writes the pack's Minecraft and loader back; "Pick another modpack version" deep-links the drawer's switch dialog pre-filtered to the instance's platform. The new PackPlatformRestoreDialog confirm offers "Back up worlds first" like the update and switch confirms do (on by default: the worlds move to another Minecraft version). Re-landed from feat/pack-origin-remedy (2026-09-16) on current main: the Manage window is gone, so the Settings tab's Game section re-reads the instance record after the dialog applies; LoaderPicker keeps main's #422 contract; the restore holds the plan's Apply while its confirm is open.
… update Review findings on the re-landed restore: - The dialog marked a pack update as its own for good once it started a restore, so a later update from the drawer ended without the re-plan it needs. The end of its own task now consumes the mark, and a restore that never reached the queue clears it. - A restore queued behind another task of the instance (a game install) did not hold the plan's writes in a reopened dialog: the check asked for the instance's first active task only. It now looks for any active pack update of the instance. - A bridge failure while reading the instance for a restore now says why instead of ending the click in silence. - An entry that names no Minecraft version no longer reads as built for another one, and a pack whose name or version the profile did not record is named after the profile and the list entry, never the project id.
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.
Summary
A modpack-owned mod the loader refuses used to end in the migration plan with «change it from the modpack update flow» — a dead end, because the pack card reads "up to date" in exactly the state that produces it: an instance re-versioned with its pack left attached (the maintainer's case: Fabulously Optimized 14.0.0-beta.4 targets 26.2, the instance runs 26.1.1).
The plan now says what the pack is built for and offers the remedy:
mods_plan_mc_migrationlists the pack's versions (one request, same network chokepoint, interactive priority) and returnsMcMigrationPlan.pack: PackVerdict.Knownsays whether Minecraft and/or the loader differ (the loader only where the source lists loaders; an entry with no Minecraft tag cannot contradict either) and how many other versions fit the instance. A failed request or a delisted version isUnavailable, never a platform claim.Unavailablesays the check failed and offers a retry.PackPlatformRestoreDialog: the MC / loader risk, the file list only when the diff has files, "already matches" when the archive turns out to match, and «Back up worlds first» — the same choice, copy and default as the update and switch confirms (on: the worlds move to another Minecraft version).Re-landed from
feat/pack-origin-remedy(2026-09-16)That branch (designed, reviewed, never verified or PR'd) sat 143 commits behind main. Squash-merged onto
origin/mainand adapted:ManageInstancesModalis gone (feat: instance settings are a tab next to Screenshots #510): the Settings tab's Game section re-reads the instance record after the dialog applies (a restore rewrites Minecraft / loader before the page refetch lands); the page refetches oninstancesChanged, so the Installed view's opener needed nothing.LoaderPickerkeeps fix(instances): a declined or failed loader change no longer stays on screen #422's contract; the branch's flag and its duplicate test are dropped.busyis nowrunning; the dialog locks onphase !== 'idle'so the plan's Apply stays shut while the restore's confirm is open.Review findings fixed (second commit)
taskForreturns the first active task of a scope).Test plan
migration-plan-dialog,pack-platform-restore-dialog,instance-game-section,modpack-version-list,imported-view; Rust unit tests forpack_verdict(incl. empty game tag, unrecorded version). One new test seen red → green locally (instance-game-section"keys the rescan by the platform the record now has"); everything else is CI's.2eee2a9e(dev build, own identifier + data root, torn down after): imported Fabulously Optimized 14.1.2 (26.2), switched the profile to 26.1.2 keeping the pack, added a world → Overview «35 mods won't let the game start» → «Fix incompatible» → the pack block («built for Minecraft 26.2», Restore + «16 for Minecraft 26.1.2 · Fabric»), every pack row «fixes with the button above» → Restore → confirm (MC 26.1.2 → 26.2 risk, «no mod files change», backup ticked, 1 world) → applied: profile on 26.2 / Fabric 0.20.1 (the pack's own), a backup zip of the world exists, the plan re-planned to «nothing to move», the Installed list dropped its problems box. Re-versioned again → «Pick another version» opened the drawer's switch dialog filtered to 26.1.2. The merge oforigin/mainafter that run brought onlyzh_Hans.json.Follow-ups (not in this PR)
SwitchRiskList's MC-change copy says «after switching» also inside the restore confirm.zh_Hansstill has the oldmods.migration.reason.packOrigintext; Weblate should flag it as the source changed.