fix: support archived thread search on android homepage

This commit is contained in:
kris
2026-04-05 13:58:08 +08:00
parent 7206be05b6
commit 0fcbf2d0a0
4 changed files with 100 additions and 19 deletions

View File

@@ -424,6 +424,7 @@ 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");
assert.deepEqual(folder?.searchAliases, ["发布回滚", "归档确认"]);
const presentation = getConversationListItemPresentation({
...folder!,
projectTitle: "项目标题",
@@ -435,6 +436,25 @@ test("folder archive homepage rows keep the project title, compact subtitle, and
assert.equal(presentation.href, "/conversations/folders/mac-studio%3Aboss");
});
test("folder archive search aliases stay bounded to the latest thread titles", async () => {
await setup();
const state = await readState();
state.projects = state.projects.filter((project) => project.id === "master-agent");
state.projects.push(
buildImportedThreadProject("mac-studio", "boss-thread-1", "Boss", "boss", "发布回滚", "thread-1", "2026-03-30T14:00:00+08:00"),
buildImportedThreadProject("mac-studio", "boss-thread-2", "Boss", "boss", "Android UI 收尾", "thread-2", "2026-03-30T13:00:00+08:00"),
buildImportedThreadProject("mac-studio", "boss-thread-3", "Boss", "boss", "日志收口", "thread-3", "2026-03-30T12:00:00+08:00"),
buildImportedThreadProject("mac-studio", "boss-thread-4", "Boss", "boss", "网络修复", "thread-4", "2026-03-30T11:00:00+08:00"),
buildImportedThreadProject("mac-studio", "boss-thread-5", "Boss", "boss", "审阅确认", "thread-5", "2026-03-30T10:00:00+08:00"),
);
const folder = getConversationHomeItems(state).find((item) => item.conversationType === "folder_archive");
assert.ok(folder, "expected grouped folder archive item");
assert.deepEqual(folder?.searchAliases, ["发布回滚", "Android UI 收尾", "日志收口", "网络修复"]);
});
test("conversation items expose context status while keeping idle activity silent", async () => {
await setup();
const state = await readState();