The best way to control Claude Code, Codex and more from any computer or phone
Show the full title in lineage/side-chat row tooltips (#28326)
Fatih ÖZDİL committed
Nov 1, 2026 at 13:50 UTC
b5c83cdb951f2f4ce10d323696ea4f8e958af626
2 files changed
+200
-18
apps/web/src/components/chat/ThreadRelationshipsControl.browser.test.tsx
+163
-3
@@ -1,10 +1,15 @@
1
+import * as DateTime from "effect/DateTime";
2
import { EnvironmentId, NodeId, ThreadId } from "@t3tools/contracts";
3
import * as Cause from "effect/Cause";
4
import { AsyncResult } from "effect/reactivity";
5
import { expect, it, vi } from "vite-plus/test";
5
-import { page } from "vite-plus/test/browser";
6
+import { page, userEvent } from "vite-plus/test/browser";
7
7
-const state = vi.hoisted(() => ({ projection: null as unknown, commandSucceeds: false }));
8
+const state = vi.hoisted(() => ({
9
+ projection: null as unknown,
10
+ commandSucceeds: false,
11
+ relatedShells: [] as unknown[],
12
+}));
13
14
vi.mock(import("@effect/atom-react"), async (original) => ({
15
...(await original()),
@@ -16,7 +21,9 @@ vi.mock(import("../../state/entities"), () => ({
21
useThreadProjection: ((ref: unknown) =>
22
ref === null ? null : { projection: state.projection }) as never,
23
useThreadRelationshipShells: (() =>
19
- state.projection === null ? [] : [(state.projection as { thread: unknown }).thread]) as never,
24
+ state.projection === null
25
+ ? []
26
+ : [(state.projection as { thread: unknown }).thread, ...state.relatedShells]) as never,
27
useProjects: (() => []) as never,
28
}));
29
vi.mock(import("../../state/environments"), () => ({
@@ -43,6 +50,7 @@ const threadId = ThreadId.make("fork");
50
51
function setup() {
52
state.commandSucceeds = false;
53
+ state.relatedShells = [];
54
state.projection = {
55
thread: {
56
id: threadId,
@@ -183,3 +191,155 @@ it("opens an idle child from Lineage when its shell has not been loaded", async
191
expect(screen.router?.state.location.pathname).toBe("/local/omitted-child"),
192
);
193
});
194
+
195
+it("shows a lineage thread's full title in its tooltip", async () => {
196
+ setup();
197
+ const longTitle = "Compare the lineage tooltip against a title that the row truncates";
198
+ const sourceThread = {
199
+ ...(state.projection as { thread: Record<string, unknown> }).thread,
200
+ id: "source",
201
+ title: longTitle,
202
+ lineage: { parentThreadId: null, relationshipToParent: null },
203
+ };
204
+ state.relatedShells = [sourceThread];
205
+ await using _screen = await render(
206
+ <ThreadRelationshipsPanel
207
+ environmentId={environmentId}
208
+ threadId={threadId}
209
+ showLineage
210
+ showSideChats={false}
211
+ />,
212
+ );
213
+
214
+ await userEvent.hover(page.getByText(longTitle, { exact: true }));
215
+ await vi.waitFor(() =>
216
+ expect(document.querySelector('[data-slot="tooltip-popup"]')?.textContent).toContain(longTitle),
217
+ );
218
+});
219
+
220
+it("shows a side chat's full title in its tooltip", async () => {
221
+ setup();
222
+ const longTitle = "Side chat question with a title that the side chat row truncates";
223
+ state.relatedShells = [
224
+ {
225
+ id: "side",
226
+ title: longTitle,
227
+ lineage: {
228
+ parentThreadId: threadId,
229
+ relationshipToParent: "fork",
230
+ rootThreadId: threadId,
231
+ sideChat: true,
232
+ },
233
+ },
234
+ ];
235
+ await using _screen = await render(
236
+ <ThreadRelationshipsPanel
237
+ environmentId={environmentId}
238
+ threadId={threadId}
239
+ showLineage={false}
240
+ showSideChats
241
+ />,
242
+ );
243
+
244
+ await userEvent.hover(page.getByText(longTitle, { exact: true }));
245
+ await vi.waitFor(() =>
246
+ expect(document.querySelector('[data-slot="tooltip-popup"]')?.textContent).toContain(longTitle),
247
+ );
248
+});
249
+
250
+it("shows a remote subagent's full title in its tooltip even when its environment is unavailable", async () => {
251
+ setup();
252
+ const longTitle = "Investigate a remote subagent issue across linked environments";
253
+ const remoteEnvId = EnvironmentId.make("remote-env");
254
+ const remoteThreadId = ThreadId.make("remote-thread");
255
+ const now = DateTime.makeUnsafe("2026-10-31T20:00:00.000Z");
256
+ state.projection = {
257
+ ...(state.projection as Record<string, unknown>),
258
+ subagents: [
259
+ {
260
+ id: NodeId.make("remote-agent"),
261
+ threadId,
262
+ runId: null,
263
+ parentNodeId: NodeId.make("parent"),
264
+ origin: "app_owned",
265
+ createdBy: "agent",
266
+ driver: "codex",
267
+ providerInstanceId: "provider",
268
+ providerThreadId: null,
269
+ childThreadId: null,
270
+ nativeTaskRef: null,
271
+ prompt: "Run remote task",
272
+ title: longTitle,
273
+ model: null,
274
+ status: "completed",
275
+ result: null,
276
+ startedAt: null,
277
+ completedAt: null,
278
+ updatedAt: now,
279
+ remoteChild: {
280
+ environmentId: remoteEnvId,
281
+ threadId: remoteThreadId,
282
+ label: "Remote VM",
283
+ },
284
+ },
285
+ ],
286
+ };
287
+ await using screen = await render(
288
+ <ThreadRelationshipsPanel
289
+ environmentId={environmentId}
290
+ threadId={threadId}
291
+ showLineage
292
+ showSideChats={false}
293
+ />,
294
+ { router: "/environment/fork" },
295
+ );
296
+
297
+ const row = screen.getByRole("button", { name: new RegExp(longTitle) });
298
+ await userEvent.hover(row);
299
+ await vi.waitFor(() =>
300
+ expect(document.querySelector('[data-slot="tooltip-popup"]')?.textContent).toContain(longTitle),
301
+ );
302
+ expect(document.querySelector('[data-slot="tooltip-popup"]')?.textContent).toContain(
303
+ "Runs on Remote VM. Connect to it to open the thread there.",
304
+ );
305
+
306
+ await row.click({ force: true });
307
+ expect(screen.router?.state.location.pathname).toBe("/environment/fork");
308
+});
309
+
310
+it("shows a delegated-from thread's full title in its tooltip even when its environment is unavailable", async () => {
311
+ setup();
312
+ const longTitle = "Parent task delegated from another machine that has a long description";
313
+ state.projection = {
314
+ ...(state.projection as Record<string, unknown>),
315
+ thread: {
316
+ ...(state.projection as { thread: Record<string, unknown> }).thread,
317
+ delegatedFrom: {
318
+ environmentId: EnvironmentId.make("parent-env"),
319
+ threadId: ThreadId.make("parent-thread"),
320
+ title: longTitle,
321
+ },
322
+ },
323
+ };
324
+ await using screen = await render(
325
+ <ThreadRelationshipsPanel
326
+ environmentId={environmentId}
327
+ threadId={threadId}
328
+ showLineage
329
+ showSideChats={false}
330
+ />,
331
+ { router: "/environment/fork" },
332
+ );
333
+
334
+ const row = screen.getByRole("button", { name: new RegExp(longTitle) });
335
+ await userEvent.hover(row);
336
+ await vi.waitFor(() =>
337
+ expect(document.querySelector('[data-slot="tooltip-popup"]')?.textContent).toContain(longTitle),
338
+ );
339
+ expect(document.querySelector('[data-slot="tooltip-popup"]')?.textContent).toContain(
340
+ "Delegated from a linked environment. Connect to it to open the parent thread.",
341
+ );
342
+
343
+ await row.click({ force: true });
344
+ expect(screen.router?.state.location.pathname).toBe("/environment/fork");
345
+});
apps/web/src/components/chat/ThreadRelationshipsControl.tsx
+37
-15
@@ -197,6 +197,16 @@ function relationshipThreadTitle(input: {
197
return formatSubagentDisplayTitle(input.title);
198
}
199
200
+/** The full title, since the row truncates it, with what a click does. */
201
+function LineageTooltipContent(props: { readonly title: string; readonly hint: string }) {
202
+ return (
203
+ <>
204
+ <span className="block font-medium">{props.title}</span>
205
+ <span className="block text-muted-foreground">{props.hint}</span>
206
+ </>
207
+ );
208
+}
209
+
210
function currentSubagent<Agent extends RuntimeSubagent>(
211
agent: Agent | undefined,
212
childThread: OrchestrationV2ThreadShell | null | undefined,
@@ -257,15 +267,16 @@ function RemoteSubagentRow(props: {
267
size="sm"
268
variant="ghost"
269
part="row"
260
- disabled={environment === null}
261
- onClick={() =>
270
+ aria-disabled={environment === null || undefined}
271
+ onClick={() => {
272
+ if (environment === null) return;
273
void navigate({
274
to: "/$environmentId/$threadId",
275
params: buildThreadRouteParams(
276
scopeThreadRef(remoteChild.environmentId, remoteChild.threadId),
277
),
267
- })
268
- }
278
+ });
279
+ }}
280
/>
281
}
282
>
@@ -288,9 +299,14 @@ function RemoteSubagentRow(props: {
299
</span>
300
</TooltipTrigger>
301
<TooltipPopup side="left">
291
- {environment === null
292
- ? `Runs on ${remoteChild.label}. Connect to it to open the thread there.`
293
- : `Open on ${remoteChild.label}`}
302
+ <LineageTooltipContent
303
+ title={title}
304
+ hint={
305
+ environment === null
306
+ ? `Runs on ${remoteChild.label}. Connect to it to open the thread there.`
307
+ : `Open on ${remoteChild.label}`
308
+ }
309
+ />
310
</TooltipPopup>
311
</Tooltip>
312
</li>
@@ -323,13 +339,14 @@ function DelegatedFromRow(props: {
339
size="sm"
340
variant="ghost"
341
part="row"
326
- disabled={environment === null}
327
- onClick={() =>
342
+ aria-disabled={environment === null || undefined}
343
+ onClick={() => {
344
+ if (environment === null) return;
345
void navigate({
346
to: "/$environmentId/$threadId",
347
params: buildThreadRouteParams(parentRef),
331
- })
332
- }
348
+ });
349
+ }}
350
/>
351
}
352
>
@@ -344,9 +361,14 @@ function DelegatedFromRow(props: {
361
) : null}
362
</TooltipTrigger>
363
<TooltipPopup side="left">
347
- {environment === null
348
- ? `Delegated from ${label ?? "a linked environment"}. Connect to it to open the parent thread.`
349
- : "Open parent agent"}
364
+ <LineageTooltipContent
365
+ title={title}
366
+ hint={
367
+ environment === null
368
+ ? `Delegated from ${label ?? "a linked environment"}. Connect to it to open the parent thread.`
369
+ : "Open parent agent"
370
+ }
371
+ />
372
</TooltipPopup>
373
</Tooltip>
374
</li>
@@ -680,7 +702,7 @@ export function ThreadRelationshipsPanel(props: {
702
childProject={project}
703
/>
704
) : (
683
- relationshipHint
705
+ <LineageTooltipContent title={threadTitle} hint={relationshipHint} />
706
);
707
const relationshipContent = (
708
<>