[PR #176] [MERGED] Fix screenshot, seed, and locate chat click actions #2379

Closed
opened 2026-11-02 15:55:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/176
Author: @rdbtCVS
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @ludovic111

Base: main ← Head: t3code/fix-screenshot-seed-actions


📝 Commits (3)

  • d25d618 fix: enable screenshot and seed chat click actions
  • 9f07f64 fix: unify locate teleport suggestion links
  • c166ea5 fix: match vanilla screenshot and seed link behavior

📊 Changes

9 files changed (+348 additions, -75 deletions)

View changed files

📝 crates/horizon-client/src/chat.rs (+39 -1)
➕ crates/horizon-client/src/chat_tests.rs (+165 -0)
📝 crates/horizon-client/src/game/chat.rs (+44 -9)
📝 crates/horizon-client/src/game/commands.rs (+5 -50)
📝 crates/horizon-client/src/game/commands/extra.rs (+3 -3)
📝 crates/horizon-client/src/game/commands/misc.rs (+1 -1)
📝 crates/horizon-client/src/game/functions.rs (+3 -1)
📝 crates/horizon-client/src/scoreboard.rs (+1 -1)
📝 crates/horizon-client/src/text.rs (+87 -9)

📄 Description

Chat clicks previously reached only the input and autocomplete list, so screenshot filenames, /seed results, and /locate coordinates did nothing. Screenshot links now open the saved PNG in the system image viewer. Clicking the green seed value copies the raw seed; its brackets inherit the surrounding color and carry no click or hover action. Locate links fill the open chat with a /tp @s … command for the player to submit.

Typed click events are serialized with text styles and hit-tested against the displayed spans, accounting for font advances, scale, wrapping, line spacing, and scrolling. Structure and POI coordinates use relative height (~), while biome coordinates use the located Y. OpenFile is documented as restricted to locally constructed messages.

Validation:

  • cargo +stable test --workspace --quiet
  • cargo +stable clippy --workspace --all-targets -- -D warnings
  • cargo +stable fmt --all -- --check
  • python -m unittest discover -s tests -q — 173 tests passed.
  • Public-tree checks for the working tree and Git history passed.

The client tests cover seed values including i64::MIN and i64::MAX, both bracket click boundaries and inherited colors, screenshot file paths with spaces and Unicode, scaled/wrapped/scrolled click targets, click-event serialization and inheritance, and locate-to-teleport suggestions.


🔄 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/176 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3code/fix-screenshot-seed-actions` --- ### 📝 Commits (3) - [`d25d618`](https://github.com/horizon-rust/horizon/commit/d25d6184c2289ad68c4d9bfe38a9d57bd4490933) fix: enable screenshot and seed chat click actions - [`9f07f64`](https://github.com/horizon-rust/horizon/commit/9f07f64bff5513d7ed34cdbb741fac68e6f1ef6c) fix: unify locate teleport suggestion links - [`c166ea5`](https://github.com/horizon-rust/horizon/commit/c166ea57d1d583fac281d9f12c534b4245b09a6b) fix: match vanilla screenshot and seed link behavior ### 📊 Changes **9 files changed** (+348 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/chat.rs` (+39 -1) ➕ `crates/horizon-client/src/chat_tests.rs` (+165 -0) 📝 `crates/horizon-client/src/game/chat.rs` (+44 -9) 📝 `crates/horizon-client/src/game/commands.rs` (+5 -50) 📝 `crates/horizon-client/src/game/commands/extra.rs` (+3 -3) 📝 `crates/horizon-client/src/game/commands/misc.rs` (+1 -1) 📝 `crates/horizon-client/src/game/functions.rs` (+3 -1) 📝 `crates/horizon-client/src/scoreboard.rs` (+1 -1) 📝 `crates/horizon-client/src/text.rs` (+87 -9) </details> ### 📄 Description Chat clicks previously reached only the input and autocomplete list, so screenshot filenames, `/seed` results, and `/locate` coordinates did nothing. Screenshot links now open the saved PNG in the system image viewer. Clicking the green seed value copies the raw seed; its brackets inherit the surrounding color and carry no click or hover action. Locate links fill the open chat with a `/tp @s …` command for the player to submit. Typed click events are serialized with text styles and hit-tested against the displayed spans, accounting for font advances, scale, wrapping, line spacing, and scrolling. Structure and POI coordinates use relative height (`~`), while biome coordinates use the located Y. `OpenFile` is documented as restricted to locally constructed messages. Validation: - `cargo +stable test --workspace --quiet` - `cargo +stable clippy --workspace --all-targets -- -D warnings` - `cargo +stable fmt --all -- --check` - `python -m unittest discover -s tests -q` — 173 tests passed. - Public-tree checks for the working tree and Git history passed. The client tests cover seed values including `i64::MIN` and `i64::MAX`, both bracket click boundaries and inherited colors, screenshot file paths with spaces and Unicode, scaled/wrapped/scrolled click targets, click-event serialization and inheritance, and locate-to-teleport suggestions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:55:28 +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#2379
No description provided.