From 258dcee4c68b26c5b69c36a10089160f14813815 Mon Sep 17 00:00:00 2001 From: UtkarshUsername Date: Mon, 13 Apr 2026 23:12:22 +0530 Subject: [PATCH 1/2] Restore thread title tooltip in sidebar - Add the full thread title to sidebar row tooltips - Suppress the tooltip while a thread is being renamed --- apps/web/src/components/ChatView.browser.tsx | 22 +++++++++++++++++++- apps/web/src/components/Sidebar.tsx | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/ChatView.browser.tsx b/apps/web/src/components/ChatView.browser.tsx index 0b49f1d7da..e63559b733 100644 --- a/apps/web/src/components/ChatView.browser.tsx +++ b/apps/web/src/components/ChatView.browser.tsx @@ -57,6 +57,7 @@ vi.mock("../lib/gitStatusState", () => ({ })); const THREAD_ID = "thread-browser-test" as ThreadId; +const THREAD_TITLE = "Browser test thread"; const ARCHIVED_SECONDARY_THREAD_ID = "thread-secondary-project-archived" as ThreadId; const PROJECT_ID = "project-1" as ProjectId; const SECOND_PROJECT_ID = "project-2" as ProjectId; @@ -288,7 +289,7 @@ function createSnapshotForTargetUser(options: { { id: THREAD_ID, projectId: PROJECT_ID, - title: "Browser test thread", + title: THREAD_TITLE, modelSelection: { provider: "codex", model: "gpt-5", @@ -3083,6 +3084,25 @@ describe("ChatView timeline estimator parity (full app)", () => { } }); + it("exposes the full thread title on the sidebar row tooltip", async () => { + const mounted = await mountChatView({ + viewport: DEFAULT_VIEWPORT, + snapshot: createSnapshotForTargetUser({ + targetMessageId: "msg-user-thread-tooltip-target" as MessageId, + targetText: "thread tooltip target", + }), + }); + + try { + const threadRow = page.getByTestId(`thread-row-${THREAD_ID}`); + + await expect.element(threadRow).toBeInTheDocument(); + await expect.element(threadRow).toHaveAttribute("title", THREAD_TITLE); + } finally { + await mounted.cleanup(); + } + }); + it("shows the confirm archive action after clicking the archive button", async () => { localStorage.setItem( "t3code:client-settings:v1", diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 2495429efd..727f4c1750 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -609,6 +609,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP size="sm" isActive={isActive} data-testid={`thread-row-${thread.id}`} + title={renamingThreadKey === threadKey ? undefined : thread.title} className={`${resolveThreadRowClassName({ isActive, isSelected, From 4ca65bfde91e609949474a974a6113e7f8221a09 Mon Sep 17 00:00:00 2001 From: UtkarshUsername Date: Mon, 13 Apr 2026 23:26:25 +0530 Subject: [PATCH 2/2] Add sidebar thread title tooltip - move thread title hover text into the tooltip component - update the browser test to assert the rendered tooltip instead of a title attribute --- apps/web/src/components/ChatView.browser.tsx | 15 ++++++++++++--- apps/web/src/components/Sidebar.tsx | 17 +++++++++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/apps/web/src/components/ChatView.browser.tsx b/apps/web/src/components/ChatView.browser.tsx index e63559b733..0f4dd85d1f 100644 --- a/apps/web/src/components/ChatView.browser.tsx +++ b/apps/web/src/components/ChatView.browser.tsx @@ -3094,10 +3094,19 @@ describe("ChatView timeline estimator parity (full app)", () => { }); try { - const threadRow = page.getByTestId(`thread-row-${THREAD_ID}`); + const threadTitle = page.getByTestId(`thread-title-${THREAD_ID}`); - await expect.element(threadRow).toBeInTheDocument(); - await expect.element(threadRow).toHaveAttribute("title", THREAD_TITLE); + await expect.element(threadTitle).toBeInTheDocument(); + await threadTitle.hover(); + + await vi.waitFor( + () => { + const tooltip = document.querySelector('[data-slot="tooltip-popup"]'); + expect(tooltip).not.toBeNull(); + expect(tooltip?.textContent).toContain(THREAD_TITLE); + }, + { timeout: 8_000, interval: 16 }, + ); } finally { await mounted.cleanup(); } diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 727f4c1750..25fb8b03e8 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -609,7 +609,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP size="sm" isActive={isActive} data-testid={`thread-row-${thread.id}`} - title={renamingThreadKey === threadKey ? undefined : thread.title} className={`${resolveThreadRowClassName({ isActive, isSelected, @@ -648,7 +647,21 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP onClick={handleRenameInputClick} /> ) : ( - {thread.title} + + + {thread.title} + + } + /> + + {thread.title} + + )}