[PR #4478] [MERGED] Launcher: hide the Mods page's sources and tabs that aren't usable yet #5647

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

📋 Pull Request Information

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

Base: main ← Head: launcher-hide-unusable-sources


📝 Commits (2)

  • 0416fe6 Launcher: hide the Mods page's sources and tabs that aren't usable yet
  • 4cf3a14 Launcher: keep the Resource packs tab, on Modrinth

📊 Changes

4 files changed (+48 additions, -43 deletions)

View changed files

📝 docs/mod-browser.md (+6 -3)
📝 launcher/README.md (+7 -8)
📝 launcher/src/main.rs (+2 -2)
📝 launcher/src/mods_page.rs (+33 -30)

📄 Description

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

Closes #4477. The Mods page offered sources and tabs players can't use yet. This PR hides them so the page shows only what works: Horizon's own registry for mods and shader packs, and Modrinth for resource packs.

What players see

  • Mods, Resource packs and Shader packs are the tabs.
    • Mods and Shader packs search Horizon's registry. The Modrinth / Horizon / CurseForge (coming soon) switch is gone from both: Modrinth's Java mods almost all say "Doesn't run", and shader packs exist only on Horizon's registry.
    • Resource packs works on Modrinth, so it stays as it was: Modrinth first, with the source switch, sort and filters.
  • Data packs has no tab. It was Modrinth only and isn't usable yet.
  • Modpacks has no tab of its own either. The sidebar's imported packs and its + button still open it, and while it is open its tab shows beside the others (with its Modrinth switch), so the strip says where you are. Leaving it hides the tab again.
  • The page description now says what the page holds: "Mods and shader packs made for Horizon from its own reviewed registry, and resource packs from Modrinth. Each file is checked against its source's checksum before it reaches your game folder."
  • Java instances are unchanged: their Mods and Resource packs tabs still search Modrinth for the instance's version and loader, with its sort and filters.
  • Unchanged: the CLI (mods search --kind datapack|modpack --source modrinth), Home's per-world Data packs (add a local zip), and the installed list.

Native mods moving from Settings to the Mods page was also asked for, but levzzz5154's #3855 already does that (and #3891 adds Open folder), so this PR leaves it to them.

Before and after

Scratch launcher and game homes, no instance prepared, window 1400×1050.

Mods tab

Before After
Mods tab before Mods tab after

Before: five tabs, the Modrinth / Horizon / CurseForge switch, Modrinth on by default (Fabric API, Sodium, Iris: all "Doesn't run"), and sort and filter controls. After: three tabs and the search field, with Horizon's registry results (Zoom, FPS Counter, Minimap, Veinminer: "Works").

Resource packs tab (after)

Resource packs tab after

Same as before: Modrinth first (Fresh Animations, Low On Fire...: "Works"), with the source switch, sort and filters. Only the tab strip around it changed.

Shader packs tab

Before After
Shader packs tab before Shader packs tab after

Before: the source switch, which offered Modrinth for shader packs although they are only on Horizon's registry. After: the search field alone.

Modpacks, opened from the sidebar (after)

Modpacks opened from the sidebar

The tab shows only while it is open. Import and browsing work as before.

Code

All in launcher/src/mods_page.rs:

  • SHOWN lists the kinds with a tab (Mods, Resource packs, Shader packs). The strip shows those plus the open kind.
  • source_for(kind) picks a tab's source: Horizon, or Modrinth for resource packs and modpacks. It is used on start, on a tab switch and in show_modpack.
  • The source switch renders only on the tabs that start on Modrinth (and not for a Java instance, as before).
  • registry now also checks !java. Before, a Java instance's filters showed only because Modrinth was the default source. Now the source defaults to Horizon, so without this they would have disappeared.
  • HORIZON_LAUNCHER_PAGE=resourcepacks (new) opens the Resource packs tab, and datapacks now opens the Mods tab. The HORIZON_LAUNCHER_SOURCE screenshot variable is removed, since the source follows the tab.

Docs: docs/mod-browser.md (the Mods page section) and launcher/README.md.

Checks

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 1da354b67, 38 s)

