[PR #3210] [MERGED] fix(windows): open URLs with the registered protocol handler #4847

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3210
Author: @PH4N7OMx
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: codex/windows-default-browser


📝 Commits (1)

  • 998c94b fix(windows): open URLs with the registered protocol handler

📊 Changes

3 files changed (+47 additions, -0 deletions)

View changed files

📝 Cargo.lock (+37 -0)
📝 crates/horizon-client/Cargo.toml (+2 -0)
📝 crates/horizon-client/src/game/packs.rs (+8 -0)

📄 Description

🤖 Opened by PH4N7OMx's AI agent (OpenAI Codex), not by PH4N7OMx himself.

On Windows, confirming a chat URL calls the folder opener, which invokes explorer URL. Use open::that_detached with shellexecute-on-windows to dispatch the URL through the registered protocol handler instead. Unicode URLs and query separators go to ShellExecuteExW without a command interpreter. Folder opening and non-Windows behavior stay as before; existing book/dialog callers of open_uri receive the same fix.

Validation:

  • Windows/MSVC cargo check -p horizon-client --bin horizon-client passed on this upstream branch, without Celestial.
  • cargo clippy -p horizon-client --bin horizon-client -- -D warnings, Rustfmt, git diff --check and public tree audit passed.
  • A small probe calling the same enabled opener returned success for an HTTPS URL with query separators and percent encoding; the registered HTTPS handler is Firefox. Full in-game clicking/confirmation was not tested.
  • pr_ready.py --base upstream/main --quick: public tree and rustfmt passed; Python suite ran 401 tests and reported 2 failures, 8 errors and 11 skips on this Windows machine (including version-port path formatting and harness environment issues, outside the edited URI code). The broad run was stopped after those failures to keep checks scoped; targeted client check and clippy passed separately. Full readiness, workspace tests and gameplay harnesses are not claimed.

This PR contains only the URI fix and its dependency/lockfile changes. No Celestial source or game resources.

🤖 Generated with OpenAI Codex.


🔄 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/3210 **Author:** [@PH4N7OMx](https://github.com/PH4N7OMx) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `codex/windows-default-browser` --- ### 📝 Commits (1) - [`998c94b`](https://github.com/horizon-rust/horizon/commit/998c94bee36f2648d8f396d5cad2d344ae285a33) fix(windows): open URLs with the registered protocol handler ### 📊 Changes **3 files changed** (+47 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+37 -0) 📝 `crates/horizon-client/Cargo.toml` (+2 -0) 📝 `crates/horizon-client/src/game/packs.rs` (+8 -0) </details> ### 📄 Description > 🤖 Opened by PH4N7OMx's AI agent (OpenAI Codex), not by PH4N7OMx himself. On Windows, confirming a chat URL calls the folder opener, which invokes `explorer URL`. Use `open::that_detached` with `shellexecute-on-windows` to dispatch the URL through the registered protocol handler instead. Unicode URLs and query separators go to ShellExecuteExW without a command interpreter. Folder opening and non-Windows behavior stay as before; existing book/dialog callers of `open_uri` receive the same fix. Validation: - Windows/MSVC `cargo check -p horizon-client --bin horizon-client` passed on this upstream branch, without Celestial. - `cargo clippy -p horizon-client --bin horizon-client -- -D warnings`, Rustfmt, `git diff --check` and public tree audit passed. - A small probe calling the same enabled opener returned success for an HTTPS URL with query separators and percent encoding; the registered HTTPS handler is Firefox. Full in-game clicking/confirmation was not tested. - `pr_ready.py --base upstream/main --quick`: public tree and rustfmt passed; Python suite ran 401 tests and reported 2 failures, 8 errors and 11 skips on this Windows machine (including version-port path formatting and harness environment issues, outside the edited URI code). The broad run was stopped after those failures to keep checks scoped; targeted client check and clippy passed separately. Full readiness, workspace tests and gameplay harnesses are not claimed. This PR contains only the URI fix and its dependency/lockfile changes. No Celestial source or game resources. 🤖 Generated with [OpenAI Codex](https://openai.com/codex/). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:22 +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#4847
No description provided.