feat(webui): keep delegated work within reach (#6443)

This commit is contained in:
chengyongru authored and GitHub committed 2026-10-26 13:16:44 +08:00
1 parent 9270137d65
commit 9b3af7b66c
27 files changed
+2265 -234

No files matched your search

+7 -1
View File
@@ -230,7 +230,13 @@ test("wheel loading hands off to a retained 48px slot; prepend and delayed layou
const { body, header } = await openSettledHistory(page);
const nativeTop = await body.evaluate((node) => node.scrollTop);
await body.hover();
// Lazy Markdown can change scrollTop before the queued wheel reaches the viewport.
const wheelDelivered = await body.evaluateHandle((node) => ({
done: new Promise<void>((resolve) => node.addEventListener("wheel", () => resolve(), { once: true })),
}));
await page.mouse.wheel(0, -100);
await wheelDelivered.evaluate(({ done }) => done);
await wheelDelivered.dispose();
await expect.poll(() => body.evaluate((node) => node.scrollTop)).toBeLessThan(nativeTop);
expect(await displacement(body)).toBe(0);
expect(history.reads).toHaveLength(0);
@@ -299,7 +305,7 @@ test("wheel loading hands off to a retained 48px slot; prepend and delayed layou
expect(history.reads).toHaveLength(1);
});
test("unlinked task prelude stays with the retained boundary when earlier messages load", async ({ page }) => {
test("archived task results stay with the retained boundary when earlier messages load", async ({ page }) => {
const history = await installHistory(page);
await page.route("**/api/sessions/**/subagents", (route) => route.fulfill({ json: { tasks: [{
task_id: "legacy", revision: 1, label: "Earlier check", task_description: "Check earlier work",