feat(launcher): LU8 — logging in IS the character refresh; put Play above the fold
Two things the user hit while gating LU7. 1. "Refresh characters" disconnected the session they were playing. It opened a SECOND connection to the same account purely to read the roster, which the server treats as a new login — so refreshing while logged in kicked them out. It was also redundant the whole time: every ordinary login already carries the roster in the host's own status stream, and the orchestrator already folds it into the profiles (ApplyRosterLocked runs for play sessions, not just probes). Removed, along with "Add cached character", which existed to paper over a roster the launcher can now always obtain by itself. The account page says what happens instead: characters appear after you log in. ProbeAsync stays in Core — headless bots and the CLI use it, and it has its own tests. What is gone is offering it to a player as a button whose only effect they could observe was being disconnected. AnOrdinaryLoginFoldsTheReportedRosterIntoTheStore pins the replacement, including that it persists so the tree is still populated after a restart. 2. "There is no headless or gui option" under a selected character. The buttons were there — below the fold. The character page led with a plugins/login- commands form whose two 96px text boxes pushed the Launch card past the bottom of the scroll area, so the primary action was invisible unless you scrolled. Launch now comes first and the settings form sits under it. A player should never have to scroll to find Play. Full solution 14,374 passed, 0 failed under the release-gate filter. Not pushed — the user is testing locally first. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
2bff44a9fa
commit
18bbd37779
4 changed files with 101 additions and 101 deletions
|
|
@ -326,6 +326,61 @@ public sealed class LauncherOrchestratorTests : IDisposable
|
|||
Assert.Single(orchestrator.GetSnapshot().Sessions);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// LU8: the launcher no longer offers "Refresh characters", because opening
|
||||
/// a SECOND connection to an account purely to read its roster is a login
|
||||
/// as far as the server is concerned, and it disconnected the session the
|
||||
/// user was already playing. This is what replaces it — and it is not new
|
||||
/// code, it is the path an ORDINARY login already took: the host reports
|
||||
/// the roster in its own status stream and the orchestrator folds it into
|
||||
/// the profiles. Logging in IS the refresh.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task AnOrdinaryLoginFoldsTheReportedRosterIntoTheStore()
|
||||
{
|
||||
var statusSources = new QueueStatusSourceFactory();
|
||||
using LauncherOrchestrator orchestrator = CreateOrchestrator(
|
||||
includeCharacter: false,
|
||||
statusSourceFactory: statusSources);
|
||||
|
||||
// No cached character, so this is the account-level character-select
|
||||
// launch a new user makes before any character is known.
|
||||
_ = await orchestrator.LaunchAsync(
|
||||
"Local ACE",
|
||||
"testaccount",
|
||||
characterName: null,
|
||||
LaunchMode.GuiSelect);
|
||||
|
||||
QueueStatusSource source = Assert.Single(statusSources.Created);
|
||||
source.Enqueue(new CharacterListStatusEvent
|
||||
{
|
||||
V = 1,
|
||||
E = "characterList",
|
||||
T = DateTimeOffset.UtcNow,
|
||||
SessionId = "s1",
|
||||
AccountName = "testaccount",
|
||||
SlotCount = 6,
|
||||
Characters =
|
||||
[
|
||||
new StatusCharacterEntry(0x5000000Au, "+Acdream", 0),
|
||||
new StatusCharacterEntry(0x5000000Bu, "+Second", 0),
|
||||
],
|
||||
});
|
||||
orchestrator.PollStatus();
|
||||
|
||||
LauncherAccountSnapshot account = Assert.Single(
|
||||
Assert.Single(orchestrator.GetSnapshot().Servers).Accounts);
|
||||
Assert.Equal(2, account.Characters.Count);
|
||||
|
||||
// Persisted, so the tree still shows them on the next launcher start.
|
||||
var reloaded = new LauncherProfileStore(
|
||||
Path.Combine(_paths.ConfigDirectory, "launcher-profiles.json"));
|
||||
Assert.True(reloaded.Load());
|
||||
Assert.Equal(
|
||||
2,
|
||||
reloaded.Document.Servers.Single().Accounts.Single().Characters.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ProbeUsesTheProbeShapeAndFoldsTheReportedRosterIntoTheStore()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue