fix: remove folder intro panels across surfaces

This commit is contained in:
AI Bot
2026-06-05 14:50:13 +08:00
parent 4e2636ec8b
commit e4e6f6597a
4 changed files with 24 additions and 33 deletions

View File

@@ -263,24 +263,6 @@ public class ConversationFolderActivity extends BossScreenActivity {
}
ArrayList<Integer> 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);
}

View File

@@ -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, "目标线程"));