[PR #5630] [MERGED] Close a leaving player's open menu before saving them #6401

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

📋 Pull Request Information

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

Base: main ← Head: fix/close-menus-on-leave


📝 Commits (1)

  • 7a19762 Close a leaving guest's open menu before the player is saved

📊 Changes

2 files changed (+59 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/lan.rs (+27 -6)
📝 crates/horizon-client/src/game/lan_actions.rs (+32 -0)

📄 Description

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

Leaving the server left the player's menu half open: the cursor stack, trade payment slots and grid/station inputs stayed in it, a trade was never written back to the villager, and a vehicle's stand-in container stayed in the level.

  • New guest_close_all runs the same close code as ContainerClose for every menu kind (container lid, vehicle stand-in, merchant, crafting table, station/lectern, mount) and returns the cursor stack.
  • It runs from HostEvent::Left, and from save_leaving_guests (LAN close, dedicated stop, integrated stop), in the guest's own level and before the playerdata is saved.

Checks run: cargo fmt, cargo clippy -p horizon-client --lib --bins -D warnings. Not run: lan_e2e and the parity harnesses (no vanilla data in this checkout).

🤖 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/5630 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/close-menus-on-leave` --- ### 📝 Commits (1) - [`7a19762`](https://github.com/horizon-rust/horizon/commit/7a19762534ec5626c64ab85edb41c58b87247e8e) Close a leaving guest's open menu before the player is saved ### 📊 Changes **2 files changed** (+59 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan.rs` (+27 -6) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+32 -0) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Claude Code, Sonnet 5.5), not by rdbtCVS personally. Leaving the server left the player's menu half open: the cursor stack, trade payment slots and grid/station inputs stayed in it, a trade was never written back to the villager, and a vehicle's stand-in container stayed in the level. - New `guest_close_all` runs the same close code as `ContainerClose` for every menu kind (container lid, vehicle stand-in, merchant, crafting table, station/lectern, mount) and returns the cursor stack. - It runs from `HostEvent::Left`, and from `save_leaving_guests` (LAN close, dedicated stop, integrated stop), in the guest's own level and before the playerdata is saved. Checks run: `cargo fmt`, `cargo clippy -p horizon-client --lib --bins -D warnings`. Not run: `lan_e2e` and the parity harnesses (no vanilla data in this checkout). 🤖 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:19: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#6401
No description provided.