diff --git a/frontend/src/components/workspace/recent-chat-list.tsx b/frontend/src/components/workspace/recent-chat-list.tsx index cc8ad0a13..9f3353f02 100644 --- a/frontend/src/components/workspace/recent-chat-list.tsx +++ b/frontend/src/components/workspace/recent-chat-list.tsx @@ -241,95 +241,91 @@ export function RecentChatList() { className="group/side-menu-item" > -
- - - - {titleOfThread(thread)} - - {channelSource && ( - - - {channelSource.label} - + + + + {titleOfThread(thread)} + + {channelSource && ( + + + {channelSource.label} - )} - - {env.NEXT_PUBLIC_STATIC_WEBSITE_ONLY !== "true" && ( - - - - - {t.common.more} - - - + + )} + + + {env.NEXT_PUBLIC_STATIC_WEBSITE_ONLY !== "true" && ( + + + + + {t.common.more} + + + + + handleRenameClick( + thread.thread_id, + titleOfThread(thread), + ) + } + > + + {t.common.rename} + + handleShare(thread)} + > + + {t.common.share} + + + + + {t.common.export} + + - handleRenameClick( - thread.thread_id, - titleOfThread(thread), - ) + handleExport(thread, "markdown") } > - - {t.common.rename} + + {t.common.exportAsMarkdown} handleShare(thread)} + onSelect={() => handleExport(thread, "json")} > - - {t.common.share} + + {t.common.exportAsJSON} - - - - {t.common.export} - - - - handleExport(thread, "markdown") - } - > - - {t.common.exportAsMarkdown} - - - handleExport(thread, "json") - } - > - - {t.common.exportAsJSON} - - - - - handleDelete(thread)} - > - - {t.common.delete} - - - - )} -
-
+ + + + handleDelete(thread)} + > + + {t.common.delete} + + + + )} ); })} diff --git a/frontend/tests/e2e/thread-history.spec.ts b/frontend/tests/e2e/thread-history.spec.ts index 444ea3e18..9e55367f5 100644 --- a/frontend/tests/e2e/thread-history.spec.ts +++ b/frontend/tests/e2e/thread-history.spec.ts @@ -53,6 +53,35 @@ test.describe("Thread history", () => { await expect(page).toHaveURL(new RegExp(MOCK_THREAD_ID)); }); + test("clicking blank space in a sidebar thread row navigates to it", async ({ + page, + }) => { + mockLangGraphAPI(page, { threads: THREADS }); + + await page.goto("/workspace/chats/new"); + + const sidebar = page.locator("[data-sidebar='sidebar']"); + const firstThreadItem = sidebar + .locator("[data-sidebar='menu-item']") + .filter({ hasText: "First conversation" }) + .first(); + await expect(firstThreadItem).toBeVisible({ timeout: 15_000 }); + + const firstThreadLink = firstThreadItem.getByRole("link"); + await expect(firstThreadLink).toBeVisible(); + + const box = await firstThreadLink.boundingBox(); + expect(box).not.toBeNull(); + if (!box) { + return; + } + + await firstThreadLink.click({ position: { x: 4, y: box.height / 2 } }); + + await page.waitForURL(`**/workspace/chats/${MOCK_THREAD_ID}`); + await expect(page).toHaveURL(new RegExp(MOCK_THREAD_ID)); + }); + test("existing thread loads historical messages", async ({ page }) => { mockLangGraphAPI(page, { threads: THREADS });