feat(web): group the chat sidebar by workspace with an agent-mode toggle (#26)

Co-authored-by: Alice <alice@prismshadow.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-07-22 22:22:07 +08:00
1 parent 3806e4e441
commit 99f391f379
8 files changed
+656 -130

No files matched your search

+6 -1
View File
@@ -273,11 +273,16 @@ test("chat + tool approval + stats/cost/copy + traces + files", async ({ page })
const sidebar = page.getByRole("complementary");
// --- agent group collapse / expand (header button shows the agent name, so its state
// --- group collapse / expand (the header button shows the group name, so its state
// lives on aria-label rather than a duplicate title tooltip) ---
await expect(sidebar.getByText("Configure Tailwind theme")).toBeVisible();
await sidebar.locator('button[aria-label="折叠"]').first().click();
await expect(sidebar.getByText("Configure Tailwind theme")).toHaveCount(0);
// The collapse state persists across a reload (localStorage, keyed per Project): the group
// comes back rendered collapsed (an "展开" header), with its rows still hidden.
await page.reload();
await expect(sidebar.locator('button[aria-label="展开"]').first()).toBeVisible();
await expect(sidebar.getByText("Configure Tailwind theme")).toHaveCount(0);
await sidebar.locator('button[aria-label="展开"]').first().click();
await expect(sidebar.getByText("Configure Tailwind theme")).toBeVisible();