diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 54a09e59..1ca71933 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -30,6 +30,7 @@
"vue-demi": "^0.14.6",
"vue-i18n": "^11.1.12",
"vue-router": "^4.5.0",
+ "vue-virtual-scroller": "^2.0.0-beta.8",
"webpack": "^5.94.0",
"xlsx": "file:./packages/xlsx-0.20.2.tgz"
},
@@ -5186,6 +5187,24 @@
"typescript": ">=5.0.0"
}
},
+ "node_modules/vue-virtual-scroller": {
+ "version": "2.0.1",
+ "resolved": "https://mirrors.tencent.com/npm/vue-virtual-scroller/-/vue-virtual-scroller-2.0.1.tgz",
+ "integrity": "sha512-3Drq8C61C4B3reSaZJr5nXBf/B7Beq1+h5/kYZB25MLYljTy97ISeUufRX9z6ZSZlFDXyafAOLK9XwajOWJY1A==",
+ "license": "MIT",
+ "dependencies": {
+ "mitt": "^2.1.0"
+ },
+ "peerDependencies": {
+ "vue": "^3.3.0"
+ }
+ },
+ "node_modules/vue-virtual-scroller/node_modules/mitt": {
+ "version": "2.1.0",
+ "resolved": "https://mirrors.tencent.com/npm/mitt/-/mitt-2.1.0.tgz",
+ "integrity": "sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==",
+ "license": "MIT"
+ },
"node_modules/watchpack": {
"version": "2.5.1",
"resolved": "https://mirrors.tencent.com/npm/watchpack/-/watchpack-2.5.1.tgz",
diff --git a/frontend/package.json b/frontend/package.json
index 34e2bc6c..a7bd9af3 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -34,6 +34,7 @@
"vue-demi": "^0.14.6",
"vue-i18n": "^11.1.12",
"vue-router": "^4.5.0",
+ "vue-virtual-scroller": "^2.0.0-beta.8",
"webpack": "^5.94.0",
"xlsx": "file:./packages/xlsx-0.20.2.tgz"
},
diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts
index faa3db37..9e531151 100755
--- a/frontend/src/i18n/locales/en-US.ts
+++ b/frontend/src/i18n/locales/en-US.ts
@@ -1684,6 +1684,8 @@ export default {
tabWiki: 'Wiki',
tabGraph: 'Graph',
searchPlaceholder: 'Search wiki pages...',
+ searchNoResults: 'No matching pages found',
+ loadMore: 'Load more ({remaining} remaining)',
filterAll: 'All Types',
filterSummary: 'Summaries',
filterEntity: 'Entities',
diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts
index 8a9a2498..1bac023d 100755
--- a/frontend/src/i18n/locales/ko-KR.ts
+++ b/frontend/src/i18n/locales/ko-KR.ts
@@ -2296,6 +2296,8 @@ export default {
tabWiki: "Wiki",
tabGraph: "그래프",
searchPlaceholder: "Wiki 페이지 검색...",
+ searchNoResults: "일치하는 페이지가 없습니다",
+ loadMore: "더 불러오기 ({remaining}개 남음)",
filterAll: "전체 유형",
filterSummary: "요약",
filterEntity: "엔티티",
diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts
index c615c9f7..41b27e8e 100755
--- a/frontend/src/i18n/locales/ru-RU.ts
+++ b/frontend/src/i18n/locales/ru-RU.ts
@@ -1906,6 +1906,8 @@ export default {
tabWiki: 'Wiki',
tabGraph: 'Граф',
searchPlaceholder: 'Поиск Wiki-страниц...',
+ searchNoResults: 'Страницы не найдены',
+ loadMore: 'Загрузить ещё (осталось {remaining})',
filterAll: 'Все типы',
filterSummary: 'Резюме',
filterEntity: 'Сущности',
diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts
index 262d08a5..306ae160 100755
--- a/frontend/src/i18n/locales/zh-CN.ts
+++ b/frontend/src/i18n/locales/zh-CN.ts
@@ -2267,6 +2267,8 @@ export default {
tabWiki: "Wiki",
tabGraph: "图谱",
searchPlaceholder: "搜索 Wiki 页面...",
+ searchNoResults: "没有找到匹配的页面",
+ loadMore: "加载更多(还剩 {remaining} 条)",
filterAll: "全部类型",
filterSummary: "摘要",
filterEntity: "实体",
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index d797d3a0..075131de 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -8,6 +8,10 @@ import TDesign from "tdesign-vue-next";
import "tdesign-vue-next/es/style/index.css";
import "@/assets/theme/theme.css";
import "@/assets/dropdown-menu.less";
+// vue-virtual-scroller ships its own tiny stylesheet — required for
+// RecycleScroller/DynamicScroller to size their viewport correctly.
+// Without it the scroller computes 0 height and renders no items.
+import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
import i18n from "./i18n";
import { initTheme } from "@/composables/useTheme";
import { initFont } from "@/composables/useFont";
diff --git a/frontend/src/views/knowledge/wiki/WikiBrowser.vue b/frontend/src/views/knowledge/wiki/WikiBrowser.vue
index 7ad9e790..6eb13951 100644
--- a/frontend/src/views/knowledge/wiki/WikiBrowser.vue
+++ b/frontend/src/views/knowledge/wiki/WikiBrowser.vue
@@ -213,73 +213,121 @@
:placeholder="$t('knowledgeEditor.wikiBrowser.searchPlaceholder')"
clearable
@enter="doSearch"
- @clear="loadPages"
+ @clear="searchResults = null"
>
{{ $t('knowledgeEditor.wikiBrowser.searchNoResults') || '没有找到匹配的页面' }}
+{{ $t('knowledgeEditor.wikiBrowser.emptyTitle') }}
+{{ $t('knowledgeEditor.wikiBrowser.emptyDesc') }}
+{{ $t('knowledgeEditor.wikiBrowser.selectPageHint') }}
+{{ $t('knowledgeEditor.wikiBrowser.selectPageHint') }}
{{ $t('knowledgeEditor.wikiBrowser.emptyTitle') }}
{{ $t('knowledgeEditor.wikiBrowser.emptyDesc') }}
@@ -488,13 +536,18 @@ @@ -2903,6 +3217,28 @@ onUnmounted(() => { padding: 0 12px 12px; } +// In page-mode the RecycleScroller delegates scrolling to the nearest +// scrollable ancestor (`.wiki-page-list`), so the scroller itself +// must not constrain height or introduce its own overflow. We only +// reserve a minimum to keep the empty-state loader from collapsing. +.wiki-group-scroller { + min-height: 60px; + margin-bottom: 4px; +} + +.wiki-group-sentinel { + // Invisible sentinel watched by IntersectionObserver to trigger + // the next page fetch. Height > 0 so it reliably enters the viewport. + height: 1px; + width: 100%; +} + +.wiki-group-loading { + display: flex; + justify-content: center; + padding: 6px 0; +} + .wiki-nav-item { display: flex; align-items: center; @@ -2946,55 +3282,73 @@ onUnmounted(() => { margin: 8px 12px; } -.wiki-group-label { +.wiki-tab-bar { + display: flex; + gap: 4px; + padding: 8px 0; + overflow-x: auto; + // Hide scrollbar while still allowing horizontal pan when types + // overflow the sidebar width (rare but happens with long labels). + scrollbar-width: none; + &::-webkit-scrollbar { display: none; } position: sticky; top: 0; z-index: 10; background: var(--td-bg-color-container); - font-size: 13px; - font-weight: 500; - color: var(--td-text-color-secondary); - padding: 12px 8px 8px; - cursor: pointer; - display: flex; +} + +.wiki-tab { + display: inline-flex; align-items: center; - gap: 6px; - user-select: none; - transition: color 0.15s; + gap: 4px; + padding: 4px 10px; + border-radius: 14px; + font-size: 12px; + color: var(--td-text-color-secondary); + cursor: pointer; + white-space: nowrap; + flex-shrink: 0; + transition: background 0.15s, color 0.15s; &:hover { + background: var(--td-bg-color-container-hover); color: var(--td-text-color-primary); } - &:first-child { - margin-top: 0; + &.active { + background: var(--td-brand-color-light); + color: var(--td-brand-color); + font-weight: 500; + } + + .wiki-tab-count { + font-size: 11px; + background: var(--td-bg-color-secondarycontainer); + border-radius: 10px; + padding: 0 6px; + line-height: 16px; + color: var(--td-text-color-placeholder); + } + + &.active .wiki-tab-count { + background: var(--td-brand-color-1, rgba(0, 82, 217, 0.12)); + color: var(--td-brand-color); } } -.wiki-group-chevron { - font-size: 14px; - color: var(--td-text-color-placeholder); - transition: transform 0.2s; - flex-shrink: 0; -} - -.wiki-group-count { - margin-left: auto; - font-size: 12px; - color: var(--td-text-color-placeholder); - background: var(--td-bg-color-secondarycontainer); - border-radius: 10px; - padding: 0 8px; - line-height: 18px; - text-align: center; -} - .wiki-page-item { + // Lock the rendered height so it matches WIKI_PAGE_ITEM_HEIGHT (100) + // minus margin-bottom (2). RecycleScroller absolute-positions rows + // at multiples of itemSize, so any variance between actual rendered + // height and the constant causes neighbors to overlap. + height: 98px; + box-sizing: border-box; + overflow: hidden; padding: 10px 12px; border-radius: 6px; cursor: pointer; margin-bottom: 2px; - transition: all 0.15s; + transition: background 0.15s; &:hover { background: var(--td-bg-color-container-hover);