Skip to content

Include full pages as search results#25

Closed
twaugh wants to merge 1 commit intomainfrom
page-results
Closed

Include full pages as search results#25
twaugh wants to merge 1 commit intomainfrom
page-results

Conversation

@twaugh
Copy link
Copy Markdown
Owner

@twaugh twaugh commented Mar 16, 2026

Summary

  • Compute page embeddings as normalized centroid of block embeddings (pages with <2 blocks are skipped)
  • New pageEmbeddings IndexedDB store (DB version bumped to 2)
  • Page results merged with block results, sorted by similarity score
  • Page results display a "Page" badge and preview of first few blocks
  • Copy: [[page name]] for pages, ((block-id)) for blocks
  • Click: navigates to page / Shift+click: opens in sidebar
  • Journal checkbox filters both block and page results
  • Rebuild command clears both block and page embedding stores

Test plan

  • Rebuild index and verify page results appear alongside block results
  • Verify "Page" badge appears on page results
  • Click a page result — navigates to the page
  • Shift+click a page result — opens in sidebar
  • Ctrl+C on page result copies [[page name]]
  • Ctrl+C on block result still copies ((block-id))
  • Uncheck "Include journal" — journal pages and blocks are hidden
  • Verify rebuild index command clears and rebuilds both stores

🤖 Generated with Claude Code

@twaugh twaugh force-pushed the page-results branch 2 times, most recently from a92b6c4 to 976943f Compare March 16, 2026 10:14
@twaugh twaugh added the reindex This change requires a reindex label Mar 16, 2026
Compute page embeddings as the normalized centroid of all block
embeddings for each page (skipping pages with fewer than 2 blocks).
Page results are merged with block results by similarity score.

- New IndexedDB store for page embeddings (DB version 2)
- Page results show a "Page" badge and preview of first few blocks
- Copy button produces [[page name]] for pages, ((block-id)) for blocks
- Click navigates to page, shift+click opens in sidebar
- Journal checkbox filters both block and page results

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@twaugh
Copy link
Copy Markdown
Owner Author

twaugh commented Mar 17, 2026

Closed in favour of #32

@twaugh twaugh closed this Mar 17, 2026
@twaugh twaugh deleted the page-results branch March 17, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reindex This change requires a reindex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant