Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions web/e2e/pane-controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,13 @@ test.describe('pane controller: depth/ownership state machine (PLAN-2154 / TASK-
await page.goto(docsUrl(fixture));

const prePaneUrl = page.url();
const row = page.locator('.item-card', { hasText: 'Ctrl regress alpha' }).first();
// Open the FIRST rendered row (not a NAMED one) so the `j` (down) below
// always has a row beneath it to re-target to. The two seeds share a
// same-second `created_at`, so their list order is a non-deterministic
// tie-break (BUG-2270); a named row could land LAST, where `j` clamps at
// the final index and the pane-follow correctly finds nothing new to
// target — a test-ordering artifact, not a follow-logic bug (BUG-2279).
const row = page.locator('.item-card').first();
await expect(row).toBeVisible();
await row.click();

Expand All @@ -181,8 +187,9 @@ test.describe('pane controller: depth/ownership state machine (PLAN-2154 / TASK-
// First-open MINTS ownership at depth 0.
await expect.poll(() => paneState(page)).toEqual({ paneDepth: 0, paneOwned: true });

// j moves the list cursor; the pane FOLLOWS (re-target replace) — still
// depth 0, still owned, and NO new history entry (the PLAN-2105 fix).
// j moves the list cursor to the row below; the pane FOLLOWS (re-target
// replace) — still depth 0, still owned, and NO new history entry (the
// PLAN-2105 fix).
const lenAfterOpen = await historyLength(page);
await page.keyboard.press('j');
await expect.poll(() => openItemParam(page)).not.toBe(refA);
Expand Down