Skip to content

Commit 150fee9

Browse files
author
PR Batch Tester
committed
fix(web): ignore inherited entries in lineage title lookups
1 parent da051a1 commit 150fee9

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎apps/web/src/components/chat/ThreadRelationshipsControl.browser.test.tsx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,14 +363,16 @@ it("shows a delegated-from thread's full title in its tooltip even when its envi
363363
it.each([
364364
{
365365
name: "an omitted existing fork",
366+
id: "constructor",
366367
exists: true,
367368
success: true,
368369
pending: false,
369370
archived: false,
370371
visible: true,
371372
},
372373
{
373-
name: "a deleted fork",
374+
name: "a deleted fork named constructor",
375+
id: "constructor",
374376
exists: false,
375377
success: true,
376378
pending: false,
@@ -394,7 +396,8 @@ it.each([
394396
visible: false,
395397
},
396398
{
397-
name: "an unresolved fork",
399+
name: "an unresolved fork named toString",
400+
id: "toString",
398401
exists: false,
399402
success: true,
400403
pending: true,
@@ -411,10 +414,10 @@ it.each([
411414
},
412415
])(
413416
"keeps or hides $name after checking its existence",
414-
async ({ exists, success, pending, archived, visible }) => {
417+
async ({ exists, success, pending, archived, visible, id = "deleted-fork" }) => {
415418
setup();
416419
const projection = makeThreadProjectionFixture();
417-
const deletedId = ThreadId.make("deleted-fork");
420+
const deletedId = ThreadId.make(id);
418421
const title = "Example fork";
419422
state.threadTitles = exists ? { [deletedId]: title } : {};
420423
state.titleLookup = { isSuccess: success, isPending: pending };

‎apps/web/src/components/chat/ThreadRelationshipsControl.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,14 +499,15 @@ export function ThreadRelationshipsPanel(props: {
499499
input: { threadIds: unlistedThreadIds },
500500
}),
501501
);
502+
const resolvedThreadTitles = threadTitles.data ?? {};
502503
// Omitted and archived threads remain reachable; only a settled lookup proves one is gone.
503504
const visibleRelationships = relationshipRows.filter(
504505
({ threadId, edge }) =>
505506
edge.kind === "subagent" ||
506507
!unlistedThreadIds.includes(threadId) ||
507508
!threadTitles.isSuccess ||
508509
threadTitles.isPending ||
509-
threadTitles.data?.[threadId] !== undefined,
510+
Object.hasOwn(resolvedThreadTitles, threadId),
510511
);
511512
const canDetach = projection ? canDetachThreadProviderSession(projection) : false;
512513

@@ -690,7 +691,9 @@ export function ThreadRelationshipsPanel(props: {
690691
title:
691692
workflowGroup?.workflow.workflowName ??
692693
// Fresher than an archived snapshot's copy.
693-
threadTitles.data?.[threadId] ??
694+
(Object.hasOwn(resolvedThreadTitles, threadId)
695+
? resolvedThreadTitles[threadId]
696+
: undefined) ??
694697
node?.thread?.title ??
695698
agent?.title ??
696699
threadId,

0 commit comments

Comments
 (0)