[PR #4296] [CLOSED] Resource pack menu: reload the packs on a worker, as a server's are #5547

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4296
Author: @Teiwazik
Created: 10/30/2026
Status: ❌ Closed

Base: main ← Head: fix/menu-pack-reload


📝 Commits (1)

  • 6db1069 Resource pack menu: reload the packs on a worker, as a server's are

📊 Changes

2 files changed (+57 additions, -47 deletions)

View changed files

📝 crates/horizon-client/src/game/packs.rs (+16 -35)
📝 crates/horizon-client/src/game/server_packs.rs (+41 -12)

📄 Description

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

Fixes #4295

What and why

A reload from the resource pack menu staged the packs on the render thread, so the window stopped drawing until a large pack had loaded (Windows shows it as not responding). It now runs through the worker and loading overlay a server's packs already use:

  • start_pack_reload's worker half becomes spawn_pack_reload(server, menu); reload_packs calls it with the active server packs and menu = true.
  • PackReload.menu sends a failure to pack_reload_failed (the Packs page with the error, as before) instead of the server packs' recovery.
  • A selection made while a reload runs sets pending_pack_reload, applied when that reload finishes, whichever started it.
  • reload_selected_packs and stage_selected_packs had no other callers and go.

Used in my own builds with 256x LabPBR packs: the overlay shows the stages and the menu stays responsive.

pr_ready

pr_ready (tools/pr_ready.py --quick on Teiwazik, against origin/main at 68f036059, 6 min 18 s)

Check Result
Scope ✅ 2 files, +57 −47
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 480 passed (1 min 4 s)
rustfmt ✅ (11 s)
clippy ✅ (1 min 54 s)
tests: horizon-client ❌ 726 passed, 1 failed (3 min 4 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

title::tests::each_world_preset_writes_its_own_generator fails on Windows on main too: it makes a directory named after the preset id (minecraft:flat), and : is not allowed in Windows paths. Nothing here touches it.

🤖 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/4296 **Author:** [@Teiwazik](https://github.com/Teiwazik) **Created:** 10/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/menu-pack-reload` --- ### 📝 Commits (1) - [`6db1069`](https://github.com/horizon-rust/horizon/commit/6db1069c7f6628dee05a3c5f5f27d97d1fda5ada) Resource pack menu: reload the packs on a worker, as a server's are ### 📊 Changes **2 files changed** (+57 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/packs.rs` (+16 -35) 📝 `crates/horizon-client/src/game/server_packs.rs` (+41 -12) </details> ### 📄 Description > 🤖 Opened by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally. Fixes #4295 ## What and why A reload from the resource pack menu staged the packs on the render thread, so the window stopped drawing until a large pack had loaded (Windows shows it as not responding). It now runs through the worker and loading overlay a server's packs already use: - `start_pack_reload`'s worker half becomes `spawn_pack_reload(server, menu)`; `reload_packs` calls it with the active server packs and `menu = true`. - `PackReload.menu` sends a failure to `pack_reload_failed` (the Packs page with the error, as before) instead of the server packs' recovery. - A selection made while a reload runs sets `pending_pack_reload`, applied when that reload finishes, whichever started it. - `reload_selected_packs` and `stage_selected_packs` had no other callers and go. Used in my own builds with 256x LabPBR packs: the overlay shows the stages and the menu stays responsive. ## pr_ready **pr_ready** (`tools/pr_ready.py --quick` on Teiwazik, against origin/main at 68f036059, 6 min 18 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +57 −47 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 480 passed (1 min 4 s) | | rustfmt | ✅ (11 s) | | clippy | ✅ (1 min 54 s) | | tests: horizon-client | ❌ 726 passed, 1 failed (3 min 4 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | `title::tests::each_world_preset_writes_its_own_generator` fails on Windows on main too: it makes a directory named after the preset id (`minecraft:flat`), and `:` is not allowed in Windows paths. Nothing here touches it. 🤖 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:13:20 +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#5547
No description provided.