Commit Graph

4 Commits

Author SHA1 Message Date
Leo 7dae958dbe feat(mira/wiki): backlinks section — 顯示提到此 entity 的 raw notes (#2 leo 反饋)
leo 2026-05-17 反饋:「從這本書的條目應該反向連到那篇筆記去,
如果在 Logseq 會放在下方列表提到這個條目的其他內容」

實作:
- 撈所有 content === entity 的 wiki-page (V3 一次寫入會建多個 wiki-page
  per raw mention)
- 從每個 wiki-page tags_json 取 raw:XXX tag → unique raw_ids
- fetch 對應 raw blocks → render 「📎 提到此 entity 的筆記」section
  每條 link 跳 /mira/feed#page=...
- 顯示前 100 字 preview,全文 hover title
- 樣式:左 border + 暗色背景 (區分於主內容)

對應 wiki_synthesis V3 (commit 63ac4c9 mira) 的 wiki-page tags raw:XXX
標記設計:每篇 raw 提到某 entity 時,create_wiki_page 都會寫一個新的
wiki-page (page_name 同名),tags 含 raw:{raw_id}。反查 wiki 對應 raw
不靠 KBDB graph 反向 index,純走客戶端 wiki-page list filter。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 10:40:40 +08:00
Leo 3689f30409 fix(mira): [pageName] h1 顯示 entity 名 + listing dedupe by entity
兩個 leo 反饋的 UI bug:

1. wiki/[pageName] 對 index-entry 渲染時,h1 用 block.content(整篇 markdown)
   會把整個內容塞進 h1。改:wiki-page 用 content 當 entity 名;其他類型
   (index-entry/schema/log)用 page_name 剝 `wiki-` / `index-` prefix。

2. listing「Wiki Pages (21)」累積式設計造成同 entity 多版顯示為多張卡,雜亂。
   改:用 useMemo dedupe by entity(content)— 每 entity 一張卡顯示最新版,
   標題顯示「N 版累積」當 N>1。原始 21 筆 → 現在約 6-7 個 unique entity。
2026-05-16 09:03:45 +08:00
Leo 933ae6cb13 feat(mira): 7B.3g wiki UI 樹狀渲染 + 跨 wiki 連結
對應 polaris/mira/.agents/specs/mira-app/design.md §5.2 + §3.5.12。

`/mira/wiki/[pageName]`:
- 抓 wiki-page 後平行撈所有 wiki-paragraph / triplet / wiki-page,client-side 用 parent_id filter
  (KBDB 沒 parent_id server filter,且 tag filter 還有 KI-3 bug)
- 按 facet 分區渲染:facet 標題 + paragraph markdown + 該段的 triplets
- facet 預設展開(看一篇要看內容)/ triplets 預設折疊(leo Logseq outliner 習慣)
- **triplet A/B 拆字串 「A >> 關係 >> B」**,若 A 或 B 對得上既有 wiki entity → render 成 <Link>
  跨 wiki 跳轉,是 Wikipedia-like 體驗的關鍵
- fallback:非 wiki-page block(schema/index/log 等)直接 render content

`/mira/wiki`:列表用 wiki-page 的 content (= entity 名稱) 當標題,不是 page_name slug。

mira.css 加 `.mira-wiki-detail` 不破版 + h2 底線,避免長 cypher 字串撐爆右邊界。

TS check pass。
2026-05-14 13:35:54 +08:00
Leo 519423cb0d feat(arcrun): mira wiki page with tag filter + accumulated WIP
- landing/app/mira/wiki: tag=mira-wiki list now shows all wiki paragraphs
  (depends on KBDB tag filter exposed in matrix/kbdb commit, separate repo)
- landing: app/mira hub + feed split + various WIP from prior sessions
- registry/components: claude_api / kbdb_create_block / kbdb_get / km_writer /
  platform_crypto / auth_oauth2 contracts + main.go (accumulated)
- .component-builds: pkg-lock updates + index.ts adjustments (WIP)
- .agents/specs/arcrun/frontend-redesign: design notes
- docs/test_credentials, docs/user_requirements/arcrun-landing-page: WIP docs
- cypher-executor: auth-dispatcher / wasi-shim adjustments (WIP)

Includes accumulated work from prior sessions plus the wiki UI tag-filter
update that surfaces the AI-generated wiki paragraphs at /mira/wiki.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 16:52:01 +08:00