[PR #5341] [MERGED] Run the screens' narration while the narrator can speak, whatever its status #6222

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

📋 Pull Request Information

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

Base: main ← Head: narrator/09-status


📝 Commits (10+)

  • 19c2a6f Narrate chat, overlays and the game's messages where vanilla does
  • 93adc09 Port NarratorLinux: flite's cmu_us_kal16 voice on the narrator
  • b309894 Add horizon-ctl narration: the narrator's status and recent messages
  • 0308ba7 Port NarratorMac: NSSpeechSynthesizer on the narrator
  • 7983abb Turn the macOS speech thread's run loop over while it idles
  • c635604 Record each frame's screen narration beside its widgets
  • 9ddec4a Narrate the open screen from its recorded narration as Screen does
  • 8d221f0 Narrate the title screens, options pages, pause menu and death screen
  • 3c407d1 Narrate the container screens, books and the sign editor by their titles
  • 6f67cb3 Narrate the chat, level loading, connect, saving and credits screens

📊 Changes

56 files changed (+3942 additions, -156 deletions)

View changed files

📝 Cargo.lock (+4 -0)
📝 crates/horizon-client-render/src/chat.rs (+50 -4)
📝 crates/horizon-client-render/src/chat_tests.rs (+33 -0)
📝 crates/horizon-client-render/src/options_ui.rs (+15 -0)
📝 crates/horizon-client-render/src/screen_draw.rs (+23 -9)
📝 crates/horizon-client-render/src/tab_list.rs (+44 -1)
📝 crates/horizon-client-render/src/ui.rs (+19 -0)
📝 crates/horizon-client-render/src/widgets.rs (+621 -0)
📝 crates/horizon-client/src/bin/horizon-ctl/commands.rs (+3 -0)
📝 crates/horizon-client/src/game.rs (+52 -1)
📝 crates/horizon-client/src/game/advancements_screen.rs (+6 -0)
📝 crates/horizon-client/src/game/beacon.rs (+7 -0)
📝 crates/horizon-client/src/game/books.rs (+53 -1)
📝 crates/horizon-client/src/game/chat.rs (+21 -1)
📝 crates/horizon-client/src/game/code_of_conduct.rs (+20 -0)
📝 crates/horizon-client/src/game/command_blocks.rs (+12 -0)
📝 crates/horizon-client/src/game/control.rs (+11 -0)
📝 crates/horizon-client/src/game/creative_hotbar.rs (+2 -0)
📝 crates/horizon-client/src/game/debug_keys.rs (+7 -2)
📝 crates/horizon-client/src/game/friends.rs (+3 -0)

...and 36 more files

📄 Description

🤖 Opened by leifiyoo's AI agent (Claude), not by leifiyoo.

Part 9 of 16 of the narrator series. All 16 PRs have to be merged, in this order, for the narrator to work completely: #5333 → #5334 → #5335 → #5336 → #5337 → #5338 → #5339 → #5340 → #5341 → #5342 → #5343 → #5344 → #5346 → #5347 → #5348 → #5349. Each PR builds on the one before it (stacked branches), so until the previous one is merged this PR's diff also shows its commits; merging only some of them, or out of order, leaves the narrator unfinished.

Stacked on #5340 — merge that first; until then this PR also shows its commits.

Turning the narrator on in the options now says only what changed, as vanilla does, instead of the whole screen; and the widget kinds the next PRs need can be recorded.

What vanilla does

Screen.shouldRunNarration is GameNarrator.isActive(), not the status: with the narrator Off the screen's narration still runs and is marked said, so the click that turns it on narrates only the change 200 ms later.

What changed

  • crates/horizon-client/src/screen_narrator.rs: the narration runs while the narrator is active, whatever its status.
  • crates/horizon-client-render/src/widgets.rs: text widgets, cycle buttons with their own narration, list rows by name, naming or moving a shared drawer's record after the fact (last_narratable, narratables_mark / move_narratables), and the drawers hear which widget is focused.

How it was tested

  • cargo test -p horizon-client --lib screen_narrator, cargo test -p horizon-client-render --lib widgets.
  • clippy (all targets) clean at this tip; fmt.

🤖 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/5341 **Author:** [@leifiyoo](https://github.com/leifiyoo) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `narrator/09-status` --- ### 📝 Commits (10+) - [`19c2a6f`](https://github.com/horizon-rust/horizon/commit/19c2a6ff82507ef54d26cfb381f8ecc01c9565fb) Narrate chat, overlays and the game's messages where vanilla does - [`93adc09`](https://github.com/horizon-rust/horizon/commit/93adc0997c67723c684c2644f1af349798787c13) Port NarratorLinux: flite's cmu_us_kal16 voice on the narrator - [`b309894`](https://github.com/horizon-rust/horizon/commit/b309894c945d30637be8a347b8ff34a020520f5c) Add horizon-ctl narration: the narrator's status and recent messages - [`0308ba7`](https://github.com/horizon-rust/horizon/commit/0308ba799fdd9fc680c5e9d177a2f98dfd9b259b) Port NarratorMac: NSSpeechSynthesizer on the narrator - [`7983abb`](https://github.com/horizon-rust/horizon/commit/7983abb95e233ec78b05996ded3ffe83bd05ed8e) Turn the macOS speech thread's run loop over while it idles - [`c635604`](https://github.com/horizon-rust/horizon/commit/c635604a89164a91b89f455839d8d1ce943dac0d) Record each frame's screen narration beside its widgets - [`9ddec4a`](https://github.com/horizon-rust/horizon/commit/9ddec4a5493a377e7eb06bd441b84aa01bd24455) Narrate the open screen from its recorded narration as Screen does - [`8d221f0`](https://github.com/horizon-rust/horizon/commit/8d221f0055ad0518c28c797b13aa5195d4304efa) Narrate the title screens, options pages, pause menu and death screen - [`3c407d1`](https://github.com/horizon-rust/horizon/commit/3c407d1c425b66c398a78799153affcc63e95a4f) Narrate the container screens, books and the sign editor by their titles - [`6f67cb3`](https://github.com/horizon-rust/horizon/commit/6f67cb30802edb4113916ae4bd734677405974ad) Narrate the chat, level loading, connect, saving and credits screens ### 📊 Changes **56 files changed** (+3942 additions, -156 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+4 -0) 📝 `crates/horizon-client-render/src/chat.rs` (+50 -4) 📝 `crates/horizon-client-render/src/chat_tests.rs` (+33 -0) 📝 `crates/horizon-client-render/src/options_ui.rs` (+15 -0) 📝 `crates/horizon-client-render/src/screen_draw.rs` (+23 -9) 📝 `crates/horizon-client-render/src/tab_list.rs` (+44 -1) 📝 `crates/horizon-client-render/src/ui.rs` (+19 -0) 📝 `crates/horizon-client-render/src/widgets.rs` (+621 -0) 📝 `crates/horizon-client/src/bin/horizon-ctl/commands.rs` (+3 -0) 📝 `crates/horizon-client/src/game.rs` (+52 -1) 📝 `crates/horizon-client/src/game/advancements_screen.rs` (+6 -0) 📝 `crates/horizon-client/src/game/beacon.rs` (+7 -0) 📝 `crates/horizon-client/src/game/books.rs` (+53 -1) 📝 `crates/horizon-client/src/game/chat.rs` (+21 -1) 📝 `crates/horizon-client/src/game/code_of_conduct.rs` (+20 -0) 📝 `crates/horizon-client/src/game/command_blocks.rs` (+12 -0) 📝 `crates/horizon-client/src/game/control.rs` (+11 -0) 📝 `crates/horizon-client/src/game/creative_hotbar.rs` (+2 -0) 📝 `crates/horizon-client/src/game/debug_keys.rs` (+7 -2) 📝 `crates/horizon-client/src/game/friends.rs` (+3 -0) _...and 36 more files_ </details> ### 📄 Description > 🤖 Opened by leifiyoo's AI agent (Claude), not by leifiyoo. **Part 9 of 16 of the narrator series.** All 16 PRs have to be merged, in this order, for the narrator to work completely: #5333 → #5334 → #5335 → #5336 → #5337 → #5338 → #5339 → #5340 → #5341 → #5342 → #5343 → #5344 → #5346 → #5347 → #5348 → #5349. Each PR builds on the one before it (stacked branches), so until the previous one is merged this PR's diff also shows its commits; merging only some of them, or out of order, leaves the narrator unfinished. Stacked on #5340 — merge that first; until then this PR also shows its commits. Turning the narrator on in the options now says only what changed, as vanilla does, instead of the whole screen; and the widget kinds the next PRs need can be recorded. ## What vanilla does `Screen.shouldRunNarration` is `GameNarrator.isActive()`, not the status: with the narrator Off the screen's narration still runs and is marked said, so the click that turns it on narrates only the change 200 ms later. ## What changed - `crates/horizon-client/src/screen_narrator.rs`: the narration runs while the narrator is active, whatever its status. - `crates/horizon-client-render/src/widgets.rs`: text widgets, cycle buttons with their own narration, list rows by name, naming or moving a shared drawer's record after the fact (`last_narratable`, `narratables_mark` / `move_narratables`), and the drawers hear which widget is focused. ## How it was tested - `cargo test -p horizon-client --lib screen_narrator`, `cargo test -p horizon-client-render --lib widgets`. - clippy (all targets) clean at this tip; fmt. 🤖 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:16:04 +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#6222
No description provided.