[PR #3855] [MERGED] Launcher: native mods are on by default; Build moves to the Mods page #5251

Closed
opened 2026-11-03 05:11:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3855
Author: @levzzz5154
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @levzzz5154

Base: main ← Head: launcher/native-mods-on-by-default


📝 Commits (5)

  • aba29be Launcher: native mods are on by default; Build moves to the Mods page
  • 32e8e51 Merge main into native-mods-on-by-default
  • ddf1be8 Launcher i18n: drop removed native-mods strings, add Polish for the new ones
  • d2c4e9a Merge main into native-mods-on-by-default; the version-mismatch panel moves to the Mods page's Native build row
  • a82a281 Merge main into native-mods-on-by-default; GitHub installs no longer set the removed switch; Up to date compares each mod's files

📊 Changes

17 files changed (+409 additions, -214 deletions)

View changed files

📝 docs/launcher-commands.md (+1 -1)
📝 docs/native-mods.md (+16 -11)
📝 launcher/lang/de.json (+5 -5)
📝 launcher/lang/es.json (+5 -5)
📝 launcher/lang/fr.json (+5 -5)
📝 launcher/lang/pl.json (+5 -5)
📝 launcher/lang/ru.json (+5 -5)
📝 launcher/lang/uk.json (+5 -5)
📝 launcher/lang/zh.json (+5 -5)
📝 launcher/src/backend.rs (+2 -6)
📝 launcher/src/cli.rs (+9 -15)
📝 launcher/src/github_mods_page.rs (+1 -2)
📝 launcher/src/lib.rs (+1 -0)
📝 launcher/src/main.rs (+4 -59)
📝 launcher/src/mods_page.rs (+96 -27)
📝 launcher/src/native_mods.rs (+21 -58)
➕ launcher/src/native_status.rs (+223 -0)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Opus 5.5), not by levzzz5154 themselves.

