[PR #7677] Online menus: integrate account preferences and Realms flows #7755

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

📋 Pull Request Information

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

Base: main ← Head: fix/world-online-menu-entrypoints


📝 Commits (1)

  • 864b0cb Online menus: integrate account preferences and Realms flows

📊 Changes

22 files changed (+6761 additions, -24 deletions)

View changed files

📝 Cargo.lock (+21 -0)
📝 crates/horizon-client-lib/Cargo.toml (+2 -0)
📝 crates/horizon-client-render/src/auth.rs (+6 -0)
📝 crates/horizon-client-render/src/lib.rs (+1 -0)
📝 crates/horizon-client-render/src/options_ui.rs (+281 -10)
➕ crates/horizon-client-render/src/social_service.rs (+734 -0)
📝 crates/horizon-client/assets/horizon/lang/en_us.json (+1 -0)
📝 crates/horizon-client/src/client_lib.rs (+6 -4)
📝 crates/horizon-client/src/game.rs (+67 -0)
📝 crates/horizon-client/src/game/advancements.rs (+4 -1)
📝 crates/horizon-client/src/game/agent.rs (+3 -0)
➕ crates/horizon-client/src/game/online_options.rs (+555 -0)
📝 crates/horizon-client/src/game/options.rs (+1 -0)
➕ crates/horizon-client/src/game/realms.rs (+930 -0)
➕ crates/horizon-client/src/game/realms_entry.rs (+632 -0)
📝 crates/horizon-client/src/game/server_packs.rs (+40 -1)
📝 crates/horizon-client/src/game/startup_menu.rs (+85 -2)
➕ crates/horizon-client/src/realms_service.rs (+734 -0)
➕ crates/horizon-client/src/realms_transfer.rs (+730 -0)
📝 crates/horizon-client/src/title.rs (+123 -2)

...and 2 more files

📄 Description

🤖 Opened by masa-masa-0314's AI agent (ZCode, GPT-6), not by masa-masa-0314 personally.

What and why

Refs #7502, #7503.

Implement the previously missing Online Options services and disabled Realms title flow. The separate saved single-biome generator defect is handled by #7612; this branch contains no worldgen changes.

Integration status: this is a broad implementation intended for review and authenticated/UI acceptance, not a claim of complete vanilla visual or live-service parity. It will remain draft pending that acceptance. Local compile, protocol, archive, state and metadata tests cover the implementation, but no real user's account or Realm was used.

Online Options:

  • Discovery-backed account attributes, friend preferences and consent, request allowance, notification and presence options, and confirmed Xbox privacy link.
  • Account/revision-scoped async worker; vanilla enable/disable/error rollback semantics; notification baseline/diff handling and presence NONE/LIMITED/ALL with cooldowns.
  • Startup-menu and in-game options share the implementation; notification rendering uses existing SystemToast visuals.

Realms:

  • Authenticated service client with the inspected 26.3 cookie/frontend authentication, feature routing, compatibility/parental checks, typed errors and no credential-bearing redirects.
  • Title screens and async actions for world list/join, invitations/player/operator management, slot/configuration editing, tier-bounded distances/regions, initialization, templates/minigames, backups/restore, subscription links, Terms and invite-code management.
  • Explicit resource-pack consent, checked download and successful resource reload before joining; cancellation/account guards and startup-to-game handoff.
  • Create World continuation writes temporary world metadata and data packs, then uploads, matching RealmsCreateWorldFlow without starting a local server.
  • World transfer staging, 5 GiB limits, path/link/special-entry/duplicate checks, world session locks, resource-pack SHA-1, destination non-overwrite and cleanup.

The task was explicitly expanded to full original functionality. These remaining acceptance/compatibility limits must not be hidden:

  • No authenticated Mojang/Realms or GUI click-through/visual run was performed; endpoint/DTO behavior is based on installed 26.3 bytecode and local mock servers.
  • Legacy HTTP upload endpoints accepted by vanilla are deliberately rejected; only HTTPS official authenticated transfer origins are allowed.
  • A blocked transfer read can delay cancellation up to its bounded total timeout (ureq total deadline behavior); do not assume immediate cancellation.
  • Friend notifications use SystemToast rather than vanilla skin-faced FriendToast. The existing Horizon invite-code Friends title entry is not replaced by the full official social/friends-management screen.
  • Snapshot-Realm provisioning and all minor promotional/ping/news flows are not end-to-end validated or fully represented by the UI, despite some service methods being present.
  • No new permanent tests are included per contributor workflow preference; temporary probes and tests are archived locally. Existing tests were retained, with the previously-disabled Realms button expectation adapted to its new screen.

This is necessarily a large integration (separate HTTP/transfer/UI/runtime/entry modules); the already independent biome fix was split out. Review as a draft feature, not a small menu-enable patch.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Independently inspected the installed Minecraft 26.3 client and authlib 10.0.77: OnlineOptionsScreen, PlayerSocialManager, RemoteFriendListUpdateHandler, PresenceHandler, MinecraftServicesFriendsService/UserApiService/DiscoveryService; RealmsClient and DTO/custom JSON adapters, RealmsMainScreen, RealmsSlotOptionsScreen, RealmsCreateWorldFlow, FileUpload/FileDownload and RealmsUploadWorldPacker. Evidence is kept outside the public tree.

Other projects' code

No other implementation copied. Added the existing ecosystem tar crate (MIT/Apache-2.0) as an archive dependency rather than implementing a custom TAR parser; launcher already uses that crate. Existing ureq/flate2/serde and repository facilities are reused.

Self-check

Frozen upstream baseline: 02c8607ee8.

Completed local evidence before removing temporary tests:

  • Combined cargo check -p horizon-client --lib: passed.
  • Realms service, archive/transfer and title behavior tests: 15 passed. Initial repeated-click test caught confirmation/Cancel overlap; the loading Cancel was centered and the unchanged assertion then passed.
  • Actual gameplay library tests: 703 passed, 5 ignored, including 11 OnlineState rollback/presence/notification cases, 4 runtime payload/retry cases and a real temporary-world metadata creation case. An earlier bin-target run matched zero tests and is not counted.
  • Standalone social-client local HTTP tests: 6 passed, including authentication/ETag/DTO/error/cache behavior; strict Clippy passed.
  • Final production source contains no temporary test hooks. Temporary tests and full logs remain archived; existing tests are unchanged except the necessary Realms-enabled expectation.

Final self-check output and follow-up checks are recorded below without rewriting failed/skipped rows:

pr_ready (tools/pr_ready.py --quick --base 02c8607ee8ebd216f2f535c1eb7b62b572830df2 on DESKTOP-3050AHP, against 02c8607ee8 at 02c8607ee, 37 min 28 s)

Check Result
Scope ⚠️ 22 files, +6760 −24; 6784 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ changes with a Cargo.toml
Public tree ✅
Python tests ✅ 614 passed (2 min 53 s)
rustfmt ❌ failed (17 s)
clippy ✅ (1 min 34 s)
tests: workspace ❌ 4479 passed, 1 failed (15 min 35 s)
doc tests ❌ 0 passed (2 min 33 s)
content root tests ✅ 23 passed (7 min 30 s)
mod API up to date ✅ (2 min 7 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (2 s)
launcher clippy ✅ (1 min 41 s)
launcher tests ✅ 437 passed (3 min 9 s)
Parity ➖ 382 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, anvil_turtle_egg, armor_stand_frost, armor_stand_turtle_egg, arrow, arrow_wind_charge, attribute_health, attribute_map_queries, attribute and 370 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Follow-up validation and failure attribution

The table above is unchanged. Its one-line rustfmt failure was corrected; a separate final cargo fmt --all -- --check exited 0. Clippy and subsequent tests read the corrected formatting. The final commit is 864b0cb38677fe0a324156830f6fb08f835e9217; committed file bytes match the recorded source snapshot (one added formatting line explains the final +6761 count).

The workspace failure is horizon-server::http::tests::a_line_past_the_limit_is_a_400, asserting an HTTP 400 prefix at http.rs:335 with an empty response. The same exact test on an independent clean worktree at the frozen upstream baseline failed at the same assertion, exit 101. It remains marked failed; no HTTP code/test was changed.

The first doc-test attempt failed before execution due to a missing shared-target horizon_core rlib. A subsequent same-worktree cargo test --offline --workspace --doc, after rebuilding the dependencies, exited 0. Full gameplay parity remains unrun (--quick). No real-account verification is implied.

Screenshots

Not captured. Native desktop automation was unavailable in this session. Rendering/interaction state tests are not screenshots, and the original Realms visual layout has not been accepted. Keep this PR draft until interactive and authenticated validation and the remaining scope above are resolved.

🤖 Generated with ZCode (GPT-6).


🔄 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/7677 **Author:** [@masa-masa-0314](https://github.com/masa-masa-0314) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/world-online-menu-entrypoints` --- ### 📝 Commits (1) - [`864b0cb`](https://github.com/horizon-rust/horizon/commit/864b0cb38677fe0a324156830f6fb08f835e9217) Online menus: integrate account preferences and Realms flows ### 📊 Changes **22 files changed** (+6761 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+21 -0) 📝 `crates/horizon-client-lib/Cargo.toml` (+2 -0) 📝 `crates/horizon-client-render/src/auth.rs` (+6 -0) 📝 `crates/horizon-client-render/src/lib.rs` (+1 -0) 📝 `crates/horizon-client-render/src/options_ui.rs` (+281 -10) ➕ `crates/horizon-client-render/src/social_service.rs` (+734 -0) 📝 `crates/horizon-client/assets/horizon/lang/en_us.json` (+1 -0) 📝 `crates/horizon-client/src/client_lib.rs` (+6 -4) 📝 `crates/horizon-client/src/game.rs` (+67 -0) 📝 `crates/horizon-client/src/game/advancements.rs` (+4 -1) 📝 `crates/horizon-client/src/game/agent.rs` (+3 -0) ➕ `crates/horizon-client/src/game/online_options.rs` (+555 -0) 📝 `crates/horizon-client/src/game/options.rs` (+1 -0) ➕ `crates/horizon-client/src/game/realms.rs` (+930 -0) ➕ `crates/horizon-client/src/game/realms_entry.rs` (+632 -0) 📝 `crates/horizon-client/src/game/server_packs.rs` (+40 -1) 📝 `crates/horizon-client/src/game/startup_menu.rs` (+85 -2) ➕ `crates/horizon-client/src/realms_service.rs` (+734 -0) ➕ `crates/horizon-client/src/realms_transfer.rs` (+730 -0) 📝 `crates/horizon-client/src/title.rs` (+123 -2) _...and 2 more files_ </details> ### 📄 Description > 🤖 Opened by masa-masa-0314's AI agent (ZCode, GPT-6), not by masa-masa-0314 personally. ## What and why Refs #7502, #7503. Implement the previously missing Online Options services and disabled Realms title flow. The separate saved single-biome generator defect is handled by #7612; this branch contains no worldgen changes. **Integration status:** this is a broad implementation intended for review and authenticated/UI acceptance, not a claim of complete vanilla visual or live-service parity. It will remain draft pending that acceptance. Local compile, protocol, archive, state and metadata tests cover the implementation, but no real user's account or Realm was used. Online Options: - Discovery-backed account attributes, friend preferences and consent, request allowance, notification and presence options, and confirmed Xbox privacy link. - Account/revision-scoped async worker; vanilla enable/disable/error rollback semantics; notification baseline/diff handling and presence NONE/LIMITED/ALL with cooldowns. - Startup-menu and in-game options share the implementation; notification rendering uses existing SystemToast visuals. Realms: - Authenticated service client with the inspected 26.3 cookie/frontend authentication, feature routing, compatibility/parental checks, typed errors and no credential-bearing redirects. - Title screens and async actions for world list/join, invitations/player/operator management, slot/configuration editing, tier-bounded distances/regions, initialization, templates/minigames, backups/restore, subscription links, Terms and invite-code management. - Explicit resource-pack consent, checked download and successful resource reload before joining; cancellation/account guards and startup-to-game handoff. - Create World continuation writes temporary world metadata and data packs, then uploads, matching RealmsCreateWorldFlow without starting a local server. - World transfer staging, 5 GiB limits, path/link/special-entry/duplicate checks, world session locks, resource-pack SHA-1, destination non-overwrite and cleanup. The task was explicitly expanded to full original functionality. These remaining acceptance/compatibility limits must not be hidden: - No authenticated Mojang/Realms or GUI click-through/visual run was performed; endpoint/DTO behavior is based on installed 26.3 bytecode and local mock servers. - Legacy HTTP upload endpoints accepted by vanilla are deliberately rejected; only HTTPS official authenticated transfer origins are allowed. - A blocked transfer read can delay cancellation up to its bounded total timeout (ureq total deadline behavior); do not assume immediate cancellation. - Friend notifications use SystemToast rather than vanilla skin-faced FriendToast. The existing Horizon invite-code Friends title entry is not replaced by the full official social/friends-management screen. - Snapshot-Realm provisioning and all minor promotional/ping/news flows are not end-to-end validated or fully represented by the UI, despite some service methods being present. - No new permanent tests are included per contributor workflow preference; temporary probes and tests are archived locally. Existing tests were retained, with the previously-disabled Realms button expectation adapted to its new screen. This is necessarily a large integration (separate HTTP/transfer/UI/runtime/entry modules); the already independent biome fix was split out. Review as a draft feature, not a small menu-enable patch. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [x] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Independently inspected the installed Minecraft 26.3 client and authlib 10.0.77: OnlineOptionsScreen, PlayerSocialManager, RemoteFriendListUpdateHandler, PresenceHandler, MinecraftServicesFriendsService/UserApiService/DiscoveryService; RealmsClient and DTO/custom JSON adapters, RealmsMainScreen, RealmsSlotOptionsScreen, RealmsCreateWorldFlow, FileUpload/FileDownload and RealmsUploadWorldPacker. Evidence is kept outside the public tree. ## Other projects' code No other implementation copied. Added the existing ecosystem `tar` crate (MIT/Apache-2.0) as an archive dependency rather than implementing a custom TAR parser; launcher already uses that crate. Existing ureq/flate2/serde and repository facilities are reused. ## Self-check Frozen upstream baseline: 02c8607ee8ebd216f2f535c1eb7b62b572830df2. Completed local evidence before removing temporary tests: - Combined `cargo check -p horizon-client --lib`: passed. - Realms service, archive/transfer and title behavior tests: **15 passed**. Initial repeated-click test caught confirmation/Cancel overlap; the loading Cancel was centered and the unchanged assertion then passed. - Actual gameplay library tests: **703 passed, 5 ignored**, including 11 OnlineState rollback/presence/notification cases, 4 runtime payload/retry cases and a real temporary-world metadata creation case. An earlier bin-target run matched zero tests and is not counted. - Standalone social-client local HTTP tests: **6 passed**, including authentication/ETag/DTO/error/cache behavior; strict Clippy passed. - Final production source contains no temporary test hooks. Temporary tests and full logs remain archived; existing tests are unchanged except the necessary Realms-enabled expectation. Final self-check output and follow-up checks are recorded below without rewriting failed/skipped rows: **pr_ready** (`tools/pr_ready.py --quick --base 02c8607ee8ebd216f2f535c1eb7b62b572830df2` on DESKTOP-3050AHP, against 02c8607ee8ebd216f2f535c1eb7b62b572830df2 at 02c8607ee, 37 min 28 s) | Check | Result | | --- | --- | | Scope | ⚠️ 22 files, +6760 −24; 6784 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ changes with a Cargo.toml | | Public tree | ✅ | | Python tests | ✅ 614 passed (2 min 53 s) | | rustfmt | ❌ failed (17 s) | | clippy | ✅ (1 min 34 s) | | tests: workspace | ❌ 4479 passed, 1 failed (15 min 35 s) | | doc tests | ❌ 0 passed (2 min 33 s) | | content root tests | ✅ 23 passed (7 min 30 s) | | mod API up to date | ✅ (2 min 7 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (2 s) | | launcher clippy | ✅ (1 min 41 s) | | launcher tests | ✅ 437 passed (3 min 9 s) | | Parity | ➖ 382 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, anvil_turtle_egg, armor_stand_frost, armor_stand_turtle_egg, arrow, arrow_wind_charge, attribute_health, attribute_map_queries, attribute and 370 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | ### Follow-up validation and failure attribution The table above is unchanged. Its one-line rustfmt failure was corrected; a separate final `cargo fmt --all -- --check` exited 0. Clippy and subsequent tests read the corrected formatting. The final commit is `864b0cb38677fe0a324156830f6fb08f835e9217`; committed file bytes match the recorded source snapshot (one added formatting line explains the final +6761 count). The workspace failure is `horizon-server::http::tests::a_line_past_the_limit_is_a_400`, asserting an HTTP 400 prefix at `http.rs:335` with an empty response. The same exact test on an independent clean worktree at the frozen upstream baseline failed at the same assertion, exit 101. It remains marked failed; no HTTP code/test was changed. The first doc-test attempt failed before execution due to a missing shared-target horizon_core rlib. A subsequent same-worktree `cargo test --offline --workspace --doc`, after rebuilding the dependencies, exited 0. Full gameplay parity remains unrun (`--quick`). No real-account verification is implied. ## Screenshots Not captured. Native desktop automation was unavailable in this session. Rendering/interaction state tests are not screenshots, and the original Realms visual layout has not been accepted. Keep this PR draft until interactive and authenticated validation and the remaining scope above are resolved. 🤖 Generated with ZCode (GPT-6). --- <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#7755
No description provided.