test(ui): await owner roster before keyboard navigation

The owner-filter keyboard E2E opened the menu before chat.startup released
its initial roster. Only the selected Ada descriptor was available, so the
popover correctly focused Active. When Owners arrived later, its one-time
initial-focus guard preserved Active; the test expected Owners focused.

Hold startup, release it, and wait for the roster-only Bob row before
opening the menu. Keep every existing keyboard and Gateway assertion.
Production focus ownership and all timeouts remain unchanged.

Introducing ordering: d769e31af2 now awaits foreground stream admission
before chat.startup, extending the background roster gate from b023df8086.
The locked partial-catalog failure shares this startup-readiness cause and
is already repaired by f03d64f6a5 on the fetched main.

Probe evidence:
- Holding chat.startup reproduces both reported CI signatures: effort has
  aria-disabled=true, and Owners is inactive at the first focus assertion.
- Animation-frame samples show Active focused with no Owners and only Ada;
  after startup resolves, Owners and Bob appear while Active retains focus.
- Identical held-subscription probes pass on parent eed9d9bf22 and fail on
  d769e31af2: enabled effort and the roster cannot arrive before admission.
  Snapshot stamping b7e2666e6b is already in the passing parent.
- Current-main baseline passes both files; the controlled failing order,
  not repeated green replays, establishes the test readiness defect.

Validation on base 4902e4ae49:
- Both complete UI E2E files: 12 passed, one worker, 23.99s runner wall.
  Keyboard file 5.469s; changed scenario 0.804s; catalog file 8.331s.
- Bootstrap, subscription admission, session controls, owner-filter and
  sidebar-menu owners: 69 unit/browser tests passed across seven files.
- Production UI and UI E2E fixture typechecks, targeted oxlint, oxfmt,
  and git diff --check passed.
- Independent Codex autoreview: scoped-clean through P2.

Release-note context: test reliability only; product behavior unchanged.
This commit is contained in:
Peter Steinberger 2026-09-28 09:14:43 -07:00
parent 25d771cb82
commit 94cbd1335d

View file

@ -29,6 +29,7 @@ suite.define(() => {
const page = await context.newPage();
const gateway = await installMockGateway(page, {
sessionKey: "agent:main:ada",
heldMethods: ["chat.startup"],
presenceUsers: [{ self: true, id: "profile-patrick", name: "Patrick" }],
historyMessages: [{ role: "assistant", content: [{ type: "text", text: "Ready." }] }],
methodResponses: {
@ -49,6 +50,10 @@ suite.define(() => {
try {
await page.goto(controlUiSessionUrl(suite.server.baseUrl, "agent:main:ada"));
await gateway.waitForRequest("chat.startup");
await gateway.resolveDeferred("chat.startup");
// The selected descriptor can render before the roster supplies owner filters.
await page.locator('.sidebar-recent-session[data-session-key="agent:main:bob"]').waitFor();
const trigger = page.getByRole("button", { name: "Filter & sort" });
await trigger.focus();
await page.keyboard.press("Enter");