From 09305be6c6891a9ccf102703514842a53b730f12 Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 19 Aug 2026 18:54:37 +0200 Subject: [PATCH] =?UTF-8?q?feat(launcher):=20LU5/LU6=20=E2=80=94=20one=20P?= =?UTF-8?q?lay=20button=20per=20character,=20and=20sessions=20say=20who=20?= =?UTF-8?q?is=20playing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LU5. The per-character panel offered "GUI — enter world", "GUI — character select" and "Headless" as three equal-looking buttons, above a "Default launch mode" combo. It now leads with one primary **Play** that enters the world as the selected character, with Character select and Headless kept as deliberate secondary choices. The combo is gone. It was never consulted by anything: every launch button passes its own mode and LauncherOrchestrator.LaunchAsync overrides the profile's stored mode with it (CloneCharacter(character, mode)). A setting that changes nothing is worse than no setting, and this one made the three buttons look like they obeyed it. The stored value is untouched. Worth recording for whoever reads the LU5 acceptance: the launcher-side plumbing was already correct end to end — orchestrator, selector composition, and the client's own "skip character select when a selector is present" gate. What actually made launching a character fail was #420, a client crash on the character-select screen, fixed separately. Every play session in the user's cache had no character selector, which is consistent with them only ever reaching the select-screen paths. LU6. Rows read `server / account / character`, then the launch mode (Gui/GuiSelect/Headless/Probe), then the raw LauncherActivityState enum name, then a status string. The launch mode is launcher bookkeeping — it says how the process was started, which tells the person watching nothing and is meaningless once the client is up. Rows now show the account, the character (or "Character select" while one is still being chosen, "Character refresh" for a roster probe), and one plain word derived from the host's own status stream: Starting -> Character select -> In game -> Stopping -> Stopped / Failed. A Play launch and a character-select launch both read "In game" once the player is actually in it. The orchestrator now KEEPS the identity from the host's enteredWorld event instead of only formatting it into a status sentence, so a character-select session stops being anonymous the moment someone enters the world. Tests: LauncherSessionRowViewModelTests (16 — every state's wording, in-game independent of launch mode, the character-select placeholder and its replacement, probe labelling, stop gating). Full solution 14,370 passed, 0 failed, 0 skipped under the release-gate filter. Campaign LU slices LU5 and LU6. Co-Authored-By: Claude Opus 5 --- .../Orchestration/LauncherOrchestrator.cs | 16 ++- src/AcDream.Launcher/MainWindow.axaml | 38 ++++-- .../ViewModels/LauncherSessionRowViewModel.cs | 70 ++++++++-- .../LauncherSessionRowViewModelTests.cs | 123 ++++++++++++++++++ .../LauncherWindowViewModelTests.cs | 7 +- 5 files changed, 234 insertions(+), 20 deletions(-) create mode 100644 tests/AcDream.Launcher.Tests/LauncherSessionRowViewModelTests.cs diff --git a/src/AcDream.Launcher.Core/Orchestration/LauncherOrchestrator.cs b/src/AcDream.Launcher.Core/Orchestration/LauncherOrchestrator.cs index 9bb48560..f7923808 100644 --- a/src/AcDream.Launcher.Core/Orchestration/LauncherOrchestrator.cs +++ b/src/AcDream.Launcher.Core/Orchestration/LauncherOrchestrator.cs @@ -873,6 +873,13 @@ public sealed class LauncherOrchestrator : ILauncherOrchestrator { activity.State = LauncherActivityState.InWorld; } + // LU6: keep the identity, not just a sentence about it. A + // character-select launch has no character name until this + // arrives, and the sessions list should say who is playing. + if (!string.IsNullOrWhiteSpace(enteredWorld.CharacterName)) + { + activity.CharacterName = enteredWorld.CharacterName; + } activity.Status = $"In world as {enteredWorld.CharacterName}."; break; case PluginLoadedStatusEvent loaded: @@ -1269,7 +1276,14 @@ public sealed class LauncherOrchestrator : ILauncherOrchestrator public string AccountName { get; } - public string? CharacterName { get; } + /// + /// LU6: settable so the character the player ACTUALLY entered the world + /// as can replace a null. A character-select launch starts with no + /// character name, and the host's own enteredWorld event is the only + /// place that identity ever becomes known — it used to be written into + /// a status string and thrown away. + /// + public string? CharacterName { get; set; } public LaunchMode? LaunchMode { get; } diff --git a/src/AcDream.Launcher/MainWindow.axaml b/src/AcDream.Launcher/MainWindow.axaml index 44526b0e..bb638338 100644 --- a/src/AcDream.Launcher/MainWindow.axaml +++ b/src/AcDream.Launcher/MainWindow.axaml @@ -160,9 +160,14 @@ - - + @@ -188,13 +193,22 @@ + -