[PR #7777] Launcher: the Wardrobe page in the top bar #7816

Open
opened 2026-11-03 07:24:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7777
Author: @ludovic111
Created: 11/2/2026
Status: 🔄 Open

Base: feat/cosmetics-wardrobe-api ← Head: feat/cosmetics-wardrobe-client


📝 Commits (5)

  • bcec565 Launcher: the Wardrobe, behind the cosmetics flag
  • a291c94 Launcher: Wardrobe picture texels with as_chunks (clippy)
  • c9b454e Launcher: the Wardrobe is a top-bar page
  • 366dd65 Cosmetics: rustfmt prefs
  • 0fccde5 Merge feat/cosmetics-wardrobe-api into feat/cosmetics-wardrobe-client

📊 Changes

18 files changed (+1603 additions, -20 deletions)

View changed files

📝 crates/horizon-cosmetics/src/lib.rs (+1 -0)
➕ crates/horizon-cosmetics/src/prefs.rs (+144 -0)
📝 docs/cosmetics.md (+23 -0)
📝 launcher/lang/de.json (+40 -1)
📝 launcher/lang/es.json (+40 -1)
📝 launcher/lang/fr.json (+40 -1)
📝 launcher/lang/ja.json (+40 -1)
📝 launcher/lang/pl.json (+40 -1)
📝 launcher/lang/pt-br.json (+40 -1)
📝 launcher/lang/ru.json (+40 -1)
📝 launcher/lang/tr.json (+40 -1)
📝 launcher/lang/uk.json (+40 -1)
📝 launcher/lang/zh.json (+40 -1)
📝 launcher/src/frame.rs (+1 -4)
📝 launcher/src/heads.rs (+6 -0)
📝 launcher/src/main.rs (+33 -6)
📝 launcher/src/wardrobe.rs (+16 -0)
➕ launcher/src/wardrobe_page.rs (+979 -0)

📄 Description

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

Cosmetics (off by default, behind horizon_cosmetics::ON_BY_DEFAULT): the Wardrobe becomes a top-bar page between Servers and Versions, as in the design brief. It replaces the panel this PR first added under Settings › Account.

  • Slots: one row each (head, back, shoulder pet, name tag, launcher theme), showing what it wears, "Nothing equipped" or "None owned yet".
  • Your player: your own skin, wearing the items, with your name tag style (mark and line) over the head; "Turn" rotates it.
  • What you own for the chosen slot: "Nothing" first; equipping shows at once.
  • The founder set: a claim line while its window is open. After the window closes, the line says the set was free until that day and isn't offered any more.
  • Three switches:
    • Show my cosmetics, kept by the service per account.
    • Hide other players' cosmetics and Show other players' auras and trails (off by default). These are the game's horizon-extras.txt lines, through the new horizon_cosmetics::prefs (cosmeticsOthers = shown|name_tags|hidden, read as before for true/false; cosmeticsAuras). The game PR that follows puts the same switches in the game's settings.
  • States:
    • The page opens on the outfit kept on disk (#7776's Saved).
    • Offline: the page keeps working and counts the changes waiting to sync.
    • Service failure: the page says the outfit still shows in the game, with Try again and Copy details (host · status · time).
    • Signed out: "Sign in to use cosmetics." with a sign-in button.
    • Loading: skeletons.
    • Toasts for claim, equip and sync failure.
  • All strings go through tr(), in the 10 languages; the old panel's strings are removed.
  • The page shows only when horizon_cosmetics::enabled(); the perf bench's page cycle skips it otherwise.
  • A dev preview shows the page for screenshots: HORIZON_LAUNCHER_PAGE=wardrobe plus HORIZON_WARDROBE_STATE=offline|failed|closed|empty.

Stacked on #7776 (client), on #7829, #7774 and #7772.

Screenshots (dev preview, founder items from HORIZON_COSMETICS_LOCAL)

Taken locally at /tmp/cosm-pr/wardrobe-{page,offline,failed,closed,empty}.png on the Mac mini: wearing the Founder Visor, Sunlet and Founder Tag; offline; service failure; window closed; nothing owned.

Tests

  • horizon_cosmetics::prefs:
    • reads_the_old_switch_and_keeps_the_other_settings: the old true/false keep their meaning, and other lines (noAi, zoom) survive.
    • the_game_button_cycles_through_the_three.
  • The i18n completeness test covers the new strings.
  • The rest of the page is UI over #7776's tested client (queue, cache, theme).

Checks

cargo fmt -p horizon-launcher --check                                ok
cargo clippy --all-targets -- -D warnings   (launcher workspace)     ok
cargo test   (launcher workspace)           lib 459 passed, bin 76 passed, integration tests ok
cargo clippy/test -p horizon-cosmetics                               ok, 19 passed

tools/pr_ready.py was not run: the Mac mini has 15 GB free and the build host 16 GB, both under the 25 GB floor for a fresh root-workspace build (horizon-cosmetics reaches horizon-client). The launcher checks above ran in a target cloned copy-on-write from an idle one, with every path package cleaned first. CI builds the root workspace.

Perf: nothing runs unless cosmetics are on. With the flag on, the page bakes its picture once per change (turn, outfit or window scale), not every frame; requests run on the background executor.

🤖 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/7777 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `feat/cosmetics-wardrobe-api` ← **Head:** `feat/cosmetics-wardrobe-client` --- ### 📝 Commits (5) - [`bcec565`](https://github.com/horizon-rust/horizon/commit/bcec565e4b767554825f5d18feff5e5cae93da26) Launcher: the Wardrobe, behind the cosmetics flag - [`a291c94`](https://github.com/horizon-rust/horizon/commit/a291c94493f12c4aa4c710b2f92297f8a0b4ce03) Launcher: Wardrobe picture texels with as_chunks (clippy) - [`c9b454e`](https://github.com/horizon-rust/horizon/commit/c9b454ebd321d60071d67aaa89df8641052ab49d) Launcher: the Wardrobe is a top-bar page - [`366dd65`](https://github.com/horizon-rust/horizon/commit/366dd657dd60b7e50276e11dd4bee02f8d9ef5e6) Cosmetics: rustfmt prefs - [`0fccde5`](https://github.com/horizon-rust/horizon/commit/0fccde52c92a1f4aa2049912621e03e1666a8516) Merge feat/cosmetics-wardrobe-api into feat/cosmetics-wardrobe-client ### 📊 Changes **18 files changed** (+1603 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-cosmetics/src/lib.rs` (+1 -0) ➕ `crates/horizon-cosmetics/src/prefs.rs` (+144 -0) 📝 `docs/cosmetics.md` (+23 -0) 📝 `launcher/lang/de.json` (+40 -1) 📝 `launcher/lang/es.json` (+40 -1) 📝 `launcher/lang/fr.json` (+40 -1) 📝 `launcher/lang/ja.json` (+40 -1) 📝 `launcher/lang/pl.json` (+40 -1) 📝 `launcher/lang/pt-br.json` (+40 -1) 📝 `launcher/lang/ru.json` (+40 -1) 📝 `launcher/lang/tr.json` (+40 -1) 📝 `launcher/lang/uk.json` (+40 -1) 📝 `launcher/lang/zh.json` (+40 -1) 📝 `launcher/src/frame.rs` (+1 -4) 📝 `launcher/src/heads.rs` (+6 -0) 📝 `launcher/src/main.rs` (+33 -6) 📝 `launcher/src/wardrobe.rs` (+16 -0) ➕ `launcher/src/wardrobe_page.rs` (+979 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Cosmetics (off by default, behind `horizon_cosmetics::ON_BY_DEFAULT`): **the Wardrobe becomes a top-bar page** between Servers and Versions, as in the design brief. It replaces the panel this PR first added under Settings › Account. - **Slots**: one row each (head, back, shoulder pet, name tag, launcher theme), showing what it wears, "Nothing equipped" or "None owned yet". - **Your player**: your own skin, wearing the items, with your name tag style (mark and line) over the head; "Turn" rotates it. - **What you own for the chosen slot**: "Nothing" first; equipping shows at once. - **The founder set**: a claim line while its window is open. After the window closes, the line says the set was free until that day and isn't offered any more. - **Three switches**: - *Show my cosmetics*, kept by the service per account. - *Hide other players' cosmetics* and *Show other players' auras and trails* (off by default). These are the game's `horizon-extras.txt` lines, through the new `horizon_cosmetics::prefs` (`cosmeticsOthers` = `shown|name_tags|hidden`, read as before for `true`/`false`; `cosmeticsAuras`). The game PR that follows puts the same switches in the game's settings. - **States**: - The page opens on the outfit kept on disk (#7776's `Saved`). - **Offline**: the page keeps working and counts the changes waiting to sync. - **Service failure**: the page says the outfit still shows in the game, with *Try again* and *Copy details* (host · status · time). - **Signed out**: "Sign in to use cosmetics." with a sign-in button. - **Loading**: skeletons. - **Toasts** for claim, equip and sync failure. - All strings go through `tr()`, in the 10 languages; the old panel's strings are removed. - The page shows only when `horizon_cosmetics::enabled()`; the perf bench's page cycle skips it otherwise. - A dev preview shows the page for screenshots: `HORIZON_LAUNCHER_PAGE=wardrobe` plus `HORIZON_WARDROBE_STATE=offline|failed|closed|empty`. Stacked on #7776 (client), on #7829, #7774 and #7772. ## Screenshots (dev preview, founder items from `HORIZON_COSMETICS_LOCAL`) Taken locally at `/tmp/cosm-pr/wardrobe-{page,offline,failed,closed,empty}.png` on the Mac mini: wearing the Founder Visor, Sunlet and Founder Tag; offline; service failure; window closed; nothing owned. ## Tests - `horizon_cosmetics::prefs`: - `reads_the_old_switch_and_keeps_the_other_settings`: the old `true`/`false` keep their meaning, and other lines (`noAi`, `zoom`) survive. - `the_game_button_cycles_through_the_three`. - The i18n completeness test covers the new strings. - The rest of the page is UI over #7776's tested client (queue, cache, theme). ## Checks ``` cargo fmt -p horizon-launcher --check ok cargo clippy --all-targets -- -D warnings (launcher workspace) ok cargo test (launcher workspace) lib 459 passed, bin 76 passed, integration tests ok cargo clippy/test -p horizon-cosmetics ok, 19 passed ``` `tools/pr_ready.py` was not run: the Mac mini has 15 GB free and the build host 16 GB, both under the 25 GB floor for a fresh root-workspace build (`horizon-cosmetics` reaches `horizon-client`). The launcher checks above ran in a target cloned copy-on-write from an idle one, with every path package cleaned first. CI builds the root workspace. **Perf:** nothing runs unless cosmetics are on. With the flag on, the page bakes its picture once per change (turn, outfit or window scale), not every frame; requests run on the background executor. 🤖 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>
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#7816
No description provided.