[PR #2668] [MERGED] Keep the command history between runs and show the restricted chat prompt #4523

Closed
opened 2026-11-03 04:17:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2668
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/chat-history-restricted


📝 Commits (1)

  • f918fc7 Keep the command history between runs and show the restricted chat prompt

📊 Changes

3 files changed (+112 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/chat.rs (+99 -1)
📝 crates/horizon-client/src/game.rs (+1 -1)
📝 crates/horizon-client/src/game/chat.rs (+12 -0)

📄 Description

What and why

  • Commands you send are kept in command_history.txt in the game folder (the last 50), and the chat's Up arrow history starts from them on the next run. Before, the history was only in memory.
  • With Chat set to Commands Only or Hidden, the open chat screen shows the red, underlined "Chat is restricted. Click this message for details." line above the messages, on its own background row, clipped to the chat width. The click that opens the Restrictions screen is not added, as Horizon has no such screen.

Vanilla reference

  • CommandHistory (50 entries, command_history.txt), ChatComponent.addRecentChat (only lines starting with / are saved) and the ChatComponent constructor that loads them.
  • ChatComponent.extractRenderState for DisplayMode.FOREGROUND_RESTRICTED (chat_screen.restricted), shown when ChatAbilities.hasAnyRestrictions.

Self-check

cargo check -p horizon-client passes.


🔄 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/2668 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/chat-history-restricted` --- ### 📝 Commits (1) - [`f918fc7`](https://github.com/horizon-rust/horizon/commit/f918fc711a2df776d13bc3acf7e6c0fc9cd6faed) Keep the command history between runs and show the restricted chat prompt ### 📊 Changes **3 files changed** (+112 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/chat.rs` (+99 -1) 📝 `crates/horizon-client/src/game.rs` (+1 -1) 📝 `crates/horizon-client/src/game/chat.rs` (+12 -0) </details> ### 📄 Description ## What and why - Commands you send are kept in `command_history.txt` in the game folder (the last 50), and the chat's Up arrow history starts from them on the next run. Before, the history was only in memory. - With Chat set to Commands Only or Hidden, the open chat screen shows the red, underlined "Chat is restricted. Click this message for details." line above the messages, on its own background row, clipped to the chat width. The click that opens the Restrictions screen is not added, as Horizon has no such screen. ## Vanilla reference - `CommandHistory` (50 entries, `command_history.txt`), `ChatComponent.addRecentChat` (only lines starting with `/` are saved) and the `ChatComponent` constructor that loads them. - `ChatComponent.extractRenderState` for `DisplayMode.FOREGROUND_RESTRICTED` (`chat_screen.restricted`), shown when `ChatAbilities.hasAnyRestrictions`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:17:47 +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#4523
No description provided.