Skip to content

Commit 0180da2

Browse files
PR Batch Testershivamhwp
authored andcommitted
fix(web): ignore inherited entries in lineage title lookups
1 parent 3664cd4 commit 0180da2

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
@@ -365,14 +365,16 @@ it("shows a delegated-from thread's full title in its tooltip even when its envi
365365
it.each([
366366
{
367367
name: "an omitted existing fork",
368+
id: "constructor",
368369
exists: true,
369370
success: true,
370371
pending: false,
371372
archived: false,
372373
visible: true,
373374
},
374375
{
375-
name: "a deleted fork",
376+
name: "a deleted fork named constructor",
377+
id: "constructor",
376378
exists: false,
377379
success: true,
378380
pending: false,
@@ -396,7 +398,8 @@ it.each([
396398
visible: false,
397399
},
398400
{
399-
name: "an unresolved fork",
401+
name: "an unresolved fork named toString",
402+
id: "toString",
400403
exists: false,
401404
success: true,
402405
pending: true,
@@ -413,10 +416,10 @@ it.each([
413416
},
414417
])(
415418
"keeps or hides $name after checking its existence",
416-
async ({ exists, success, pending, archived, visible }) => {
419+
async ({ exists, success, pending, archived, visible, id = "deleted-fork" }) => {
417420
setup();
418421
const projection = makeThreadProjectionFixture();
419-
const deletedId = ThreadId.make("deleted-fork");
422+
const deletedId = ThreadId.make(id);
420423
const title = "Example fork";
421424
state.threadTitles = exists ? { [deletedId]: title } : {};
422425
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
@@ -515,14 +515,15 @@ export function ThreadRelationshipsPanel(props: {
515515
input: { threadIds: unlistedThreadIds },
516516
}),
517517
);
518+
const resolvedThreadTitles = threadTitles.data ?? {};
518519
// Omitted and archived threads remain reachable; only a settled lookup proves one is gone.
519520
const visibleRelationships = relationshipRows.filter(
520521
({ threadId, edge }) =>
521522
edge.kind === "subagent" ||
522523
!unlistedThreadIds.includes(threadId) ||
523524
!threadTitles.isSuccess ||
524525
threadTitles.isPending ||
525-
threadTitles.data?.[threadId] !== undefined,
526+
Object.hasOwn(resolvedThreadTitles, threadId),
526527
);
527528
const canDetach = projection ? canDetachThreadProviderSession(projection) : false;
528529

@@ -708,7 +709,9 @@ export function ThreadRelationshipsPanel(props: {
708709
title:
709710
workflowGroup?.workflow.workflowName ??
710711
// Fresher than an archived snapshot's copy.
711-
threadTitles.data?.[threadId] ??
712+
(Object.hasOwn(resolvedThreadTitles, threadId)
713+
? resolvedThreadTitles[threadId]
714+
: undefined) ??
712715
node?.thread?.title ??
713716
agent?.title ??
714717
threadId,

0 commit comments

Comments
 (0)