Native mods stop being an experimental setting: they are always on, and their build status and Build button move from Settings to the Mods page, beside the mods. Second of the launcher native-mods rework (levzzz5154's decisions); the build logic itself (same-instance builds, keeping the revision, incremental) is a separate PR and untouched here.

What players see

  • Settings → Game no longer has "Native mods (experimental)".
  • Mods page → Installed has a Native build row for the selected instance whenever it has native mods:
    • the build's step while it runs, or its error in red;
    • Build when the version the instance plays doesn't hold the native mods turned on: it isn't a native-* build, or the mods of its native-mods.json differ from the ones turned on (by id and version);
    • "Up to date: {instance} plays these mods." otherwise.
    • Build still opens the red warning and builds only from "I trust these mods: build".
  • First native install: a plain trust notice, shown once ("Native mods aren't sandboxed… Install only mods whose authors you trust… build the game on the Mods page…"), with Install / Cancel. It no longer turns anything on. mods install prints it too.
  • After an install a native mod says "Installed Veinminer 0.3.0 into {instance}. Build to play with it." instead of "into horizon-mods and turned it on".

Code

  • native_status.rs (new): state(enabled, built), a pure comparison, unit-tested; enabled(home) reads the .hnmods turned on; built(version) reads native-mods.json; fingerprint lets the Mods page re-read only when the folder, the on/off list or the version changes. Also NOTICE and is_native_file.
  • native_mods.rs: drops turns_on, needs_notice, the old NOTICE and their test; the build is untouched.
  • backend.rs (needs @ludovic111's code-owner review): removes Settings::native_mods (serde ignores the key in older files; a test reads one) and re-documents native_mods_noticed. 3 lines.
  • main.rs: native_mods_row goes; native_warning and build_native stay and are used from mods_page.rs.
  • Translations: the removed strings go and the new ones are added in all six languages.
  • Docs: docs/native-mods.md, and docs/launcher-commands.md regenerated.

Left for follow-ups: indicators of which instance a mod is installed in, and a list of builds. Until the build PR lands, a build of the default "Horizon" instance still goes to the "Native mods" instance, so that instance's row keeps offering Build.

Checks

cd launcher && cargo +stable fmt --check && cargo +stable clippy --all-targets -- -D warnings && cargo +stable test
test result: ok. 278 passed; 0 failed; 3 ignored   (lib, incl. native_status::tests and the i18n table test)
test result: ok. 46 passed; 0 failed               (bin)

Run in the window with an isolated launcher home and game home (HORIZON_LAUNCHER_PAGE=mods, a native mod turned on): the row shows Build with no native build, and "Up to date" once the selected version's native-mods.json lists the mod.

🤖 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/3855 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `launcher/native-mods-on-by-default` --- ### 📝 Commits (5) - [`aba29be`](https://github.com/horizon-rust/horizon/commit/aba29be6af0480c0663992641ef32940ea1e938e) Launcher: native mods are on by default; Build moves to the Mods page - [`32e8e51`](https://github.com/horizon-rust/horizon/commit/32e8e51cfc9f0dad59f7ff5626fefc5f7189261c) Merge main into native-mods-on-by-default - [`ddf1be8`](https://github.com/horizon-rust/horizon/commit/ddf1be8050a000840e131121207f8954b29d6a9e) Launcher i18n: drop removed native-mods strings, add Polish for the new ones - [`d2c4e9a`](https://github.com/horizon-rust/horizon/commit/d2c4e9ac8789102310308e8b75538cfa8c0ad529) Merge main into native-mods-on-by-default; the version-mismatch panel moves to the Mods page's Native build row - [`a82a281`](https://github.com/horizon-rust/horizon/commit/a82a28179d9513710e5df15a0db0a53ce8cd5aa4) Merge main into native-mods-on-by-default; GitHub installs no longer set the removed switch; Up to date compares each mod's files ### 📊 Changes **17 files changed** (+409 additions, -214 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+1 -1) 📝 `docs/native-mods.md` (+16 -11) 📝 `launcher/lang/de.json` (+5 -5) 📝 `launcher/lang/es.json` (+5 -5) 📝 `launcher/lang/fr.json` (+5 -5) 📝 `launcher/lang/pl.json` (+5 -5) 📝 `launcher/lang/ru.json` (+5 -5) 📝 `launcher/lang/uk.json` (+5 -5) 📝 `launcher/lang/zh.json` (+5 -5) 📝 `launcher/src/backend.rs` (+2 -6) 📝 `launcher/src/cli.rs` (+9 -15) 📝 `launcher/src/github_mods_page.rs` (+1 -2) 📝 `launcher/src/lib.rs` (+1 -0) 📝 `launcher/src/main.rs` (+4 -59) 📝 `launcher/src/mods_page.rs` (+96 -27) 📝 `launcher/src/native_mods.rs` (+21 -58) ➕ `launcher/src/native_status.rs` (+223 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Opus 5.5), not by levzzz5154 themselves. Native mods stop being an experimental setting: they are always on, and their build status and **Build** button move from Settings to the Mods page, beside the mods. Second of the launcher native-mods rework (levzzz5154's decisions); the build logic itself (same-instance builds, keeping the revision, incremental) is a separate PR and untouched here. ## What players see - **Settings → Game** no longer has "Native mods (experimental)". - **Mods page → Installed** has a **Native build** row for the selected instance whenever it has native mods: - the build's step while it runs, or its error in red; - **Build** when the version the instance plays doesn't hold the native mods turned on: it isn't a `native-*` build, or the `mods` of its `native-mods.json` differ from the ones turned on (by id and version); - "Up to date: {instance} plays these mods." otherwise. - Build still opens the red warning and builds only from "I trust these mods: build". - **First native install:** a plain trust notice, shown once ("Native mods aren't sandboxed… Install only mods whose authors you trust… build the game on the Mods page…"), with Install / Cancel. It no longer turns anything on. `mods install` prints it too. - **After an install** a native mod says "Installed Veinminer 0.3.0 into {instance}. Build to play with it." instead of "into horizon-mods and turned it on". ## Code - `native_status.rs` (new): `state(enabled, built)`, a pure comparison, unit-tested; `enabled(home)` reads the `.hnmod`s turned on; `built(version)` reads `native-mods.json`; `fingerprint` lets the Mods page re-read only when the folder, the on/off list or the version changes. Also `NOTICE` and `is_native_file`. - `native_mods.rs`: drops `turns_on`, `needs_notice`, the old `NOTICE` and their test; the build is untouched. - `backend.rs` (**needs @ludovic111's code-owner review**): removes `Settings::native_mods` (serde ignores the key in older files; a test reads one) and re-documents `native_mods_noticed`. 3 lines. - `main.rs`: `native_mods_row` goes; `native_warning` and `build_native` stay and are used from `mods_page.rs`. - Translations: the removed strings go and the new ones are added in all six languages. - Docs: `docs/native-mods.md`, and `docs/launcher-commands.md` regenerated. Left for follow-ups: indicators of which instance a mod is installed in, and a list of builds. Until the build PR lands, a build of the default "Horizon" instance still goes to the "Native mods" instance, so that instance's row keeps offering Build. ## Checks ``` cd launcher && cargo +stable fmt --check && cargo +stable clippy --all-targets -- -D warnings && cargo +stable test test result: ok. 278 passed; 0 failed; 3 ignored (lib, incl. native_status::tests and the i18n table test) test result: ok. 46 passed; 0 failed (bin) ``` Run in the window with an isolated launcher home and game home (`HORIZON_LAUNCHER_PAGE=mods`, a native mod turned on): the row shows Build with no native build, and "Up to date" once the selected version's `native-mods.json` lists the mod. 🤖 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 05:11:16 +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#5251
No description provided.