Merge branch 'claude/card-selection-state-sharing-f9348c'
ci / build and test (push) Successful in 1m42s
ci / android head (push) Failing after 5s
ci / api image (push) Successful in 27s

This commit is contained in:
2026-08-04 16:28:34 +02:00
4 changed files with 201 additions and 8 deletions
@@ -4333,6 +4333,35 @@ public sealed class ShellFlowTests : IAsyncLifetime
vault.GroupEditorLabel.ShouldBe("production", "the heading pressed, not the group selected");
}
/// <remarks>
/// The heading hands its group to the editor rather than selecting it first, and this is why. A group
/// selection clears the host selection — the desktop's two grids share one mark — and the phone draws no
/// group cards at all, so selecting one here would take the highlight off the machine in the list with
/// nothing on screen to say where it had gone, or how to get it back.
/// </remarks>
[Fact]
public async Task AGroupsHeading_LeavesTheChosenMachineChosen()
{
await UnlockedAsync();
var vault = shell.Vault!;
await AddHostAsync(vault, "prod-db");
await AddGroupAsync(vault, "production");
await FileAsync(vault, "prod-db", "production");
var host = vault.Hosts.Single();
vault.SelectedHost = host;
var heading = vault.SidebarRows.OfType<SidebarGroupHeader>().Single(
row => string.Equals(row.Label, "production", StringComparison.Ordinal));
vault.EditGroupFromHeadingCommand.Execute(heading);
vault.IsEditingGroup.ShouldBeTrue("the editor still opens on the group the heading names");
vault.GroupEditorLabel.ShouldBe("production");
vault.SelectedHost.ShouldBeSameAs(host, "and the list is still on the machine it was on");
}
[Fact]
public async Task TheUngroupedHeading_OpensNothing()
{