fix(ui): preserve owner filters across gateway reconnects (#127676)

Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
ClawSweeper
2026-08-21 16:20:06 -07:00
committed by GitHub
parent fb95562e96
commit 7dca0a099a
2 changed files with 18 additions and 0 deletions
+17
View File
@@ -183,6 +183,23 @@ suite.define(() => {
),
)
.toBe(true);
const initialConnections = (await gateway.getRequests("connect")).length;
await gateway.closeLatest(1012, "owner filter reconnect proof");
await expect
.poll(async () => (await gateway.getRequests("connect")).length)
.toBeGreaterThan(initialConnections);
await expect
.poll(async () => (await gateway.getRequests("sessions.list")).at(-1)?.params)
.toMatchObject({ ownerId: "profile-ada" });
await expect
.poll(() => currentPage.locator('[data-session-key="agent:main:bob"]').count())
.toBe(0);
const reconnectedMenu = await openSidebarSortMenu(currentPage);
await expectBrowser(reconnectedMenu.locator('[value="owner:profile-ada"]')).toHaveAttribute(
"aria-checked",
"true",
);
});
it("renders zero ownership chrome for a single owner", async () => {
+1
View File
@@ -387,6 +387,7 @@ export function createSessionCapability(gateway: SessionGateway): SessionCapabil
? scopedAgentListParamsForSession(gateway.snapshot, sessionKey)
: { agentId: resolveUiSelectedGlobalAgentId(gateway.snapshot) };
await roster.refresh({
...roster.lastOptions(), // Keep visible roster filters through reconnect hydration.
...agentScope,
includeDerivedTitles: true,
includeLastMessage: true,