[PR #4926] [MERGED] Show ban notices before the title screen (Gui.addInitialScreens) #5947

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4926
Author: @levzzz5154
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @levzzz5154

Base: main ← Head: parity/BAN-notices


📝 Commits (1)

  • e8b180b Show the account's ban notices before the title screen

📊 Changes

8 files changed (+576 additions, -2 deletions)

View changed files

📝 crates/horizon-client-render/src/auth.rs (+40 -0)
➕ crates/horizon-client-render/src/ban_notice.rs (+373 -0)
📝 crates/horizon-client-render/src/lib.rs (+1 -0)
📝 crates/horizon-client/src/game.rs (+5 -0)
📝 crates/horizon-client/src/game/agent.rs (+1 -0)
📝 crates/horizon-client/src/game/startup_menu.rs (+5 -0)
📝 crates/horizon-client/src/lib.rs (+1 -1)
📝 crates/horizon-client/src/title.rs (+150 -1)

📄 Description

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

Part of #3518

Rows

  • Gui.addInitialScreens / Gui.buildInitialScreens: the ban notices queued before the title screen (the accessibility onboarding was #4706). For a real online session a thread fetches the account's attributes (player service getAttributes, bearer token) and profile (session getProfileById) through the services discovery document, as Minecraft's constructor futures do. The multiplayer ban, the forced name change and the banned skin become BanNoticeScreens in vanilla's order, shown as ConfirmLinkScreens (Open in Browser, Copy to Clipboard, Acknowledge; Escape acknowledges) with vanilla's gui.banned.* text and BanReason ids; each runs next, the last one reaches the title. The Multiplayer button follows Minecraft.allowsMultiplayer (servers privilege, no multiplayer ban, no forced name change).
  • Offline and failed fetches skip it, as vanilla (OFFLINE_PROPERTIES). Difference: vanilla blocks on the futures, Horizon shows the title and opens the notices once the answer arrives.

Vanilla followed

Gui.addInitialScreens, BanNoticeScreens.*, Minecraft.multiplayerBan/isNameBanned/allowsMultiplayer, authlib MinecraftServicesUserApiService.fetchProperties, MinecraftServicesSessionService.fetchProfile.

Tests

cargo test -p horizon-client-render --lib ban_notice (JSON parsing, queue order, texts and durations), cargo test -p horizon-client --lib ban_notices (chain and the Multiplayer button). No network in tests. fmt and clippy -D warnings clean.

🤖 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/4926 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/BAN-notices` --- ### 📝 Commits (1) - [`e8b180b`](https://github.com/horizon-rust/horizon/commit/e8b180b01e058f839a1477d502e6dec1ee066402) Show the account's ban notices before the title screen ### 📊 Changes **8 files changed** (+576 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/auth.rs` (+40 -0) ➕ `crates/horizon-client-render/src/ban_notice.rs` (+373 -0) 📝 `crates/horizon-client-render/src/lib.rs` (+1 -0) 📝 `crates/horizon-client/src/game.rs` (+5 -0) 📝 `crates/horizon-client/src/game/agent.rs` (+1 -0) 📝 `crates/horizon-client/src/game/startup_menu.rs` (+5 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -1) 📝 `crates/horizon-client/src/title.rs` (+150 -1) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3518 ## Rows - `Gui.addInitialScreens` / `Gui.buildInitialScreens`: the ban notices queued before the title screen (the accessibility onboarding was #4706). For a real online session a thread fetches the account's attributes (`player` service `getAttributes`, bearer token) and profile (`session` `getProfileById`) through the services discovery document, as `Minecraft`'s constructor futures do. The multiplayer ban, the forced name change and the banned skin become `BanNoticeScreens` in vanilla's order, shown as ConfirmLinkScreens (Open in Browser, Copy to Clipboard, Acknowledge; Escape acknowledges) with vanilla's `gui.banned.*` text and `BanReason` ids; each runs `next`, the last one reaches the title. The Multiplayer button follows `Minecraft.allowsMultiplayer` (servers privilege, no multiplayer ban, no forced name change). - Offline and failed fetches skip it, as vanilla (`OFFLINE_PROPERTIES`). Difference: vanilla blocks on the futures, Horizon shows the title and opens the notices once the answer arrives. ## Vanilla followed `Gui.addInitialScreens`, `BanNoticeScreens.*`, `Minecraft.multiplayerBan/isNameBanned/allowsMultiplayer`, authlib `MinecraftServicesUserApiService.fetchProperties`, `MinecraftServicesSessionService.fetchProfile`. ## Tests `cargo test -p horizon-client-render --lib ban_notice` (JSON parsing, queue order, texts and durations), `cargo test -p horizon-client --lib ban_notices` (chain and the Multiplayer button). No network in tests. fmt and clippy -D warnings clean. 🤖 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:16:08 +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#5947
No description provided.