[PR #4250] [MERGED] Launcher: account status, profile heads, refresh, and targeted sign-in #5519

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4250
Author: @martipops
Created: 10/30/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: feature/launcher-auth-status


📝 Commits (10+)

  • 6e1ac28 Add launcher-owned account status and forced session renewal
  • f0a0674 Show account status and refresh actions in the launcher
  • 501c9ab Handle completed sign-in only once while polling the launcher
  • 3fab32c Give launcher account states semantic colors and icons
  • 0dab146 Show profile heads, auth progress, and targeted re-sign-in in the launcher
  • dc6d372 Let a running game renew its session through the launcher CLI
  • af5ac52 Launcher auth: answer review nits
  • 134b6f1 Merge upstream main into launcher auth status
  • 1af012a Launcher auth: let a status read give up behind a long operation
  • 9945e72 Merge upstream main into launcher auth status

📊 Changes

24 files changed (+2061 additions, -104 deletions)

View changed files

📝 docs/launcher-commands.md (+22 -0)
📝 docs/microsoft-account.md (+53 -0)
📝 launcher/lang/de.json (+27 -2)
📝 launcher/lang/es.json (+27 -2)
📝 launcher/lang/fr.json (+27 -2)
📝 launcher/lang/ja.json (+27 -2)
📝 launcher/lang/pl.json (+27 -2)
📝 launcher/lang/pt-br.json (+27 -2)
📝 launcher/lang/ru.json (+27 -2)
📝 launcher/lang/tr.json (+27 -2)
📝 launcher/lang/uk.json (+27 -2)
📝 launcher/lang/zh.json (+27 -2)
📝 launcher/src/account.rs (+166 -23)
➕ launcher/src/account/session.rs (+352 -0)
📝 launcher/src/account/tests.rs (+396 -0)
📝 launcher/src/backend.rs (+9 -0)
📝 launcher/src/cli.rs (+65 -3)
📝 launcher/src/cli_tools.rs (+12 -3)
📝 launcher/src/heads.rs (+160 -0)
📝 launcher/src/main.rs (+382 -41)

...and 4 more files

📄 Description

🤖 Opened by martipops's AI agent (Claude Code; written with Codex), not by martipops themselves.

Suggested label: feature

What and why

Accounts previously appeared signed in without explaining whether their session could still
play online. The launcher now shows each account's authentication state, a manual Refresh
action, and Sign in again when the Microsoft refresh credential is no longer accepted.

  • Ready, refresh/retry, and sign-in-required states use semantic theme colors plus icons and
    labels. Selecting who plays remains distinct from authentication readiness.
  • Profile heads come from the account's public Minecraft skin, cached locally and rendered
    consistently in Settings, the top bar, and the switcher. Downloads stay off the UI thread;
    an unavailable image uses the UUID default skin or a neutral placeholder.
  • Progress identifies the service or operation actually in progress rather than leaving
    every account on a generic Checking label.
  • Sign in again is bound to that account's UUID. Choosing a different Microsoft account in
    the browser cannot overwrite the target or silently switch who plays. Cancellation and
    a target removed during sign-in leave credentials alone. Retrying retains the target.
  • Refresh renews even a fresh access token. Explicit refresh-grant rejection is remembered
    until a successful browser sign-in; a network failure stays retryable. Rotated Microsoft
    credentials survive a failure later in the Xbox/Minecraft chain.
  • account refresh / MCP account_refresh use the same launcher-owned operation; account
    listings expose credential-free status.
  • A running game can renew its session through the launcher: the launcher passes its path as
    HORIZON_LAUNCHER_EXE, and account session WHO --json renews that account and returns a
    new read-once session file, or the public status when a browser sign-in or retry is needed.
    account sign-in --for WHO is the UUID-bound re-sign-in from the command line. account session is not an MCP tool, since its file holds a token. The game side is not in this PR.
  • Fixes a completed-sign-in polling loop that repeatedly restarted all account checks.

Built independently from Horizon's existing auth implementation and a written behavior
description. No implementation source from another launcher was copied or translated.

Image Preview

file-6fdb7ea4f13072167ddb4298f21ff3a9

Scope

Launcher code, localization, and authentication/CLI documentation only. No gameplay changes.

Validation

Final tip dc6d372db (on upstream/main bd9b32587).

pr_ready (tools/pr_ready.py --quick --base upstream/main on Mac, against upstream/main at bd9b32587, 33 s)

Check Result
Scope ⚠️ 21 files, +1712 −83; 1720 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 480 passed (27 s)
launcher rustfmt ✅
launcher clippy ✅
launcher tests ✅ 293 passed (3 s)
Parity ➖ not run (--quick); no game crate touched
  • Full launcher suite (cargo test --features gpui/runtime_shaders): 293 library + 54 binary +
    three integration tests pass, four ignored (native keychain). Covers targeted identity /
    selection / cancellation / retry, service progress order, head caching, changed skin URL,
    offline default and invalid texture-host cases, and the game handoff (a renewed file only
    when ready, none after a refused refresh).
  • Scratch CLI run (HORIZON_NO_KEYCHAIN=1, fresh homes): --json account session for an
    unknown account returns sign_in_required; account sign-in --for refuses it before the browser.
  • Scratch GPUI smoke run (HORIZON_LAUNCHER_BENCH, HORIZON_NO_KEYCHAIN=1, fresh scratch
    homes) with two fake accounts and cached synthetic 64x64 heads: startup and pages render.
  • No real Microsoft credentials or real keychain entries were used by the agent. Windows and
    real-account testing remain user checks.
  • Size: over the ~500-line guideline. Could split as (1) status/refresh core, (2) UI/CLI/MCP,
    (3) heads + progress + targeted re-sign-in + game session CLI, if the maintainer prefers.

🤖 Generated with Claude Code and 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/4250 **Author:** [@martipops](https://github.com/martipops) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feature/launcher-auth-status` --- ### 📝 Commits (10+) - [`6e1ac28`](https://github.com/horizon-rust/horizon/commit/6e1ac28831c185526e23b18fdaa93c3e43fecd25) Add launcher-owned account status and forced session renewal - [`f0a0674`](https://github.com/horizon-rust/horizon/commit/f0a06742eae0d65939f5332118bbb0358673c6c3) Show account status and refresh actions in the launcher - [`501c9ab`](https://github.com/horizon-rust/horizon/commit/501c9abbfec6b57e8c918b7b68516179902ad799) Handle completed sign-in only once while polling the launcher - [`3fab32c`](https://github.com/horizon-rust/horizon/commit/3fab32c08a78c774f5ee18dbcce1a5b93f74da2a) Give launcher account states semantic colors and icons - [`0dab146`](https://github.com/horizon-rust/horizon/commit/0dab1469acb99459a799d4d26eaf908901bfb3db) Show profile heads, auth progress, and targeted re-sign-in in the launcher - [`dc6d372`](https://github.com/horizon-rust/horizon/commit/dc6d372db87cb8f7731ad32a39fc6dcbcc10e308) Let a running game renew its session through the launcher CLI - [`af5ac52`](https://github.com/horizon-rust/horizon/commit/af5ac52ace26ba8ff6fd5cee788064833784a9fd) Launcher auth: answer review nits - [`134b6f1`](https://github.com/horizon-rust/horizon/commit/134b6f1a4221250c4fa5d9bab3150d393021bf3f) Merge upstream main into launcher auth status - [`1af012a`](https://github.com/horizon-rust/horizon/commit/1af012a92197ddf131e9602f0ef253b81f19ae96) Launcher auth: let a status read give up behind a long operation - [`9945e72`](https://github.com/horizon-rust/horizon/commit/9945e72c811f98f0c304bade4f8a1a1141223e61) Merge upstream main into launcher auth status ### 📊 Changes **24 files changed** (+2061 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+22 -0) 📝 `docs/microsoft-account.md` (+53 -0) 📝 `launcher/lang/de.json` (+27 -2) 📝 `launcher/lang/es.json` (+27 -2) 📝 `launcher/lang/fr.json` (+27 -2) 📝 `launcher/lang/ja.json` (+27 -2) 📝 `launcher/lang/pl.json` (+27 -2) 📝 `launcher/lang/pt-br.json` (+27 -2) 📝 `launcher/lang/ru.json` (+27 -2) 📝 `launcher/lang/tr.json` (+27 -2) 📝 `launcher/lang/uk.json` (+27 -2) 📝 `launcher/lang/zh.json` (+27 -2) 📝 `launcher/src/account.rs` (+166 -23) ➕ `launcher/src/account/session.rs` (+352 -0) 📝 `launcher/src/account/tests.rs` (+396 -0) 📝 `launcher/src/backend.rs` (+9 -0) 📝 `launcher/src/cli.rs` (+65 -3) 📝 `launcher/src/cli_tools.rs` (+12 -3) 📝 `launcher/src/heads.rs` (+160 -0) 📝 `launcher/src/main.rs` (+382 -41) _...and 4 more files_ </details> ### 📄 Description > 🤖 Opened by martipops's AI agent (Claude Code; written with Codex), not by martipops themselves. **Suggested label:** `feature` ## What and why Accounts previously appeared signed in without explaining whether their session could still play online. The launcher now shows each account's authentication state, a manual Refresh action, and Sign in again when the Microsoft refresh credential is no longer accepted. - Ready, refresh/retry, and sign-in-required states use semantic theme colors plus icons and labels. Selecting who plays remains distinct from authentication readiness. - Profile heads come from the account's public Minecraft skin, cached locally and rendered consistently in Settings, the top bar, and the switcher. Downloads stay off the UI thread; an unavailable image uses the UUID default skin or a neutral placeholder. - Progress identifies the service or operation actually in progress rather than leaving every account on a generic Checking label. - Sign in again is bound to that account's UUID. Choosing a different Microsoft account in the browser cannot overwrite the target or silently switch who plays. Cancellation and a target removed during sign-in leave credentials alone. Retrying retains the target. - Refresh renews even a fresh access token. Explicit refresh-grant rejection is remembered until a successful browser sign-in; a network failure stays retryable. Rotated Microsoft credentials survive a failure later in the Xbox/Minecraft chain. - `account refresh` / MCP `account_refresh` use the same launcher-owned operation; account listings expose credential-free status. - A running game can renew its session through the launcher: the launcher passes its path as `HORIZON_LAUNCHER_EXE`, and `account session WHO --json` renews that account and returns a new read-once session file, or the public status when a browser sign-in or retry is needed. `account sign-in --for WHO` is the UUID-bound re-sign-in from the command line. `account session` is not an MCP tool, since its file holds a token. The game side is not in this PR. - Fixes a completed-sign-in polling loop that repeatedly restarted all account checks. Built independently from Horizon's existing auth implementation and a written behavior description. No implementation source from another launcher was copied or translated. ## Image Preview <img width="1170" height="736" alt="file-6fdb7ea4f13072167ddb4298f21ff3a9" src="https://github.com/user-attachments/assets/f4b0658b-1e35-4bda-b0be-4bd57a8e40cf" /> ## Scope Launcher code, localization, and authentication/CLI documentation only. No gameplay changes. ## Validation Final tip dc6d372db (on upstream/main bd9b32587). **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on Mac, against upstream/main at bd9b32587, 33 s) | Check | Result | | --- | --- | | Scope | ⚠️ 21 files, +1712 −83; 1720 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 480 passed (27 s) | | launcher rustfmt | ✅ | | launcher clippy | ✅ | | launcher tests | ✅ 293 passed (3 s) | | Parity | ➖ not run (--quick); no game crate touched | - Full launcher suite (`cargo test --features gpui/runtime_shaders`): 293 library + 54 binary + three integration tests pass, four ignored (native keychain). Covers targeted identity / selection / cancellation / retry, service progress order, head caching, changed skin URL, offline default and invalid texture-host cases, and the game handoff (a renewed file only when ready, none after a refused refresh). - Scratch CLI run (`HORIZON_NO_KEYCHAIN=1`, fresh homes): `--json account session` for an unknown account returns `sign_in_required`; `account sign-in --for` refuses it before the browser. - Scratch GPUI smoke run (`HORIZON_LAUNCHER_BENCH`, `HORIZON_NO_KEYCHAIN=1`, fresh scratch homes) with two fake accounts and cached synthetic 64x64 heads: startup and pages render. - No real Microsoft credentials or real keychain entries were used by the agent. Windows and real-account testing remain user checks. - Size: over the ~500-line guideline. Could split as (1) status/refresh core, (2) UI/CLI/MCP, (3) heads + progress + targeted re-sign-in + game session CLI, if the maintainer prefers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) and [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:13:08 +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#5519
No description provided.