From c8156d5f40ad7ed7cfe5ef81696edd6bb9db4afa Mon Sep 17 00:00:00 2001 From: kris Date: Sun, 5 Apr 2026 13:38:09 +0800 Subject: [PATCH] fix: use folder project title in web rows --- src/components/app-ui.tsx | 2 +- tests/conversation-home-items.test.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/app-ui.tsx b/src/components/app-ui.tsx index 318f144..2f0f6fb 100644 --- a/src/components/app-ui.tsx +++ b/src/components/app-ui.tsx @@ -358,7 +358,7 @@ export function getConversationListItemPresentation(conversation: ConversationIt isFolderArchive && conversation.folderKey ? `/conversations/folders/${encodeURIComponent(conversation.folderKey)}` : `/conversations/${conversation.projectId}`, - title: isFolderArchive ? conversation.threadTitle : conversation.projectTitle, + title: conversation.projectTitle, subtitle: isFolderArchive ? conversation.folderLabel : conversation.deviceNamesPreview.join(" / "), }; } diff --git a/tests/conversation-home-items.test.ts b/tests/conversation-home-items.test.ts index a2c3295..22d28d5 100644 --- a/tests/conversation-home-items.test.ts +++ b/tests/conversation-home-items.test.ts @@ -424,9 +424,13 @@ test("folder archive homepage rows keep the project title, compact subtitle, and const folder = getConversationHomeItems(state).find((item) => item.conversationType === "folder_archive"); assert.ok(folder, "expected grouped folder archive item"); - const presentation = getConversationListItemPresentation(folder!); + const presentation = getConversationListItemPresentation({ + ...folder!, + projectTitle: "项目标题", + threadTitle: "线程标题", + }); - assert.equal(presentation.title, "Boss"); + assert.equal(presentation.title, "项目标题"); assert.equal(presentation.subtitle, "2 个线程 · 最近:发布回滚"); assert.equal(presentation.href, "/conversations/folders/mac-studio%3Aboss"); });