Check Result
Scope ✅ 4 files, +48 −43
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (32 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅
launcher clippy ✅ (3 s)
launcher tests ✅ 280 passed (3 s)
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses

Screenshots taken from the debug launcher before and after this change, both run with fresh mktemp -d homes (HORIZON_HOME, HORIZON_LAUNCHER_HOME, XDG_*, HORIZON_LAUNCHER_NO_SELF_UPDATE=1).

🤖 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/4478 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `launcher-hide-unusable-sources` --- ### 📝 Commits (2) - [`0416fe6`](https://github.com/horizon-rust/horizon/commit/0416fe600cbc7c845973bcb9fcf75aa49e3af80c) Launcher: hide the Mods page's sources and tabs that aren't usable yet - [`4cf3a14`](https://github.com/horizon-rust/horizon/commit/4cf3a14ba084c9fb07d74b7f66d329e02e8eefe9) Launcher: keep the Resource packs tab, on Modrinth ### 📊 Changes **4 files changed** (+48 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `docs/mod-browser.md` (+6 -3) 📝 `launcher/README.md` (+7 -8) 📝 `launcher/src/main.rs` (+2 -2) 📝 `launcher/src/mods_page.rs` (+33 -30) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally. Closes #4477. The Mods page offered sources and tabs players can't use yet. This PR hides them so the page shows only what works: Horizon's own registry for mods and shader packs, and Modrinth for resource packs. ## What players see - **Mods**, **Resource packs** and **Shader packs** are the tabs. - **Mods** and **Shader packs** search Horizon's registry. The **Modrinth / Horizon / CurseForge (coming soon)** switch is gone from both: Modrinth's Java mods almost all say "Doesn't run", and shader packs exist only on Horizon's registry. - **Resource packs** works on Modrinth, so it stays as it was: Modrinth first, with the source switch, sort and filters. - **Data packs** has no tab. It was Modrinth only and isn't usable yet. - **Modpacks** has no tab of its own either. The sidebar's imported packs and its **+** button still open it, and while it is open its tab shows beside the others (with its Modrinth switch), so the strip says where you are. Leaving it hides the tab again. - The page description now says what the page holds: "Mods and shader packs made for Horizon from its own reviewed registry, and resource packs from Modrinth. Each file is checked against its source's checksum before it reaches your game folder." - **Java instances are unchanged**: their Mods and Resource packs tabs still search Modrinth for the instance's version and loader, with its sort and filters. - Unchanged: the CLI (`mods search --kind datapack|modpack --source modrinth`), Home's per-world **Data packs** (add a local zip), and the installed list. Native mods moving from Settings to the Mods page was also asked for, but levzzz5154's #3855 already does that (and #3891 adds Open folder), so this PR leaves it to them. ## Before and after Scratch launcher and game homes, no instance prepared, window 1400×1050. ### Mods tab | Before | After | |---|---| | ![Mods tab before](https://raw.githubusercontent.com/rdbtCVS/horizon/2209380b8073d7d408635deb85442d50add76b11/launcher-hide-sources/before-mods.png) | ![Mods tab after](https://raw.githubusercontent.com/rdbtCVS/horizon/2209380b8073d7d408635deb85442d50add76b11/launcher-hide-sources/after-mods.png) | Before: five tabs, the Modrinth / Horizon / CurseForge switch, Modrinth on by default (Fabric API, Sodium, Iris: all "Doesn't run"), and sort and filter controls. After: three tabs and the search field, with Horizon's registry results (Zoom, FPS Counter, Minimap, Veinminer: "Works"). ### Resource packs tab (after) ![Resource packs tab after](https://raw.githubusercontent.com/rdbtCVS/horizon/2209380b8073d7d408635deb85442d50add76b11/launcher-hide-sources/after-resourcepacks.png) Same as before: Modrinth first (Fresh Animations, Low On Fire...: "Works"), with the source switch, sort and filters. Only the tab strip around it changed. ### Shader packs tab | Before | After | |---|---| | ![Shader packs tab before](https://raw.githubusercontent.com/rdbtCVS/horizon/2209380b8073d7d408635deb85442d50add76b11/launcher-hide-sources/before-shaders.png) | ![Shader packs tab after](https://raw.githubusercontent.com/rdbtCVS/horizon/2209380b8073d7d408635deb85442d50add76b11/launcher-hide-sources/after-shaders.png) | Before: the source switch, which offered Modrinth for shader packs although they are only on Horizon's registry. After: the search field alone. ### Modpacks, opened from the sidebar (after) ![Modpacks opened from the sidebar](https://raw.githubusercontent.com/rdbtCVS/horizon/2209380b8073d7d408635deb85442d50add76b11/launcher-hide-sources/after-modpacks.png) The tab shows only while it is open. Import and browsing work as before. ## Code All in `launcher/src/mods_page.rs`: - `SHOWN` lists the kinds with a tab (Mods, Resource packs, Shader packs). The strip shows those plus the open kind. - `source_for(kind)` picks a tab's source: Horizon, or Modrinth for resource packs and modpacks. It is used on start, on a tab switch and in `show_modpack`. - The source switch renders only on the tabs that start on Modrinth (and not for a Java instance, as before). - `registry` now also checks `!java`. Before, a Java instance's filters showed only because Modrinth was the default source. Now the source defaults to Horizon, so without this they would have disappeared. - `HORIZON_LAUNCHER_PAGE=resourcepacks` (new) opens the Resource packs tab, and `datapacks` now opens the Mods tab. The `HORIZON_LAUNCHER_SOURCE` screenshot variable is removed, since the source follows the tab. Docs: `docs/mod-browser.md` (the Mods page section) and `launcher/README.md`. ## Checks **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 1da354b67, 38 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +48 −43 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (32 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ | | launcher clippy | ✅ (3 s) | | launcher tests | ✅ 280 passed (3 s) | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | Screenshots taken from the debug launcher before and after this change, both run with fresh `mktemp -d` homes (`HORIZON_HOME`, `HORIZON_LAUNCHER_HOME`, `XDG_*`, `HORIZON_LAUNCHER_NO_SELF_UPDATE=1`). 🤖 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:14:03 +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#5647
No description provided.