[PR #1242] [MERGED] Launcher: Java mods in the mod browser, checked before install; Modpacks moves into Mods #3448

Closed
opened 2026-11-03 04:09:36 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1242
Author: @ludovic111
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @ludovic111

Base: main ← Head: feat/modbrowser-java-launcher


📝 Commits (7)

  • da996b9 port-pack: check one mod jar (Works, Partly, Doesn't run) from its content and classes
  • 4a350bb port-pack carry: leave out recipes for items it didn't declare
  • 3530560 Launcher: Java mods in the mod browser, checked before install; Modpacks moves into Mods
  • a3f81f3 Launcher: test a Java mod's install, dependencies, id clash and removal offline
  • b8f7924 Mod browser: CurseForge is coming soon
  • 9ae041c Merge origin/main into feat/modbrowser-java-verdicts
  • a5d68dc Merge feat/modbrowser-java-verdicts (now with main) into feat/modbrowser-java-launcher

📊 Changes

22 files changed (+2070 additions, -136 deletions)

View changed files

📝 crates/horizon-port-pack/src/carry.rs (+89 -0)
➕ crates/horizon-port-pack/src/check.rs (+411 -0)
➕ crates/horizon-port-pack/src/classes.rs (+642 -0)
📝 crates/horizon-port-pack/src/lib.rs (+2 -0)
📝 crates/horizon-port-pack/src/main.rs (+16 -1)
📝 docs/mod-browser.md (+55 -30)
📝 docs/modpacks.md (+16 -0)
📝 launcher/README.md (+5 -5)
📝 launcher/src/browser.rs (+66 -18)
📝 launcher/src/browser/curseforge.rs (+2 -1)
📝 launcher/src/browser/installed.rs (+33 -10)
📝 launcher/src/browser/installed/tests.rs (+83 -1)
➕ launcher/src/browser/java.rs (+340 -0)
📝 launcher/src/browser/modrinth.rs (+10 -0)
📝 launcher/src/browser/tests.rs (+58 -4)
📝 launcher/src/cli.rs (+71 -9)
📝 launcher/src/main.rs (+1 -4)
📝 launcher/src/modpacks.rs (+2 -1)
📝 launcher/src/modpacks_page.rs (+13 -20)
📝 launcher/src/mods_page.rs (+142 -29)

...and 2 more files

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Step 1 of brief modbrowser-java-1, part 2 of 2: Java mods in the launcher's mod browser. Stacked on #1230 (the check this calls); review that first, and this diff is against its branch.

What

  • Mods kind in the Mods page (Modrinth project type mod): Fabric, NeoForge, Forge and Quilt mods for 26.3, or with Show everything for 1.21 and later (the versions port-pack upgrades from).
  • A verdict before install. For each result the launcher picks the file it would install, downloads it with the existing checks (allowed hosts, HTTPS, size, sha512), runs horizon_port_pack::check::check in the background (two at a time), and shows Works, Partly or Doesn't run with what ports and what doesn't. The row says Checking meanwhile. Answers are cached by file checksum in mod-browser/checks-1/; the jar isn't kept. A Doesn't run mod is never offered for install.
  • Install (browser/java.rs) copies the carry to horizon-mods/<mod id>/, turns it on in horizon-mods.txt, installs its required mods that port, lists the ones that don't (libraries), refuses an id or namespace clash with an installed mod, and records the verdict and the "Not ported" lines in mod-browser.json, which the Installed list shows. Remove deletes the folder and turns it off.
  • Modpacks move into Mods: the Modpacks kind lists imported packs under the browser (modpacks_page::imported_packs), and the separate Modpacks page is gone (Ludovic's ask: one place).
  • CurseForge is coming soon (Ludovic, 2026-10-22: no paid key). The Mods page shows CurseForge (coming soon) beside the Modrinth switch, disabled and inert, the same pattern as the Microsoft account in #1236. browser::sources() is Modrinth only, so no search or install goes to CurseForge, and --source curseforge answers "CurseForge support is coming soon." Every text that asked for a key or an environment variable (launcher, docs/mod-browser.md, launcher/README.md, the website's mods and modpacks pages) now says CurseForge support is coming soon. Importing a CurseForge zip or instance still works, since that needs no key. The pack's jar line says files only CurseForge serves are "CurseForge downloads coming soon". The CurseForge source code is kept for later.
  • CLI: horizon-launcher mods search --kind mod, mods check <project> [--json], mods install prints what was skipped.
  • Docs: docs/mod-browser.md (Java mods), website/docs/mods.md (a section marked "next launcher release"), website/docs/modpacks.md.

Measured (Mac mini, debug launcher)

Step Time
mods check macaws-fences-and-walls, first time (download + check) 3.0 to 4.0 s
same, cached 0.26 s
mods install (carry copy, 198 files) 0.7 to 3.1 s
World load in the game, no mods / with the mod 5.4 s / 7.3 s (resources 1.1 s / 2.6 s: content root's first build)

The game itself isn't changed here: a player without Java mods loads exactly as before. The world numbers come from the end-to-end harness PR stacked on this one.

Not here

  • Screenshots: the Mac mini's screen was locked for the whole session (CGSSessionScreenIsLocked true), so the launcher window couldn't be captured. The CLI and the end-to-end harness cover the same paths.
  • Modpack import from the browser porting in one step, and the 3-pack measurements, are step 2.

Overlap with design-gaming-1

The launcher restyle (design-gaming-1) also moves Modpacks into Mods. My edits to shared files are small: main.rs removes Page::Modpacks (5 lines), and modpacks_page.rs only renames modpacks_page to imported_packs and drops its header. Everything is drawn with the existing shared components (button, segments, plate, caps, index_row, notice); no new styling. Whichever lands second takes the other's page list.

Self-check

  • cargo fmt --check, cargo clippy --features gpui/runtime_shaders --all-targets: clean
  • cargo test --features gpui/runtime_shaders (launcher): all pass (new: facets for mods, which Java versions are checked, mods parsed as results, check cache by checksum, the horizon-mods.txt on-list, CurseForge never a source, and an offline install through a fake source with real jars: ported and turned on, a library dependency listed as not ported, a second project with the same mod id refused, removal)
  • tools/parity.py --changed origin/main: the launcher isn't an input of any game harness

Needs Ludovic

Nothing.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1242 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/modbrowser-java-launcher` --- ### 📝 Commits (7) - [`da996b9`](https://github.com/horizon-rust/horizon/commit/da996b9fd13e02ab3e758393b6d428d4ef6f07d0) port-pack: check one mod jar (Works, Partly, Doesn't run) from its content and classes - [`4a350bb`](https://github.com/horizon-rust/horizon/commit/4a350bb0a03c64b34245ddd5e3f526de305988f2) port-pack carry: leave out recipes for items it didn't declare - [`3530560`](https://github.com/horizon-rust/horizon/commit/35305605819cece46b2c53bdc94cc9de5151bd80) Launcher: Java mods in the mod browser, checked before install; Modpacks moves into Mods - [`a3f81f3`](https://github.com/horizon-rust/horizon/commit/a3f81f3a30ec54d2cb84e806334db2db8a14684b) Launcher: test a Java mod's install, dependencies, id clash and removal offline - [`b8f7924`](https://github.com/horizon-rust/horizon/commit/b8f79247b865c2a4bba9d5e65803e280f581ceca) Mod browser: CurseForge is coming soon - [`9ae041c`](https://github.com/horizon-rust/horizon/commit/9ae041ccd3a2e674616503eae5008a5125d61496) Merge origin/main into feat/modbrowser-java-verdicts - [`a5d68dc`](https://github.com/horizon-rust/horizon/commit/a5d68dc8900d0d01806e606e1eb9bd9d69875e06) Merge feat/modbrowser-java-verdicts (now with main) into feat/modbrowser-java-launcher ### 📊 Changes **22 files changed** (+2070 additions, -136 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/carry.rs` (+89 -0) ➕ `crates/horizon-port-pack/src/check.rs` (+411 -0) ➕ `crates/horizon-port-pack/src/classes.rs` (+642 -0) 📝 `crates/horizon-port-pack/src/lib.rs` (+2 -0) 📝 `crates/horizon-port-pack/src/main.rs` (+16 -1) 📝 `docs/mod-browser.md` (+55 -30) 📝 `docs/modpacks.md` (+16 -0) 📝 `launcher/README.md` (+5 -5) 📝 `launcher/src/browser.rs` (+66 -18) 📝 `launcher/src/browser/curseforge.rs` (+2 -1) 📝 `launcher/src/browser/installed.rs` (+33 -10) 📝 `launcher/src/browser/installed/tests.rs` (+83 -1) ➕ `launcher/src/browser/java.rs` (+340 -0) 📝 `launcher/src/browser/modrinth.rs` (+10 -0) 📝 `launcher/src/browser/tests.rs` (+58 -4) 📝 `launcher/src/cli.rs` (+71 -9) 📝 `launcher/src/main.rs` (+1 -4) 📝 `launcher/src/modpacks.rs` (+2 -1) 📝 `launcher/src/modpacks_page.rs` (+13 -20) 📝 `launcher/src/mods_page.rs` (+142 -29) _...and 2 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Step 1 of brief modbrowser-java-1, part 2 of 2: Java mods in the launcher's mod browser. Stacked on #1230 (the `check` this calls); review that first, and this diff is against its branch. ## What - **Mods kind** in the Mods page (Modrinth project type `mod`): Fabric, NeoForge, Forge and Quilt mods for 26.3, or with **Show everything** for 1.21 and later (the versions port-pack upgrades from). - **A verdict before install.** For each result the launcher picks the file it would install, downloads it with the existing checks (allowed hosts, HTTPS, size, sha512), runs `horizon_port_pack::check::check` in the background (two at a time), and shows **Works**, **Partly** or **Doesn't run** with what ports and what doesn't. The row says **Checking** meanwhile. Answers are cached by file checksum in `mod-browser/checks-1/`; the jar isn't kept. A **Doesn't run** mod is never offered for install. - **Install** (`browser/java.rs`) copies the carry to `horizon-mods/<mod id>/`, turns it on in `horizon-mods.txt`, installs its required mods that port, lists the ones that don't (libraries), refuses an id or namespace clash with an installed mod, and records the verdict and the "Not ported" lines in `mod-browser.json`, which the Installed list shows. **Remove** deletes the folder and turns it off. - **Modpacks move into Mods**: the Modpacks kind lists imported packs under the browser (`modpacks_page::imported_packs`), and the separate Modpacks page is gone (Ludovic's ask: one place). - **CurseForge is coming soon** (Ludovic, 2026-10-22: no paid key). The Mods page shows **CurseForge (coming soon)** beside the Modrinth switch, disabled and inert, the same pattern as the Microsoft account in #1236. `browser::sources()` is Modrinth only, so no search or install goes to CurseForge, and `--source curseforge` answers "CurseForge support is coming soon." Every text that asked for a key or an environment variable (launcher, `docs/mod-browser.md`, `launcher/README.md`, the website's mods and modpacks pages) now says CurseForge support is coming soon. Importing a CurseForge zip or instance still works, since that needs no key. The pack's jar line says files only CurseForge serves are "CurseForge downloads coming soon". The CurseForge source code is kept for later. - **CLI**: `horizon-launcher mods search --kind mod`, `mods check <project> [--json]`, `mods install` prints what was skipped. - Docs: `docs/mod-browser.md` (Java mods), `website/docs/mods.md` (a section marked "next launcher release"), `website/docs/modpacks.md`. ## Measured (Mac mini, debug launcher) | Step | Time | |---|---| | `mods check macaws-fences-and-walls`, first time (download + check) | 3.0 to 4.0 s | | same, cached | 0.26 s | | `mods install` (carry copy, 198 files) | 0.7 to 3.1 s | | World load in the game, no mods / with the mod | 5.4 s / 7.3 s (resources 1.1 s / 2.6 s: content root's first build) | The game itself isn't changed here: a player without Java mods loads exactly as before. The world numbers come from the end-to-end harness PR stacked on this one. ## Not here - Screenshots: the Mac mini's screen was locked for the whole session (`CGSSessionScreenIsLocked` true), so the launcher window couldn't be captured. The CLI and the end-to-end harness cover the same paths. - Modpack import from the browser porting in one step, and the 3-pack measurements, are step 2. ## Overlap with design-gaming-1 The launcher restyle (design-gaming-1) also moves Modpacks into Mods. My edits to shared files are small: `main.rs` removes `Page::Modpacks` (5 lines), and `modpacks_page.rs` only renames `modpacks_page` to `imported_packs` and drops its header. Everything is drawn with the existing shared components (`button`, `segments`, `plate`, `caps`, `index_row`, `notice`); no new styling. Whichever lands second takes the other's page list. ## Self-check - `cargo fmt --check`, `cargo clippy --features gpui/runtime_shaders --all-targets`: clean - `cargo test --features gpui/runtime_shaders` (launcher): all pass (new: facets for mods, which Java versions are checked, mods parsed as results, check cache by checksum, the `horizon-mods.txt` on-list, CurseForge never a source, and an offline install through a fake source with real jars: ported and turned on, a library dependency listed as not ported, a second project with the same mod id refused, removal) - `tools/parity.py --changed origin/main`: the launcher isn't an input of any game harness ## Needs Ludovic Nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:09:36 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
horizon-rust/horizon#3448
No description provided.