diff --git a/android/app/src/main/java/com/hyzq/boss/ConversationFolderActivity.java b/android/app/src/main/java/com/hyzq/boss/ConversationFolderActivity.java index 8abbe9e..c7035ef 100644 --- a/android/app/src/main/java/com/hyzq/boss/ConversationFolderActivity.java +++ b/android/app/src/main/java/com/hyzq/boss/ConversationFolderActivity.java @@ -263,24 +263,6 @@ public class ConversationFolderActivity extends BossScreenActivity { } ArrayList targetIndices = resolveTargetThreadIndices(threads); - if (!targetIndices.isEmpty()) { - String matchedLabel = targetProjectLabel; - if ((matchedLabel == null || matchedLabel.isEmpty())) { - JSONObject firstTarget = threads.optJSONObject(targetIndices.get(0)); - if (firstTarget != null) { - matchedLabel = firstTarget.optString("threadTitle", ""); - } - } - appendContent(BossUi.buildSoftPanel( - this, - "已定位到目标线程", - matchedLabel == null || matchedLabel.isEmpty() - ? "文件夹页已打开,并将匹配线程置顶显示。" - : matchedLabel, - targetIndices.size() + " 个匹配项已置顶" - )); - } - for (int i = 0; i < targetIndices.size(); i++) { renderThreadAtIndex(threads, targetIndices.get(i), true); } diff --git a/android/app/src/test/java/com/hyzq/boss/ConversationFolderActivityTest.java b/android/app/src/test/java/com/hyzq/boss/ConversationFolderActivityTest.java index d4c3592..270a861 100644 --- a/android/app/src/test/java/com/hyzq/boss/ConversationFolderActivityTest.java +++ b/android/app/src/test/java/com/hyzq/boss/ConversationFolderActivityTest.java @@ -86,11 +86,12 @@ public class ConversationFolderActivityTest { ); LinearLayout content = activity.findViewById(R.id.screen_content); - assertTrue(viewTreeContainsText(content, "已定位到目标线程")); + assertFalse("项目抽屉页不应展示搜索定位说明卡片", viewTreeContainsText(content, "已定位到目标线程")); + assertFalse("项目抽屉页不应展示匹配项置顶说明文案", viewTreeContainsText(content, "个匹配项已置顶")); assertTrue(viewTreeContainsText(content, "目标线程")); assertTrue(viewTreeContainsText(content, "发布回滚")); assertEquals(2, countTextOccurrences(content, "目标线程")); - assertTrue(countTextOccurrences(content, "发布回滚") >= 3); + assertEquals(2, countTextOccurrences(content, "发布回滚")); assertEquals(0, countTextOccurrences(content, "project-1")); } @@ -114,7 +115,7 @@ public class ConversationFolderActivityTest { ); LinearLayout content = activity.findViewById(R.id.screen_content); - assertTrue(viewTreeContainsText(content, "已定位到目标线程")); + assertFalse("项目抽屉页不应展示搜索定位说明卡片", viewTreeContainsText(content, "已定位到目标线程")); assertTrue(viewTreeContainsText(content, "日志收口")); assertEquals(0, countTextOccurrences(content, "project-99")); assertEquals(1, countTextOccurrences(content, "目标线程")); diff --git a/src/app/conversations/folders/[folderKey]/page.tsx b/src/app/conversations/folders/[folderKey]/page.tsx index 76a490f..8ab01e5 100644 --- a/src/app/conversations/folders/[folderKey]/page.tsx +++ b/src/app/conversations/folders/[folderKey]/page.tsx @@ -32,18 +32,6 @@ export default async function ConversationFolderPage({ ) : null} -
-
-
- {folder?.folderLabel ?? "未命名项目"} -
-
- {folder - ? `${folder.deviceName ?? "当前设备"} · ${folder.threadCount} 个线程` - : "当前项目下没有可显示的线程。"} -
-
-
{folder ? ( ) : ( diff --git a/tests/project-scoped-realtime-refresh.test.ts b/tests/project-scoped-realtime-refresh.test.ts index 90829a7..5de0c40 100644 --- a/tests/project-scoped-realtime-refresh.test.ts +++ b/tests/project-scoped-realtime-refresh.test.ts @@ -101,6 +101,26 @@ test("folder conversation page wires folder thread ids into realtime refresh", a assert.match(folderPage, /"conversation\.updated"/, "expected folder page to listen to conversation updates"); }); +test("folder conversation page does not render a redundant intro card before the thread list", async () => { + const folderPage = await readWorkspaceFile("src/app/conversations/folders/[folderKey]/page.tsx"); + + assert.doesNotMatch( + folderPage, + /rounded-2xl border border-\[#E5E5EA\] bg-white px-4 py-4/, + "expected folder page to skip the standalone intro card", + ); + assert.doesNotMatch( + folderPage, + /folder\.deviceName/, + "expected folder page to avoid repeating device info above the thread list", + ); + assert.doesNotMatch( + folderPage, + /folder\.threadCount/, + "expected folder page to avoid repeating thread count above the thread list", + ); +}); + test("forward page wires realtime refresh for visible source and target projects", async () => { const forwardPage = await readWorkspaceFile("src/app/conversations/[projectId]/forward/page.tsx");