feat: show research chat history as full-width tabs

This commit is contained in:
2026-10-07 22:28:58 +09:00
parent a538628670
commit c46e787738
8 changed files with 192 additions and 108 deletions
+11
View File
@@ -347,6 +347,17 @@ test("keeps browser conversation selection independent and restores it on reload
const secondWorkspace = new WorkspacePage(secondPage);
await researchPage.goTo(`?run=${first}`, { waitUntil: "domcontentloaded" });
await workspacePage.showResearch();
const history = page.getByRole("navigation", { name: "Chat history" });
const firstTab = history.getByRole("button", { name: "Browser one conversation" });
const secondTab = history.getByRole("button", { name: "Browser two conversation" });
await expect(firstTab).toHaveAttribute("aria-current", "page");
await workspacePage.showDeckManagement();
await secondTab.click();
await expect(page).toHaveURL(new RegExp(`run=${second}`));
await expect(secondTab).toHaveAttribute("aria-current", "page");
await expect(researchPage.conversation).toContainText("Browser two conversation");
await page.goBack();
await expect(firstTab).toHaveAttribute("aria-current", "page");
await secondResearch.goTo(`?run=${second}`, {
waitUntil: "domcontentloaded",
});
+14
View File
@@ -13,6 +13,20 @@ test("keeps the sidebar, composer and deck reachable at compact widths", async (
await workspacePage.showResearch();
const chat = researchPage.panel;
await expect(chat).toBeVisible();
const history = page.getByRole("navigation", { name: "Chat history" });
await expect(history).toBeVisible();
const historyBounds = await history.boundingBox();
const chatBounds = await chat.boundingBox();
if (!historyBounds || !chatBounds) throw new Error("Chat and history must have visible bounds");
expect(historyBounds.x).toBe(0);
const availableWidth =
width < 768
? await page
.getByRole("dialog", { name: "Workspace" })
.evaluate((element) => element.clientWidth)
: width;
expect(historyBounds.width).toBe(availableWidth);
expect(historyBounds.y + historyBounds.height).toBeLessThanOrEqual(chatBounds.y);
const composer = researchPage.composer;
await expect(composer).toBeVisible();
const bounds = await composer.boundingBox();