[PR #2036] [MERGED] launcher: a Shader packs tab that installs Horizon's own shader packs #3958

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

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-shader-packs


📝 Commits (2)

  • 108ced5 launcher: a Shader packs tab that installs Horizon's own shader packs
  • 87ff54e Merge remote-tracking branch 'origin/main' into feat/launcher-shader-packs

📊 Changes

18 files changed (+179 additions, -40 deletions)

View changed files

📝 crates/horizon-mods/src/index.rs (+1 -1)
📝 crates/horizon-mods/src/index/registry/tests.rs (+27 -4)
📝 crates/horizon-mods/src/index/tests.rs (+7 -4)
➕ crates/horizon-mods/tests/index/glow-1.0.0.hshader (+0 -0)
📝 crates/horizon-mods/tests/index/index-v1.json (+28 -0)
📝 docs/api/mod-index.md (+3 -1)
📝 docs/launcher-commands.md (+1 -1)
📝 docs/mod-browser.md (+10 -6)
📝 docs/shaders.md (+3 -2)
📝 launcher/src/browser.rs (+10 -1)
📝 launcher/src/browser/curseforge.rs (+9 -1)
📝 launcher/src/browser/horizon.rs (+12 -5)
📝 launcher/src/browser/horizon/tests.rs (+36 -0)
📝 launcher/src/browser/modrinth.rs (+6 -0)
📝 launcher/src/cli.rs (+3 -0)
📝 launcher/src/cli_tools.rs (+1 -1)
📝 launcher/src/main.rs (+3 -3)
📝 launcher/src/mods_page.rs (+19 -10)

📄 Description

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

#1855 (the registry's shader kind) is merged; this builds on it.

What players can do now

The launcher's Mods page has a fourth tab, Shader packs. It searches Horizon's registry and installs a Horizon shader pack (.hshader) into shaderpacks/ beside options.txt, after the launcher has run the game's own shader check on the downloaded file (horizon_shader_api::check, through index::check_file). The pack is then picked in the game's Shader Packs page (#2028). Update, remove and taken-down notices work as for resource packs.

The shaders/-format packs on Modrinth and CurseForge are not offered: on that tab those sources answer "Horizon's shader packs are on Horizon's registry: pick Horizon.", and the tab switches the source to Horizon.

From a terminal: horizon-launcher mods search --source horizon --kind shader, horizon-launcher mods install --source horizon <id>. MCP's mods_search takes kind: shader.

Changes

  • launcher/src/browser.rs: Kind::Shader (folder shaderpacks); support refuses non-Horizon shader packs.
  • browser/horizon.rs: registry shader projects map to it and install to shaderpacks/<file>. A file of the same name the registry didn't put there gets "… is already there: move it away first." instead of being called a mod.
  • modrinth.rs, curseforge.rs: shader searches answer with the pointer to the registry; their shader projects still don't parse.
  • mods_page.rs: the tab (icon zap), the header text, HORIZON_LAUNCHER_PAGE=shaders for screenshots. cli.rs: --kind shader.
  • horizon_mods::index::check_file no longer refuses shader (only kinds this build doesn't know).
  • Sample index: a real shader pack glow-1.0.0.hshader (made with horizon-shader new --template post then horizon-shader pack), so the registry build (builds_the_sample_index), check_file and the launcher's install run on it.
  • Docs: mod-browser.md, api/mod-index.md (check step and changelog), shaders.md status table, launcher-commands.md (generated).

Tested

  • New test installs_a_shader_pack_into_shaderpacks: search under Shader packs, install (file in shaderpacks/, nothing in horizon-mods.txt), taken-down notice, remove, and a same-name file left alone.
  • End to end with the CLI against a local test registry (HORIZON_MOD_INDEX, fresh mktemp -d homes):
$ horizon-launcher mods search --source horizon --kind shader
Soft Glow  (glow)  Horizon
  A post-processing pass over the world.
  Unsigned: the launcher checks its checksum only
$ horizon-launcher mods search --kind shader
error: Horizon's shader packs are on Horizon's registry: pick Horizon.
$ horizon-launcher mods install --source horizon glow
Soft Glow 1.0.0: shaderpacks/glow-1.0.0.hshader (SHA-256:331cfe29…)
  • GUI screenshots: the orchestrator takes them (this session has no screen-recording permission). HORIZON_LAUNCHER_PAGE=shaders opens the tab directly.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 852e7cd52, 8 min 2 s)

Check Result
Scope ⚠️ 18 files, +179 −40; mixes game, launcher
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (10 s)
clippy ✅ (1 min 41 s)
tests: horizon-mods ✅ 41 passed (1 min 16 s)
doc tests ✅ 0 passed (19 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (3 s)
launcher clippy ✅ (1 min 56 s)
launcher tests ✅ 130 passed (2 min 35 s)
Parity ➖ no harness affected
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/2036 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-shader-packs` --- ### 📝 Commits (2) - [`108ced5`](https://github.com/horizon-rust/horizon/commit/108ced5793a63fee19235a94c34f14647748bd2b) launcher: a Shader packs tab that installs Horizon's own shader packs - [`87ff54e`](https://github.com/horizon-rust/horizon/commit/87ff54e702974363c31264f824493584b96bf298) Merge remote-tracking branch 'origin/main' into feat/launcher-shader-packs ### 📊 Changes **18 files changed** (+179 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-mods/src/index.rs` (+1 -1) 📝 `crates/horizon-mods/src/index/registry/tests.rs` (+27 -4) 📝 `crates/horizon-mods/src/index/tests.rs` (+7 -4) ➕ `crates/horizon-mods/tests/index/glow-1.0.0.hshader` (+0 -0) 📝 `crates/horizon-mods/tests/index/index-v1.json` (+28 -0) 📝 `docs/api/mod-index.md` (+3 -1) 📝 `docs/launcher-commands.md` (+1 -1) 📝 `docs/mod-browser.md` (+10 -6) 📝 `docs/shaders.md` (+3 -2) 📝 `launcher/src/browser.rs` (+10 -1) 📝 `launcher/src/browser/curseforge.rs` (+9 -1) 📝 `launcher/src/browser/horizon.rs` (+12 -5) 📝 `launcher/src/browser/horizon/tests.rs` (+36 -0) 📝 `launcher/src/browser/modrinth.rs` (+6 -0) 📝 `launcher/src/cli.rs` (+3 -0) 📝 `launcher/src/cli_tools.rs` (+1 -1) 📝 `launcher/src/main.rs` (+3 -3) 📝 `launcher/src/mods_page.rs` (+19 -10) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. #1855 (the registry's `shader` kind) is merged; this builds on it. ## What players can do now The launcher's **Mods** page has a fourth tab, **Shader packs**. It searches Horizon's registry and installs a Horizon shader pack (`.hshader`) into `shaderpacks/` beside `options.txt`, after the launcher has run the game's own shader check on the downloaded file (`horizon_shader_api::check`, through `index::check_file`). The pack is then picked in the game's Shader Packs page (#2028). Update, remove and taken-down notices work as for resource packs. The `shaders/`-format packs on Modrinth and CurseForge are not offered: on that tab those sources answer "Horizon's shader packs are on Horizon's registry: pick Horizon.", and the tab switches the source to Horizon. From a terminal: `horizon-launcher mods search --source horizon --kind shader`, `horizon-launcher mods install --source horizon <id>`. MCP's `mods_search` takes `kind: shader`. ## Changes - `launcher/src/browser.rs`: `Kind::Shader` (folder `shaderpacks`); `support` refuses non-Horizon shader packs. - `browser/horizon.rs`: registry shader projects map to it and install to `shaderpacks/<file>`. A file of the same name the registry didn't put there gets "… is already there: move it away first." instead of being called a mod. - `modrinth.rs`, `curseforge.rs`: shader searches answer with the pointer to the registry; their shader projects still don't parse. - `mods_page.rs`: the tab (icon `zap`), the header text, `HORIZON_LAUNCHER_PAGE=shaders` for screenshots. `cli.rs`: `--kind shader`. - `horizon_mods::index::check_file` no longer refuses `shader` (only kinds this build doesn't know). - Sample index: a real shader pack `glow-1.0.0.hshader` (made with `horizon-shader new --template post` then `horizon-shader pack`), so the registry build (`builds_the_sample_index`), `check_file` and the launcher's install run on it. - Docs: mod-browser.md, api/mod-index.md (check step and changelog), shaders.md status table, launcher-commands.md (generated). ## Tested - New test `installs_a_shader_pack_into_shaderpacks`: search under Shader packs, install (file in `shaderpacks/`, nothing in `horizon-mods.txt`), taken-down notice, remove, and a same-name file left alone. - End to end with the CLI against a local test registry (`HORIZON_MOD_INDEX`, fresh `mktemp -d` homes): ``` $ horizon-launcher mods search --source horizon --kind shader Soft Glow (glow) Horizon A post-processing pass over the world. Unsigned: the launcher checks its checksum only $ horizon-launcher mods search --kind shader error: Horizon's shader packs are on Horizon's registry: pick Horizon. $ horizon-launcher mods install --source horizon glow Soft Glow 1.0.0: shaderpacks/glow-1.0.0.hshader (SHA-256:331cfe29…) ``` - GUI screenshots: the orchestrator takes them (this session has no screen-recording permission). `HORIZON_LAUNCHER_PAGE=shaders` opens the tab directly. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 852e7cd52, 8 min 2 s) | Check | Result | | --- | --- | | Scope | ⚠️ 18 files, +179 −40; mixes game, launcher | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (10 s) | | clippy | ✅ (1 min 41 s) | | tests: horizon-mods | ✅ 41 passed (1 min 16 s) | | doc tests | ✅ 0 passed (19 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (3 s) | | launcher clippy | ✅ (1 min 56 s) | | launcher tests | ✅ 130 passed (2 min 35 s) | | Parity | ➖ no harness affected | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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:13:35 +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#3958
No description provided.