[PR #4736] [MERGED] Chat drafts: ChatScreen exit reasons (shouldDiscardDraft, removed) #5816

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

📋 Pull Request Information

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

Base: main ← Head: parity/01-chatdraft


📝 Commits (1)

  • d8d6dd1 Chat drafts follow ChatScreen.ExitReason: an interrupted chat keeps its text

📊 Changes

2 files changed (+51 additions, -11 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+1 -1)
📝 crates/horizon-client/src/game/chat.rs (+50 -10)

📄 Description

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

Part of #3518

Rows done:

  • ChatScreen.shouldDiscardDraft: new ChatExit (Interrupted / Intentional / Done) and should_discard_draft; Escape keeps the draft only with Save Chat Drafts, a sent message discards it, an interruption always keeps it.
  • ChatScreen.removed: an open chat that another screen replaces (death, a container the server opens) now runs the removal with the INTERRUPTED reason and keeps the typed text as the draft regardless of the option (before, it was left stale).

Vanilla followed: ChatScreen.removed, ChatScreen.shouldDiscardDraft, ChatScreen.onClose, ChatScreen.keyPressed (DONE).

Tests: game::chat::tests::draft_discard_follows_the_exit_reason; fmt and clippy -D warnings on horizon-client.

🤖 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/4736 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/01-chatdraft` --- ### 📝 Commits (1) - [`d8d6dd1`](https://github.com/horizon-rust/horizon/commit/d8d6dd15aabaa0615286b98e567db00416d91b1b) Chat drafts follow ChatScreen.ExitReason: an interrupted chat keeps its text ### 📊 Changes **2 files changed** (+51 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+1 -1) 📝 `crates/horizon-client/src/game/chat.rs` (+50 -10) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3518 Rows done: - `ChatScreen.shouldDiscardDraft`: new `ChatExit` (Interrupted / Intentional / Done) and `should_discard_draft`; Escape keeps the draft only with Save Chat Drafts, a sent message discards it, an interruption always keeps it. - `ChatScreen.removed`: an open chat that another screen replaces (death, a container the server opens) now runs the removal with the INTERRUPTED reason and keeps the typed text as the draft regardless of the option (before, it was left stale). Vanilla followed: `ChatScreen.removed`, `ChatScreen.shouldDiscardDraft`, `ChatScreen.onClose`, `ChatScreen.keyPressed` (DONE). Tests: `game::chat::tests::draft_discard_follows_the_exit_reason`; fmt and clippy -D warnings on horizon-client. 🤖 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:15:12 +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#5816
No description provided.