Skip to content

feat(ui): inline page preview on wiki-link hover#78

Open
advancedresearcharray wants to merge 4 commits into
mainfrom
feat/issue-421-wiki-link-hover-preview-verified
Open

feat(ui): inline page preview on wiki-link hover#78
advancedresearcharray wants to merge 4 commits into
mainfrom
feat/issue-421-wiki-link-hover-preview-verified

Conversation

@advancedresearcharray

@advancedresearcharray advancedresearcharray commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Obsidian-style hover previews for rendered [[wiki-link]] anchors in read/preview mode using Radix HoverCard (300ms open / 100ms close delay).
  • Lazy-fetch preview data via GET /api/kiwi/peek with in-flight deduplication and success/404 caching; show title, path, snippet (≤200 chars), and tags.
  • Graceful handling for missing/broken links ("Page not found"), pointer-only opens (no keyboard Tab popover), touch/coarse-pointer fallback to plain anchors, and popover clicks that do not navigate.

Closes kiwifs#421

Test plan

  • cd ui && npm test -- --run wikiLinkPeek wikiLinkAnchor — 18/18 passed
  • go test ./internal/mcpserver/ -run 'TestPeek|TestToolHandler_Peek' — passed
  • Hover a wiki-link in read mode → preview shows title, path, snippet, tags
  • Hover a broken/missing wiki-link → "Page not found"
  • Tab to wiki-link → no popover opens
  • Click inside popover → does not navigate
  • Editor mode → no hover preview
  • CI: npm install && npm run build

Array Fleet and others added 4 commits July 3, 2026 12:00
Show Obsidian-style page previews on wiki-link hover using Radix
HoverCard, lazy /api/kiwi/peek fetches with deduplicated caching,
and touch-device detection to skip hover on coarse pointers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Peer review follow-up: local-notes markdown anchor renderer now omits
the react-markdown node prop before forwarding attrs to hover preview.

Co-authored-by: Cursor <cursoragent@cursor.com>
Peer review: pass through the original #kiwi: / #kiwi-missing: href
from remark-wiki-links instead of reconstructing page paths on the
underlying anchor element.

Signed-off-by: Array Fleet <fleet@advancedresearcharray.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Spread remark attrs before explicit href/onClick/className so
markdown plugin props cannot override navigation or hover handlers.

Peer review approved; 18/18 UI tests and peek API tests pass.

Signed-off-by: Array Fleet <fleet@advancedresearcharray.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ui): inline page preview on wiki-link hover

1 participant