[PR #7776] Launcher: the Wardrobe's link to the cosmetics service (founder set, offline queue, themes) #7815

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/7776
Author: @ludovic111
Created: 11/2/2026
Status: 🔄 Open

Base: feat/cosmetics-name-tag ← Head: feat/cosmetics-wardrobe-api


📝 Commits (3)

  • 8237151 Launcher: the Wardrobe's link to the cosmetics service
  • 1468f08 Launcher: the Wardrobe client keeps the outfit offline, knows themes and visibility
  • fa67431 Merge feat/cosmetics-name-tag into feat/cosmetics-wardrobe-api

📊 Changes

18 files changed (+1019 additions, -10 deletions)

View changed files

📝 docs/cosmetics.md (+25 -0)
📝 launcher/Cargo.lock (+19 -0)
📝 launcher/Cargo.toml (+1 -0)
📝 launcher/lang/de.json (+9 -1)
📝 launcher/lang/es.json (+9 -1)
📝 launcher/lang/fr.json (+9 -1)
📝 launcher/lang/ja.json (+9 -1)
📝 launcher/lang/pl.json (+9 -1)
📝 launcher/lang/pt-br.json (+9 -1)
📝 launcher/lang/ru.json (+9 -1)
📝 launcher/lang/tr.json (+9 -1)
📝 launcher/lang/uk.json (+9 -1)
📝 launcher/lang/zh.json (+9 -1)
📝 launcher/src/account/session.rs (+58 -0)
📝 launcher/src/account/tests.rs (+49 -0)
📝 launcher/src/lib.rs (+1 -0)
➕ launcher/src/wardrobe.rs (+442 -0)
➕ launcher/src/wardrobe/tests.rs (+334 -0)

📄 Description

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

The Wardrobe's link to Horizon's cosmetics service (off by default, behind horizon_cosmetics::ON_BY_DEFAULT). It follows the design brief for the founder set and its states.

First commit (unchanged since review): proving the account through Mojang's session server (account::session::join_server). The token goes to Mojang only, never to the cosmetics service. Also the catalogue, claim and equip.

Second commit:

  • "Early-player set" becomes the founder set in words. It is free while its window is open and retired for good after.
  • Entry::theme: a launcher theme's six sky stops and accent hue (First Light). These come from the catalogue; there is no item file.
  • Me::visible and Service::set_visible: Show my cosmetics (PUT /v1/visible).
  • Saved (<data>/wardrobe/<uuid>.json) keeps the last catalogue and answer, plus the changes still to send. It never keeps a session or token.
    • A change shows at once.
    • Changes the service couldn't take (offline, or a 5xx) go out in order once it answers.
    • A newer change to the same slot replaces a waiting one.
    • Changes the service refuses for good (e.g. an item no longer owned) are dropped.
  • Service::item_cached keeps item files by hash, so the outfit draws offline.

Base: #7829 (name tag styles), on #7774 and #7772. The service side (private repo) is deployed and serves the founder set.

Tests

  • changes_made_offline_wait_on_disk_and_go_out_in_order: a 503 leaves both changes queued, and they survive a reload from disk. Once the service is back, they go out oldest first; the mock records visible=false, then the head item. A newer head change replaces the older one, and an item that isn't owned is dropped, not retried.
  • an_item_file_is_kept_by_its_hash: offline, a kept file is read; another hash needs the service.
  • a_launcher_theme_carries_its_sky: sky stops parse to 0xrrggbb.
  • The first commit's 3 tests are unchanged; 6 pass in total.

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/7776 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `feat/cosmetics-name-tag` ← **Head:** `feat/cosmetics-wardrobe-api` --- ### 📝 Commits (3) - [`8237151`](https://github.com/horizon-rust/horizon/commit/8237151d5184aa7ce3800d3b4943059493501c9f) Launcher: the Wardrobe's link to the cosmetics service - [`1468f08`](https://github.com/horizon-rust/horizon/commit/1468f0860a0ddfd3a99e8da3bfa12a0803f5e0b3) Launcher: the Wardrobe client keeps the outfit offline, knows themes and visibility - [`fa67431`](https://github.com/horizon-rust/horizon/commit/fa67431258ff85defd56490971abce26647c1fc4) Merge feat/cosmetics-name-tag into feat/cosmetics-wardrobe-api ### 📊 Changes **18 files changed** (+1019 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `docs/cosmetics.md` (+25 -0) 📝 `launcher/Cargo.lock` (+19 -0) 📝 `launcher/Cargo.toml` (+1 -0) 📝 `launcher/lang/de.json` (+9 -1) 📝 `launcher/lang/es.json` (+9 -1) 📝 `launcher/lang/fr.json` (+9 -1) 📝 `launcher/lang/ja.json` (+9 -1) 📝 `launcher/lang/pl.json` (+9 -1) 📝 `launcher/lang/pt-br.json` (+9 -1) 📝 `launcher/lang/ru.json` (+9 -1) 📝 `launcher/lang/tr.json` (+9 -1) 📝 `launcher/lang/uk.json` (+9 -1) 📝 `launcher/lang/zh.json` (+9 -1) 📝 `launcher/src/account/session.rs` (+58 -0) 📝 `launcher/src/account/tests.rs` (+49 -0) 📝 `launcher/src/lib.rs` (+1 -0) ➕ `launcher/src/wardrobe.rs` (+442 -0) ➕ `launcher/src/wardrobe/tests.rs` (+334 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. The Wardrobe's link to Horizon's cosmetics service (off by default, behind `horizon_cosmetics::ON_BY_DEFAULT`). It follows the design brief for the founder set and its states. **First commit** (unchanged since review): proving the account through Mojang's session server (`account::session::join_server`). The token goes to Mojang only, never to the cosmetics service. Also the catalogue, claim and equip. **Second commit**: - "Early-player set" becomes **the founder set** in words. It is free while its window is open and retired for good after. - `Entry::theme`: a launcher theme's six sky stops and accent hue (First Light). These come from the catalogue; there is no item file. - `Me::visible` and `Service::set_visible`: *Show my cosmetics* (`PUT /v1/visible`). - `Saved` (`<data>/wardrobe/<uuid>.json`) keeps the last catalogue and answer, plus the changes still to send. It never keeps a session or token. - A change shows at once. - Changes the service couldn't take (offline, or a 5xx) go out in order once it answers. - A newer change to the same slot replaces a waiting one. - Changes the service refuses for good (e.g. an item no longer owned) are dropped. - `Service::item_cached` keeps item files by hash, so the outfit draws offline. Base: #7829 (name tag styles), on #7774 and #7772. The service side (private repo) is deployed and serves the founder set. ## Tests - `changes_made_offline_wait_on_disk_and_go_out_in_order`: a 503 leaves both changes queued, and they survive a reload from disk. Once the service is back, they go out oldest first; the mock records `visible=false`, then the head item. A newer head change replaces the older one, and an item that isn't owned is dropped, not retried. - `an_item_file_is_kept_by_its_hash`: offline, a kept file is read; another hash needs the service. - `a_launcher_theme_carries_its_sky`: sky stops parse to `0xrrggbb`. - The first commit's 3 tests are unchanged; 6 pass in total. ## 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#7815
No description provided.