Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
8 changes: 5 additions & 3 deletions desktop/e2e/session-work-ledger.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { setAgentState } from "../../web/e2e/fixture-agents";
import { continueFixtureTranscript } from "../../web/e2e/pane-fixture";
import { FIRST_GOAL, NEXT_GOAL, nextWork, seedFirstWork, workFixture, workRepositoryReady } from "../../web/e2e/session-work-fixture";
import { chord } from "../../web/e2e/chords";
import { enterWorkspace, openTaskFolds, setLanePinned, showExplorer, taskRow } from "../../web/e2e/wire";
import { enterWorkspace, hoverSettledTaskRow, openTaskFolds, setLanePinned, showExplorer, taskRow } from "../../web/e2e/wire";
import { fitWindow, launchShell, REPO, startStack, test } from "./fixture";
import { captureElectronWindow } from "./electron-window";
import { finishNative } from "./native-teardown";
Expand Down Expand Up @@ -43,7 +43,8 @@ test("@platform session records by goal flow, ended work and search render in bo
const child = delegated!;
const root = await taskRow(page, pane, FIRST_GOAL);
const tasks = page.locator("[data-task-lens]");
await root.hover();
// The core settles the root among the resting ones once its child has ended; a hover before that is lost when the row moves.
await hoverSettledTaskRow(root, "resting");
await page.locator(`[data-task-record="${pane}"]`).click();
// The record opens in the lane's 보기 slot (PRD sidebar-task-lens B15).
const record = page.locator('aside[data-lane="detail"][data-detail="record"] [data-session-record="lane"]');
Expand Down Expand Up @@ -117,7 +118,8 @@ test("@platform session records by goal flow, ended work and search render in bo
await page.keyboard.press("Escape");
}
// Resolve from the row's ⋯ menu puts the task under 쉬는 중 once it is saved (B18).
await root.hover();
// The summaries turned back on, the record's ask returns and the core moves the row to 내 차례; the menu opens on that row.
await hoverSettledTaskRow(root, "needs_you");
await page.locator(`[data-task-more="${pane}"]`).click();
await page.locator(`[data-task-menu="${pane}"] [data-menu-item="resolve"]`).click();
await expect(tasks.locator('[data-task-fold="rest"]')).toBeVisible({ timeout: 30_000 });
Expand Down
6 changes: 3 additions & 3 deletions web/e2e/session-panel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { agentReading, sessionIn, setAgentState, startAgentInProject, takeOverSe
import { claudeProjects, continueFixtureTranscript, writeFixtureTranscript, type FixtureLabel } from "./pane-fixture";
import { startHided, type Daemon } from "./hided-fixture";
import { chord } from "./chords";
import { chooseTheme, countSent, openOtherCheckouts, openTaskFolds, screenshot, showTasks } from "./wire";
import { chooseTheme, countSent, hoverSettledTaskRow, openOtherCheckouts, openTaskFolds, screenshot, showTasks } from "./wire";
import { quietFor, unchangedForFrames } from "./wait";

test.describe.configure({ timeout: 240_000 });
Expand Down Expand Up @@ -132,7 +132,7 @@ test("the 태스크 list groups the device's tasks, folds children and resting o
await page.keyboard.press("ArrowDown");
await expect(group("needs_you").locator('[data-task-focus="row"]').first()).toBeFocused();
// B18: Resolve from the ⋯ menu is saved, and the row stays under 쉬는 중.
await row(stopped).hover();
await hoverSettledTaskRow(row(stopped), "resting");
await tasks.locator(`[data-task-more="${stopped}"]`).click();
await page.locator(`[data-task-menu="${stopped}"] [data-menu-item="resolve"]`).click();
await expect.poll(resolved(daemon, stopped)).toBe(true);
Expand Down Expand Up @@ -194,7 +194,7 @@ test("세션 닫기 in a task's ⋯ menu closes its pane, though its checkout is
const tasks = await showTasks(page);
await openTaskFolds(page);
const row = tasks.locator(`[data-task-row="${behind}"]`);
await row.hover();
await hoverSettledTaskRow(row, "resting");
await tasks.locator(`[data-task-more="${behind}"]`).click();
await page.locator(`[data-task-menu="${behind}"] [data-menu-item="close"]`).click();
await expect.poll(() => sent.get("close_pane")).toBe(1);
Expand Down
5 changes: 3 additions & 2 deletions web/e2e/session-tree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { setAgentState, spawnChild } from "./fixture-agents";
import { claudeProjects, continueFixtureTranscript, writeFixtureTranscript } from "./pane-fixture";
import { startHided, type Daemon } from "./hided-fixture";
import { measure } from "./session-panel-geometry.mjs";
import { chooseTheme, screenshot, showTasks } from "./wire";
import { chooseTheme, hoverSettledTaskRow, screenshot, showTasks } from "./wire";

test.describe.configure({ timeout: 240_000 });
test.use({ actionTimeout: 15_000 });
Expand Down Expand Up @@ -86,7 +86,8 @@ test("the 태스크 list opens a five-level tree, stops the indent at three and
// Branch, label and facts stay inside each row, with no part over another.
expect(await measure(page)).toEqual({ partProblems: [], rowsFit: [], overflow: [] });
// Under the pointer the row's buttons take the time's place and cover nothing on the line.
await panel.locator(`[data-task-row="${root}"]`).hover();
// The root waits on its working descendants; its buttons show only once the core has settled it there.
await hoverSettledTaskRow(panel.locator(`[data-task-row="${root}"]`), "waiting");
await expect(panel.locator(`[data-task-more="${root}"]`)).toBeVisible();
await expect(panel.locator(`[data-task-row="${root}"] [data-agent-elapsed]`)).toBeHidden();
expect(await measure(page)).toEqual({ partProblems: [], rowsFit: [], overflow: [] });
Expand Down
14 changes: 14 additions & 0 deletions web/e2e/wire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,20 @@ export async function taskRow(page: Page, pane: string, goal: string): Promise<L
return row;
}

/**
* Hovers a task row once the core has settled it in `state`, so its row
* actions (the record and ⋯ buttons, shown on hover) stay under the pointer.
* The core moves a task between groups as an agent's turn is read or a record
* regains its ask, and the list draws the row anew in its new group: a hover
* given before the move belongs to the row that is gone, the new one is not
* hovered under a still pointer, and its buttons stay hidden, so a click on
* them waits out its whole timeout (with-hide/hide-private#130).
*/
export async function hoverSettledTaskRow(row: Locator, state: string): Promise<void> {
await expect(row).toHaveAttribute("data-task-state", state, { timeout: 45_000 });
await row.hover();
}

/**
* The boxes of a dependency graph's cards under `scope`, once the layout
* worker has placed them: until then the cards stand in plain layers, and the
Expand Down
Loading