diff --git a/landing/app/mira/wiki/page.tsx b/landing/app/mira/wiki/page.tsx index b2ef637..7b96d7e 100644 --- a/landing/app/mira/wiki/page.tsx +++ b/landing/app/mira/wiki/page.tsx @@ -28,6 +28,7 @@ export default function WikiIndexPage() { const [indexChildren, setIndexChildren] = useState([]); const [logEntries, setLogEntries] = useState([]); const [otherWikiPages, setOtherWikiPages] = useState([]); + const [indexEntries, setIndexEntries] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); @@ -95,6 +96,22 @@ export default function WikiIndexPage() { .filter((b) => !hasAnyInfraSubtype(b) && !hasMetaTag(b)) .sort((a, b) => (b.created_at ?? 0) - (a.created_at ?? 0)), ); + + // 平行撈 index-entry blocks(per-entity 摘要,CC navigation entry point) + // 對應 design.md §3.5.12.4.1 / 7B.3f + const idxRes = await fetch( + `${KBDB_BASE}/blocks?type=index-entry&limit=200`, + { headers }, + ); + if (idxRes.ok) { + const idxData = await idxRes.json(); + if (!cancelled) { + const idxBlocks: Block[] = idxData.blocks ?? []; + setIndexEntries( + idxBlocks.sort((a, b) => (a.page_name ?? '').localeCompare(b.page_name ?? '')), + ); + } + } } catch (e: any) { if (!cancelled) setError(e?.message ?? 'load failed'); } finally { @@ -163,6 +180,29 @@ export default function WikiIndexPage() { )} +
+ {indexEntries.length > 0 ? ( +
+ {indexEntries.map((b) => { + const entity = (b.page_name ?? '').replace(/^index-/, ''); + const firstLine = firstLineOf(b.content) + .replace(/^#+\s*/, '') + .slice(0, 80); + return ( + + ); + })} +
+ ) : ( + 尚未有 index-entry(wiki_synthesis 跑完後自動建) + )} +
+
{logEntries.length > 0 ? (