feat(mods): tag mods that load last and say the load order #418
No reviewers
Labels
No labels
area/build
area/install
area/mods
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!418
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:feat/mod-order-last"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A mod can now ask to load last with
order = "last"(MagicBeanDev/Longshot#3192, for randomizers that generate a new mod each time). The Mods page should say which mods did, and which end of the list wins, instead of offering moves that will not stick.order = "last"is tagged Loads last in the list.The launcher reads the field from the builder's
mod installedoutput, and the order itself is the builder's. With a Longshot that does not have #3192, no mod is tagged and nothing changes but the first note.Checks on Linux:
python -I tests/test_launcher_core.py(410 passed, 2 ignored; in its own PID namespace, away from other sessions' builders),Tooling/tests/test_release.py(46 passed),cargo fmt --all -- --checkand locked Clippy with-D warnings. The new test isno_move_passes_a_mod_that_loads_last. Not tried on Windows or macOS, or in a live launcher window.The picture is an off-screen render of the Mods page with two made-up mods; no game files are involved.
🤖 Generated with Claude Code
The Mods page with two made-up mods, "HD Grass" and "Randomizer" (the latter has
order = "last"): the tag, the two notes, and Earlier / Later off for the mod above the line. Off-screen render, no game files involved.WIP: feat(mods): tag mods that load last and say the load orderto feat(mods): tag mods that load last and say the load orderRecommendation: Request changes. The new load-order note can give players the wrong winner, and dragging or keyboard reordering still previews moves across the boundary before silently discarding them.
The change labels mods that request the final load group and disables the side-card moves across its boundary. It adds useful guidance, but the guidance does not account for built-in mods or the local-folder fallback, and the drag interaction does not enforce the boundary while a mod is held.
Blocking (1): must change before merging.
ui/mods.slint:1628: The note describes the displayed list as load order even when it is not. (more on the line) Do: Describe the order as applying only to the player-mod list, explain that built-in mods load first, and hide the claim in local-folder mode unless its actual order is known.Should fix (2): not blocking, but worth doing before merging.
src/mods/reorder.rs:123: The boundary is checked only after a drag or keyboard move has already been displayed. (more on the line) Do: Limit the reorder widget's target to the selected mod's group for both pointer and keyboard/controller moves, and test the interaction at the boundary.ui/mods.slint:1633: The explanation of the Loads last tag is hidden when there is only one player mod. (more on the line) Do: Show the Loads last note whenever an installed player mod has the tag, independently of the number of player mods.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
ui/mods.slint:1563: The new behavior has not been exercised in a live launcher with a builder that supplies the new field. When: The reported test constructs rows directly and the screenshot is an off-screen render, so neither verifies the builder response through to the tag and all reorder controls. Do: Run the launcher once with a supporting builder and ordinary and Loads last mods; check the tag, both notes, and pointer, keyboard/controller and side-card moves within and across the groups.@fixcan do L1, L2 and L3.Questions (1) (not confirmed from the code; they don't hold the recommendation)
Checks: Still running: 5 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven: the reported Linux checks and off-screen screenshot do not exercise a live launcher with a builder that supports order = "last".
Other systems: The change affects the Installed page on Windows and Linux, including the fallback used when the builder lacks mod tools. Built-in mods are displayed after player mods despite loading first. No live interaction run was reported.
Switches: None.
Reviewed:
925f5a0615againstd43730230b: Read AGENTS.md, CONTRIBUTING.md, the commit and diff, the changed reorder logic and its callers, and the relevant view, Slint, builder fallback and reorder-widget code. Skimmed the translation changes and reported screenshot and runs; the full view.rs and mods.slint output was truncated, so those files were not read in full. No review checklist or pull request template was found.; nothing run (a code review).Checked and fine:
Testing: No commands from the project or tests were run. The author reports 410 launcher checks passing, 46 release checks passing, formatting and Clippy passing on Linux, plus an off-screen screenshot; CI is still running.
Overlaps and merge order: Longshot#3192 supplies the builder behavior this feature reads; its merge status was not available in the checkout.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.
@ -120,2 +120,4 @@|| to >= own|| row["loose"] == true// (nothing passes between the mods that load last and the others)|| self.rows.get(to).is_some_and(|other| loads_last(other) != loads_last(row))L2 (should fix): The boundary is checked only after a drag or keyboard move has already been displayed.
When: A player can drag or nudge a normal mod below a Loads last mod and see the other rows slide into the proposed order. Dropping it calls begin_reorder, which rejects it silently, so the list snaps back without explaining why.
Do: Limit the reorder widget's target to the selected mod's group for both pointer and keyboard/controller moves, and test the interaction at the boundary.
@ -1615,2 +1625,4 @@}}// (under the list: which of two mods wins)if Mods.section == "installed" && Mods.own-count > 1: CopyText {L1 (blocking): The note describes the displayed list as load order even when it is not.
When: When the built-in group is expanded, it appears below player mods, but built-in mods load first; a player comparing a built-in mod with a player mod is told the wrong file wins. In local-folder mode the rows are sorted by folder and do not come from the builder's load order, yet the same note is shown.
Do: Describe the order as applying only to the player-mod list, explain that built-in mods load first, and hide the claim in local-folder mode unless its actual order is known.
@ -1617,0 +1630,4 @@color: Ink.muted;font-size: 13px;}if Mods.section == "installed" && Mods.own-count > 1 && Mods.any-last: CopyText {L3 (should fix): The explanation of the Loads last tag is hidden when there is only one player mod.
When: With a single randomizer marked Loads last, its tag is shown but the note explaining that marked mods stay at the bottom is absent.
Do: Show the Loads last note whenever an installed player mod has the tag, independently of the number of player mods.
Moved the Loads last tag after "Your own", so the switch and â‹® stay centred in the row. New render (made-up mods); this replaces the earlier picture.
BeanBot's L1 to L3 are fixed:
ReorderListhas asplit).Below, an off-screen render with made-up mods: HD Grass dragged far below Randomizer stays above it. The keyboard path uses the same limit but was not driven. L4 (a live launcher with a builder that has Longshot#3192) is still not done.
The list as it is now (off-screen render, made-up mods).
@review
Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The notes and reorder boundary now address the reported defects, but the integrated behavior still needs a live launcher run with a builder that supplies the new field. Recommend approval; not approved on the forge.
The Mods page identifies mods that load last, explains the load order, and prevents moves across the boundary. The fix keeps that behavior while making the explanation accurate and constraining held rows.
Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
ui/mods.slint:1563: The new behavior has not been exercised in a live launcher with a builder that supplies the new field. When: The reported test constructs rows directly and the screenshot is an off-screen render, so neither verifies the builder response through to the tag and all reorder controls. Do: Run the launcher once with a supporting builder and ordinary and Loads last mods; check the tag, both notes, and pointer, keyboard/controller and side-card moves within and across the groups.Since the last review (on
925f5a0615)Resolved: L1 (The note describes the displayed list as load order even when it is not.); L2 (The boundary is checked only after a drag or keyboard move has already been displayed.); L3 (The explanation of the Loads last tag is hidden when there is only one player mod.)
Still open: L4 (The new behavior has not been exercised in a live launcher with a builder that supplies th…)
Checks: Still running: 5 checks.
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven: the author reports an off-screen pointer render and passing automated checks, but has not exercised the integrated behavior in a live launcher with the new builder field.
Other systems: The boundary is shared by pointer, keyboard and controller interactions. Local-folder mode hides the load-order notes; older builders without the field leave mods untagged. Windows and macOS have not been tried.
Switches: None.
Reviewed:
966fa67af1againstd43730230b: Read repository rules, the PR diff and the reorder implementation; inspected the changed UI and model paths and skimmed translation changes. The remaining changed files and surrounding code were not read in full.; nothing run (a code review).Checked and fine:
Testing: The author reports 410 launcher tests passed, 2 ignored, 46 release tests passed, formatting and locked Clippy checks; CI is still running. No tests were run during this read-only review.
Overlaps and merge order: Longshot#3192 supplies the builder field used by this feature.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.