Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

feat: show full thread title in a tooltip when hovering sidebar thread names (#1994)

Utkarsh Patilcadd7086462c
diff --git a/apps/web/src/components/ChatView.browser.tsx b/apps/web/src/components/ChatView.browser.tsx
index 30cc162fb..3bad1c2e5 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",
@@ -3413,6 +3414,34 @@ 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 threadTitle = page.getByTestId(`thread-title-${THREAD_ID}`);
+
+ await expect.element(threadTitle).toBeInTheDocument();
+ await threadTitle.hover();
+
+ await vi.waitFor(
+ () => {
+ const tooltip = document.querySelector<HTMLElement>('[data-slot="tooltip-popup"]');
+ expect(tooltip).not.toBeNull();
+ expect(tooltip?.textContent).toContain(THREAD_TITLE);
+ },
+ { timeout: 8_000, interval: 16 },
+ );
+ } 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 2495429ef..25fb8b03e 100644
--- a/apps/web/src/components/Sidebar.tsx
+++ b/apps/web/src/components/Sidebar.tsx
@@ -647,7 +647,21 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
onClick={handleRenameInputClick}
/>
) : (
- <span className="min-w-0 flex-1 truncate text-xs">{thread.title}</span>
+ <Tooltip>
+ <TooltipTrigger
+ render={
+ <span
+ className="min-w-0 flex-1 truncate text-xs"
+ data-testid={`thread-title-${thread.id}`}
+ >
+ {thread.title}
+ </span>
+ }
+ />
+ <TooltipPopup side="top" className="max-w-80 whitespace-normal leading-tight">
+ {thread.title}
+ </TooltipPopup>
+ </Tooltip>
)}
</div>
<div className="ml-auto flex shrink-0 items-center gap-1.5">