[PR #4789] [MERGED] Fix chat open_url links from legacy clickEvent JSON #5852

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4789
Author: @WooCaash
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/4408-chat-links


📝 Commits (2)

  • 43f1421 Fix chat open_url links from legacy clickEvent JSON.
  • 814a859 Treat only integer SNBT bytes as style flags.

📊 Changes

3 files changed (+119 additions, -44 deletions)

View changed files

📝 crates/horizon-client-core/src/component.rs (+114 -39)
📝 crates/horizon-client/src/game/chat.rs (+4 -4)
📝 crates/horizon-client/src/game/dialogs.rs (+1 -1)

📄 Description

🤖 Opened by WooCaash's AI agent (Cursor Composer), not by WooCaash personally.

Summary

  • Parse legacy clickEvent / hoverEvent and the old value field so /tellraw and SNBT open_url links become clickable again (ConfirmLink / Web Links options).
  • Accept SNBT 1b/0b style flags so underline/bold on those links render.
  • Pointing-hand cursor over clickable chat text; read chat_links_prompt from settings consistently.

Fixes #4408

Test plan

  • /tellraw @s {"text":"https://example.com","underlined":1b,"clickEvent":{"action":"open_url","value":"https://example.com"}} — blue underline, click opens the confirm prompt
  • Same with modern click_event / url still works
  • Web Links off ignores the click; Prompt on Links off opens the browser directly

pr_ready (tools/pr_ready.py --quick --base upstream/main on MacBook-Air-ukasz, against upstream/main at be529ea12, 4 min 52 s)

Check Result
Scope ✅ 4 files, +119 −44
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (26 s)
rustfmt ✅ (4 s)
clippy ✅ (1 min 16 s)
tests: horizon-client, horizon-client-core ✅ 1267 passed (3 min 3 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 358 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 346 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Cursor

Made with Cursor


🔄 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/4789 **Author:** [@WooCaash](https://github.com/WooCaash) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/4408-chat-links` --- ### 📝 Commits (2) - [`43f1421`](https://github.com/horizon-rust/horizon/commit/43f142115b26fd32f0de51d3bc7a8550038b0675) Fix chat open_url links from legacy clickEvent JSON. - [`814a859`](https://github.com/horizon-rust/horizon/commit/814a8592da282f1a22eb177db3d89f991cef2f68) Treat only integer SNBT bytes as style flags. ### 📊 Changes **3 files changed** (+119 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-core/src/component.rs` (+114 -39) 📝 `crates/horizon-client/src/game/chat.rs` (+4 -4) 📝 `crates/horizon-client/src/game/dialogs.rs` (+1 -1) </details> ### 📄 Description > 🤖 Opened by WooCaash's AI agent (Cursor Composer), not by WooCaash personally. ## Summary - Parse legacy `clickEvent` / `hoverEvent` and the old `value` field so `/tellraw` and SNBT open_url links become clickable again (ConfirmLink / Web Links options). - Accept SNBT `1b`/`0b` style flags so underline/bold on those links render. - Pointing-hand cursor over clickable chat text; read `chat_links_prompt` from settings consistently. Fixes #4408 ## Test plan - [ ] `/tellraw @s {"text":"https://example.com","underlined":1b,"clickEvent":{"action":"open_url","value":"https://example.com"}}` — blue underline, click opens the confirm prompt - [ ] Same with modern `click_event` / `url` still works - [ ] Web Links off ignores the click; Prompt on Links off opens the browser directly **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on MacBook-Air-ukasz, against upstream/main at be529ea12, 4 min 52 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +119 −44 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (26 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (1 min 16 s) | | tests: horizon-client, horizon-client-core | ✅ 1267 passed (3 min 3 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 358 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 346 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Cursor](https://cursor.com) Made with [Cursor](https://cursor.com) --- <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:26 +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#5852
No description provided.