[PR #6043] [MERGED] Add the Social Interactions screen (hide players' chat) #6624

Closed
opened 2026-11-03 06:23:56 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6043
Author: @xFedeT
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: feat/social-interactions


📝 Commits (1)

  • 42c3381 Add the Social Interactions screen: hide players' chat

📊 Changes

11 files changed (+809 additions, -13 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+25 -0)
📝 crates/horizon-client/src/game/agent.rs (+1 -0)
📝 crates/horizon-client/src/game/control.rs (+6 -0)
📝 crates/horizon-client/src/game/ime.rs (+2 -1)
📝 crates/horizon-client/src/game/narrator.rs (+1 -1)
📝 crates/horizon-client/src/game/remote.rs (+9 -0)
📝 crates/horizon-client/src/game/scoreboard.rs (+1 -1)
📝 crates/horizon-client/src/game/screens.rs (+12 -10)
➕ crates/horizon-client/src/game/social.rs (+244 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)
➕ crates/horizon-client/src/social_screen.rs (+507 -0)

📄 Description

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

Part of #5954 (option (a), as the maintainer asked: the Social Interactions screen, local hide only; Realms and the friends service are not touched).

What

SocialInteractionsScreen, opened with P or the pause menu's player reporting icon (now active):

  • All / Hidden / Blocked tabs, the server label (gui.socialInteractions.server_label.*), a 16-character search box (an EditBox, focused from the start), the list with a face, name and the hide/show chat button per player, and Done.
  • Hiding a player says so in the chat (hidden_in_chat / shown_in_chat) and drops that player's chat messages (Minecraft.isBlocked in ChatListener.showMessageToPlayer); the message counts as processed, not shown, so the chat acknowledgements stay right.
  • Rows sort as SocialInteractionsPlayerList.sortPlayerEntries does (local player first, then names by case-insensitive order); a hidden player who left stays in Hidden, shaded, with the offline status.
  • Layout follows vanilla: panel at marginX + 3, rows 2px inset (getContentX/Y), first row at list top + 2, scissor 4px below the top, and the list's own content height for scrolling.
  • Also wired for horizon-ctl (screen name social, widgets, type) and the IME.

Files: social_screen.rs (pure layout, draw, click, tests), game/social.rs (state, view, input), small hooks in game.rs, game/{screens,remote,control,ime,narrator,agent,scoreboard}.rs.

Not done (needs Mojang's services or is out of scope)

  • Blocked tab: always empty (UserApiService.isBlockedPlayer; vanilla's offline mode does the same). The blocking-hint button is therefore never shown.
  • Report button: the disabled sprite vanilla shows when reporting is off.
  • "Seen players" offline entries from the chat log, and DisguisedChat / hideMatchedNames filtering.

Verification

  • cargo test -p horizon-client --lib social, and pr_ready --quick: horizon-client tests 1707 passed; clippy -D warnings and rustfmt clean after the final commit. The Python test errors are hashlib.file_digest missing on this machine's Python, not from this change.
  • Live with horizon-ctl (offscreen): P opens the screen, tabs switch, "No players hidden in chat", search filters ("play" keeps the player, "zzz" shows "Couldn't find any players with that name"), Done and Esc close it, the pause icon opens it. The layout and the search box were also checked by hand against vanilla.
  • Not exercised live: hiding another player's chat with a second player online (the unit tests cover the sort and the click targets; the chat filter is a four-line branch in C::PlayerChat).

🤖 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/6043 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/social-interactions` --- ### 📝 Commits (1) - [`42c3381`](https://github.com/horizon-rust/horizon/commit/42c338167d11ae079f9741bb541a8e3dac2db9d3) Add the Social Interactions screen: hide players' chat ### 📊 Changes **11 files changed** (+809 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+25 -0) 📝 `crates/horizon-client/src/game/agent.rs` (+1 -0) 📝 `crates/horizon-client/src/game/control.rs` (+6 -0) 📝 `crates/horizon-client/src/game/ime.rs` (+2 -1) 📝 `crates/horizon-client/src/game/narrator.rs` (+1 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+9 -0) 📝 `crates/horizon-client/src/game/scoreboard.rs` (+1 -1) 📝 `crates/horizon-client/src/game/screens.rs` (+12 -10) ➕ `crates/horizon-client/src/game/social.rs` (+244 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) ➕ `crates/horizon-client/src/social_screen.rs` (+507 -0) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Part of #5954 (option (a), as the maintainer asked: the Social Interactions screen, local hide only; Realms and the friends service are not touched). ## What `SocialInteractionsScreen`, opened with **P** or the pause menu's player reporting icon (now active): - All / Hidden / Blocked tabs, the server label (`gui.socialInteractions.server_label.*`), a 16-character search box (an `EditBox`, focused from the start), the list with a face, name and the hide/show chat button per player, and Done. - Hiding a player says so in the chat (`hidden_in_chat` / `shown_in_chat`) and drops that player's chat messages (`Minecraft.isBlocked` in `ChatListener.showMessageToPlayer`); the message counts as processed, not shown, so the chat acknowledgements stay right. - Rows sort as `SocialInteractionsPlayerList.sortPlayerEntries` does (local player first, then names by case-insensitive order); a hidden player who left stays in Hidden, shaded, with the offline status. - Layout follows vanilla: panel at `marginX + 3`, rows 2px inset (`getContentX/Y`), first row at list top + 2, scissor 4px below the top, and the list's own content height for scrolling. - Also wired for `horizon-ctl` (screen name `social`, widgets, `type`) and the IME. Files: `social_screen.rs` (pure layout, draw, click, tests), `game/social.rs` (state, view, input), small hooks in `game.rs`, `game/{screens,remote,control,ime,narrator,agent,scoreboard}.rs`. ## Not done (needs Mojang's services or is out of scope) - Blocked tab: always empty (`UserApiService.isBlockedPlayer`; vanilla's offline mode does the same). The blocking-hint button is therefore never shown. - Report button: the disabled sprite vanilla shows when reporting is off. - "Seen players" offline entries from the chat log, and `DisguisedChat` / `hideMatchedNames` filtering. ## Verification - `cargo test -p horizon-client --lib social`, and `pr_ready --quick`: horizon-client tests 1707 passed; clippy `-D warnings` and rustfmt clean after the final commit. The Python test errors are `hashlib.file_digest` missing on this machine's Python, not from this change. - Live with `horizon-ctl` (offscreen): P opens the screen, tabs switch, "No players hidden in chat", search filters ("play" keeps the player, "zzz" shows "Couldn't find any players with that name"), Done and Esc close it, the pause icon opens it. The layout and the search box were also checked by hand against vanilla. - Not exercised live: hiding another player's chat with a second player online (the unit tests cover the sort and the click targets; the chat filter is a four-line branch in `C::PlayerChat`). 🤖 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 06:23:56 +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#6624
No description provided.