Repository navigation
fix: a modpack with every mod inside it imports - #528
Merged
Merged
Conversation
Found by the v0.28 regression pass (F5). Lucerna's own CurseForge export
of an instance whose mods came from Modrinth or from disk bundles every
jar in overrides/ and lists no files; a .mrpack of an all-local instance
does the same.
- modpack/curseforge.rs posted {"fileIds": []} to CurseForge, which
answers 400, so the pack's preview never opened. A pack that lists no
files now asks nothing and needs no key. A listed set is resolved in
batches of cf_api::CF_MAX_BULK_FILE_IDS (100), as the sibling clients
do; the first failing batch fails the parse.
- With the preview open, Install stayed disabled («0 selected») and the
backend refused an empty selection (both since v0.5.0). «Choose at
least one mod» now applies only to a pack that lists files
(import::selection_refusal); the picker offers a plain Install for a
pack that lists none. The picker test that pinned «0 files → disabled»
is replaced by one that picks none of the listed files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. The selection rule now takes the summary: a pack that lists no files imports what its overrides bundle, one with only unresolvable mods imports for manual completion, and one with neither has nothing to install and is refused. The picker mirrors it, replacing the empty «0 of 0 selected» row with a note. Adds a round-trip test that imports Lucerna's own CurseForge export, tightens the failed-batch test, and stops claiming a measured 400 above 100 ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…files # Conflicts: # CHANGELOG.md # src/lib/changelog/locales/ru.md
AntonBabchenko
enabled auto-merge (squash)
October 18, 2026 06:26
Merged
1 of 2 tasks
AntonBabchenko
added a commit
that referenced
this pull request
Oct 18, 2026
Bump package.json, tauri.conf.json, Cargo.toml and Cargo.lock (the lucerna entry only) to 0.28.0 and cut [Unreleased] into [0.28.0] — 2026-10-18 (EN + RU) with its compare links. Range v0.27.0..e2d0909 (#503–#528); the section was audited in #525. Last re-audit, for #526–#528: - #527's two Fixed bullets (borderless dialog fields, "No results." under a failed search) and #528's (a modpack with only bundled mods) describe defects present at v0.27.0, so they stay in Fixed. #528's quoted error was #513's new wording; a v0.27.0 user saw a generic mod-service message, so the bullet now says "an error from CurseForge". - #526 made built-differently files notes everywhere and Repair optional: the Forge Changed bullet now says the files are noted, can be left, and Repair rebuilds them if you want. #526 and #527's F3/F4 fix flows new in this window: no bullet. - Fixed is reordered by theme (the three new bullets join their neighbours). Result: Added 7, Changed 4, Fixed 15, Security 2, EN/RU in parity. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
What was wrong
Found by the v0.28 regression pass (finding F5). Lucerna's own CurseForge
.zipexport of an instance whose mods all came from Modrinth or from disk bundles every jar inoverrides/and writes"files": []. Importing it back failed in two places:mods/modpack/curseforge.rs::parsealways posted{"fileIds": [...]}toPOST /v1/mods/files, also for an empty list, and required a CurseForge key first. CurseForge answers HTTP 400 to the empty list, so the preview never opened: «api.curseforge.com refused the request (error 400)» (seen inlucerna.log).ImportPickerDialog:disabled={selectedShas.length === 0}), and the backend refused an empty selection too (import.rs:selected_shas.is_empty() → ModpackNoFilesSelected). A.mrpackwhose mods all ride inoverrides/hits the same wall.When it was born
Not a v0.28 regression. All three spots are identical at
v0.27.0and date from 703c05c (v0.5.0), when every pack listed files; the POST moved tonetwork::in 13fa3d2 (v0.6.0) unchanged in this respect. The export's classification (export/classify.rs) is unchanged since v0.27.0, and this is not the zip 9 bump (#516): the failure is an API request, not archive reading. So it shipped in v0.27.0 and earlier, and the changelog bullet goes under Fixed (with its Russian twin).Fix
parse: no file entries → no request and no key needed; the summary lists the overrides as usual. With entries, the bulk POST goes in batches ofcf_api::CF_MAX_BULK_FILE_IDS(the limit the sibling clientscf_api::resolve_filesandmods/curseforge::versions_by_idsalready batch by), stitched in order; a failed batch fails the parse with that batch's error (no partial summary).import::selection_refusal(&summary, selected): «choose at least one» applies only when the pack lists files. A pack that lists none imports what its overrides bundle; one with only unresolvable mods imports so the manual-completion flow can run; one with none of these has nothing to install and is refused (ModpackNoFilesSelected, no new error variant, no bindings change).ImportPickerDialogmirrors the rule: plain «Install» for a pack that lists no files, a note in place of «0 of 0 selected» and the select-all box, and Install off with «This pack has nothing to install.» for an empty pack.Fallback discipline
The empty-list skip is not a fallback: there is nothing to ask. A failed batch is not swallowed (
a_failed_batch_fails_the_parseasserts the 503 and that the second POST is the one that failed). The «nothing to install» case resolves to the restrictive answer.Tests
lucernas_own_curseforge_export_imports: round trip through the export's own pieces (classify→build_cf_manifest→write_archive) of an instance with a Modrinth mod, thenparseagainst a mock that must receive no request, thenselection_refusal. Red with the old parse (mutation-checked).a_pack_with_no_file_entries_asks_curseforge_nothing,more_than_a_batch_of_entries_is_resolved_in_batches(posts[100, 50]),a_failed_batch_fails_the_parse.selection_refusal: no files + overrides, client overrides only, unresolvable only, nothing at all, files with none / one selected.Live check
Dev launcher on the final head, isolated data root:
smoke-fab120-cf.zip(Lucerna's own CF export, 3 mods,"files": []) previews with the bundled note and plain «Install», imports as a new instance with its three mods.cargo-deny
No dependency change.
🤖 Generated with Claude Code