[PR #5023] [CLOSED] Launcher: play one launch as another account or offline name (#4952, 1/2) #6014

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5023
Author: @Solenopsisbot
Created: 10/31/2026
Status: ❌ Closed

Base: main ← Head: accounts/concurrent


📝 Commits (1)

  • 9699c60 Launcher: play one launch as another account or offline name

📊 Changes

6 files changed (+203 additions, -23 deletions)

View changed files

📝 docs/agent-control.md (+1 -1)
📝 docs/launcher-commands.md (+2 -0)
📝 launcher/src/account.rs (+65 -3)
📝 launcher/src/account/tests.rs (+63 -0)
📝 launcher/src/backend.rs (+10 -2)
📝 launcher/src/cli.rs (+62 -17)

📄 Description

🤖 Opened by Solenopsisbot's AI agent (Claude Code, Claude Opus 5.5), not by Solenopsisbot personally.

What and why

Part 1 of #4952 (several accounts from one instance at the same time).

The launcher keeps several accounts but plays the one account select picked, which is global. This adds two play flags that choose who plays for one launch only:

  • horizon-launcher play --account WHO: a signed-in account (name or UUID), or a kept offline name. It's the same lookup account select uses, now Accounts::resolve, and select uses it too.
  • horizon-launcher play --offline-name NAME: any offline name (3 to 16 letters, digits or _), for LAN worlds and offline-mode servers.

account select's choice and the kept offline names stay as they were, so two terminals can start two games of one instance as two different players. The owner gate runs as for any launch: an offline name still needs an account that owns the game beside it. What the services renew (tokens, names, skins) is still saved. account::session_for_game_as runs the gate as who (launch_as), then puts the accounts' choice of player back before saving them. A Java instance refuses both flags, as it refuses --world.

Next in #4952: two games of one instance still share one game folder (options.txt, logs/latest.log, horizon-player.txt, servers.dat). Part 2 gives each player its own folder for those files, while packs, mods and saves stay shared.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

None: the launcher's own accounts.

Self-check

pr_ready (tools/pr_ready.py on cytonic, against origin/main at 9d979caa4, 58 s)

Check Result
Scope ✅ 6 files, +203 −23
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 495 passed (47 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (7 s)
launcher tests ✅ 307 passed (3 s)
Parity ✅ 1 affected, all passed already with these inputs

New tests:

  • account::tests::a_launch_as_someone_else_leaves_who_plays_unchanged checks that playing as a new offline name, as the selected account, or a refused launch all leave account select's choice and the kept names alone.
  • account::tests::resolve_takes_accounts_then_kept_offline_names covers the lookup.
  • cli::tests::play_takes_an_account_or_an_offline_name_for_one_launch covers the parsing; the two flags conflict.

By hand, in a scratch launcher home with no Microsoft account: play --account Alex answers "No signed-in account Alex", and play --offline-name Bot_1 answers "Offline names need a Microsoft account that owns Minecraft: Java Edition in the launcher".

🤖 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/5023 **Author:** [@Solenopsisbot](https://github.com/Solenopsisbot) **Created:** 10/31/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `accounts/concurrent` --- ### 📝 Commits (1) - [`9699c60`](https://github.com/horizon-rust/horizon/commit/9699c602f4aefa4692ad781f1b40da1be9e9e815) Launcher: play one launch as another account or offline name ### 📊 Changes **6 files changed** (+203 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `docs/agent-control.md` (+1 -1) 📝 `docs/launcher-commands.md` (+2 -0) 📝 `launcher/src/account.rs` (+65 -3) 📝 `launcher/src/account/tests.rs` (+63 -0) 📝 `launcher/src/backend.rs` (+10 -2) 📝 `launcher/src/cli.rs` (+62 -17) </details> ### 📄 Description > 🤖 Opened by Solenopsisbot's AI agent (Claude Code, Claude Opus 5.5), not by Solenopsisbot personally. ## What and why Part 1 of #4952 (several accounts from one instance at the same time). The launcher keeps several accounts but plays the one `account select` picked, which is global. This adds two `play` flags that choose who plays **for one launch only**: - `horizon-launcher play --account WHO`: a signed-in account (name or UUID), or a kept offline name. It's the same lookup `account select` uses, now `Accounts::resolve`, and `select` uses it too. - `horizon-launcher play --offline-name NAME`: any offline name (3 to 16 letters, digits or _), for LAN worlds and offline-mode servers. `account select`'s choice and the kept offline names stay as they were, so two terminals can start two games of one instance as two different players. The owner gate runs as for any launch: an offline name still needs an account that owns the game beside it. What the services renew (tokens, names, skins) is still saved. `account::session_for_game_as` runs the gate as `who` (`launch_as`), then puts the accounts' choice of player back before saving them. A Java instance refuses both flags, as it refuses `--world`. Next in #4952: two games of one instance still share one game folder (`options.txt`, `logs/latest.log`, `horizon-player.txt`, `servers.dat`). Part 2 gives each player its own folder for those files, while packs, mods and saves stay shared. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [x] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference None: the launcher's own accounts. ## Self-check **pr_ready** (`tools/pr_ready.py` on cytonic, against origin/main at 9d979caa4, 58 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +203 −23 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed (47 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (7 s) | | launcher tests | ✅ 307 passed (3 s) | | Parity | ✅ 1 affected, all passed already with these inputs | New tests: - `account::tests::a_launch_as_someone_else_leaves_who_plays_unchanged` checks that playing as a new offline name, as the selected account, or a refused launch all leave `account select`'s choice and the kept names alone. - `account::tests::resolve_takes_accounts_then_kept_offline_names` covers the lookup. - `cli::tests::play_takes_an_account_or_an_offline_name_for_one_launch` covers the parsing; the two flags conflict. By hand, in a scratch launcher home with no Microsoft account: `play --account Alex` answers "No signed-in account Alex", and `play --offline-name Bot_1` answers "Offline names need a Microsoft account that owns Minecraft: Java Edition in the launcher". 🤖 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 05:16:37 +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#6014
No description provided.