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

+6 -2
View File
@@ -427,8 +427,12 @@ describe("App layout", () => {
// capability contract exercised by the timed DOM assertions below.
await act(async () => { await import("@/components/thread/ThreadShell"); });
await screen.findByRole("textbox", {}, { timeout: 5_000 });
if (supported) await screen.findByRole("button", { name: /Config check Running/ });
else expect(screen.queryByText("Config check")).not.toBeInTheDocument();
if (supported) {
const trigger = await screen.findByRole("button", { name: "Subtasks · Running: 1" });
expect(trigger).toHaveAttribute("aria-expanded", "false");
await userEvent.setup().click(trigger);
expect(await screen.findByRole("button", { name: /Config check Running/ })).toBeVisible();
} else expect(screen.queryByRole("button", { name: /Subtasks/ })).not.toBeInTheDocument();
const reads = vi.mocked(fetch).mock.calls.filter(([url]) => String(url).endsWith("/subagents"));
expect(reads).toHaveLength(supported ? 1 : 0);
expect(requestMutationSpy).not.toHaveBeenCalled();