feat(mods): tag mods that load last and say the load order #418

Merged
HumanBean merged 3 commits from HumanBean/LongshotLauncher:feat/mod-order-last into main 2026-12-04 21:28:34 +00:00
Owner

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.

  • A mod with order = "last" is tagged Loads last in the list.
  • Notes under the list: your mods load top to bottom, after the built-in ones, and a lower mod wins a shared file; mods marked Loads last stay at the bottom (when there is one). Not shown for local folders, whose rows are not the load order.
  • A held mod (pointer, keyboard or controller) stops at the line between the two groups, and Earlier / Later do not cross it.
  • The three new strings are translated in 13 language files. Claude wrote the translations; no speaker has checked them.

The launcher reads the field from the builder's mod installed output, 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 -- --check and locked Clippy with -D warnings. The new test is no_move_passes_a_mod_that_loads_last. Not tried on Windows or macOS, or in a live launcher window.

The Mods page with a mod tagged Loads last and the two notes

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

A mod can now ask to load last with `order = "last"` ([MagicBeanDev/Longshot#3192](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/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. - A mod with `order = "last"` is tagged **Loads last** in the list. - Notes under the list: your mods load top to bottom, after the built-in ones, and a lower mod wins a shared file; mods marked Loads last stay at the bottom (when there is one). Not shown for local folders, whose rows are not the load order. - A held mod (pointer, keyboard or controller) stops at the line between the two groups, and **Earlier** / **Later** do not cross it. - The three new strings are translated in 13 language files. Claude wrote the translations; no speaker has checked them. The launcher reads the field from the builder's `mod installed` output, 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 -- --check` and locked Clippy with `-D warnings`. The new test is `no_move_passes_a_mod_that_loads_last`. Not tried on Windows or macOS, or in a live launcher window. ![The Mods page with a mod tagged Loads last and the two notes](https://git.magicbean.dev/attachments/a2449625-7a6b-400a-8e72-8d372e7399a8) 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](https://claude.com/claude-code)
feat(mods): tag mods that load last and say the load order
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
925f5a0615
A mod with order = "last" is tagged in the Installed list, no move passes between it and the others, and a note under
the list says which of two mods wins.

Assisted-by: Claude Code
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Author
Owner

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.

mods-list.png

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. ![mods-list.png](https://git.magicbean.dev/attachments/53f10d69-104f-4488-8ac1-34c0abded6d4)
HumanBean changed title from WIP: feat(mods): tag mods that load last and say the load order to feat(mods): tag mods that load last and say the load order 2026-12-04 20:31:05 +00:00
BeanBot left a comment

Recommendation: 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.

  1. L1 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.

  • L2 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.
  • L3 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)

  • L4 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.

@fix can do L1, L2 and L3.

Questions (1) (not confirmed from the code; they don't hold the recommendation)

  • Does the supporting builder always return player mods grouped by order in its installed response, including disabled mods?

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: 925f5a0615 against d43730230b: 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:

  • The commit has AI-assistance trailers.
  • The screenshot is described as using invented mods, and the diff contains no game-derived assets.
  • The new unit test checks both directions across the group boundary and a permitted move within a group.
  • The 13 catalog diffs contain the three new keys.

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.

**Recommendation: 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. 1. **L1** `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. - **L2** `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. - **L3** `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) - **L4** `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. `@fix` can do L1, L2 and L3. **Questions (1)** (not confirmed from the code; they don't hold the recommendation) - Does the supporting builder always return player mods grouped by order in its installed response, including disabled mods? **Checks:** Still running: 5 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **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:** 925f5a0615f4 against d43730230b94: 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:** - The commit has AI-assistance trailers. - The screenshot is described as using invented mods, and the diff contains no game-derived assets. - The new unit test checks both directions across the group boundary and a permitted move within a group. - The 13 catalog diffs contain the three new keys. **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. </details> --- <sub>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.</sub>
@ -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))
Member

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.

**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.
ui/mods.slint Outdated
@ -1615,2 +1625,4 @@
}
}
// (under the list: which of two mods wins)
if Mods.section == "installed" && Mods.own-count > 1: CopyText {
Member

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.

**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.
ui/mods.slint Outdated
@ -1617,0 +1630,4 @@
color: Ink.muted;
font-size: 13px;
}
if Mods.section == "installed" && Mods.own-count > 1 && Mods.any-last: CopyText {
Member

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.

**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.
Author
Owner

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.

mods-list.png

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. ![mods-list.png](https://git.magicbean.dev/attachments/2d767466-2aa4-42c9-8c8e-3fd6d4022da9)
fix(mods): the Loads last tag follows the mod's source line
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
e891254518
In the right column it pushed the switch and the â‹® below the row's centre.

Assisted-by: Claude Code
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Author
Owner

BeanBot's L1 to L3 are fixed:

  • L1: the note now reads "Your mods load top to bottom, after the built-in ones. A lower mod wins a file two mods have." Both notes are hidden for local folders (a builder with no mod tools).
  • L2: a held mod stops at the loads-last line, by pointer and by keys or controller (ReorderList has a split).
  • L3: the Loads last note shows with a single mod too.

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.

drag-held.png

BeanBot's L1 to L3 are fixed: - **L1:** the note now reads "Your mods load top to bottom, after the built-in ones. A lower mod wins a file two mods have." Both notes are hidden for local folders (a builder with no mod tools). - **L2:** a held mod stops at the loads-last line, by pointer and by keys or controller (`ReorderList` has a `split`). - **L3:** the Loads last note shows with a single mod too. 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. ![drag-held.png](https://git.magicbean.dev/attachments/21bc7675-74db-4857-95eb-28d55655e75d)
fix(mods): the order note speaks of your mods, and a drag stops at the loads-last line
All checks were successful
CI / What the change needs (pull_request) Successful in 4s
PR title / Conventional Commit title (pull_request) Successful in 5s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 9s
CI / Rust formatting, lint and tests (pull_request) Successful in 15m40s
CI / Release packages and stable upgrades (pull_request) Successful in 36m31s
966fa67af1
Built-in mods are listed under the player's own but load first. A held mod could be dragged past the line, showing a
move that was then dropped. The note is hidden for local folders, whose rows are not the load order, and a lone mod
that loads last has its tag explained.

Assisted-by: Claude Code
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Author
Owner

The list as it is now (off-screen render, made-up mods).

mods-list.png

The list as it is now (off-screen render, made-up mods). ![mods-list.png](https://git.magicbean.dev/attachments/a2449625-7a6b-400a-8e72-8d372e7399a8)
Author
Owner
@review
BeanBot left a comment

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)

  • L4 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)
  • The translations were generated without speaker review.
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: 966fa67af1 against d43730230b: 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:

  • The reorder guard still rejects moves across the boundary before saving.
  • The default split permits all rows to move when there is only one group.
  • The description includes screenshots and reports the limits of its testing.

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.

**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) - **L4** `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 925f5a0615f4) 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. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - The translations were generated without speaker review. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **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:** 966fa67af1d6 against d43730230b94: 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:** - The reorder guard still rejects moves across the boundary before saving. - The default split permits all rows to move when there is only one group. - The description includes screenshots and reports the limits of its testing. **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. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch feat/mod-order-last 2026-12-04 21:28:35 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!418
No description provided.