Skip to content

refactor: search indexing via pagesave hook#1019

Merged
perber merged 1 commit into
mainfrom
refactor/search-indexing-via-pagesave
May 22, 2026
Merged

refactor: search indexing via pagesave hook#1019
perber merged 1 commit into
mainfrom
refactor/search-indexing-via-pagesave

Conversation

@perber
Copy link
Copy Markdown
Owner

@perber perber commented May 22, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 22, 2026 16:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors search indexing to be driven by the pagesave side-effect hook, using a startup bootstrap to rebuild the index from the tree state and removing the filesystem-based indexer/watcher components.

Changes:

  • Replace search bootstrap + fsnotify watcher in Wiki.initSearch() with pagesave.SearchIndexSideEffect.IndexAllPages().
  • Add IndexAllPages() to SearchIndexSideEffect and introduce unit tests for bootstrap behavior.
  • Delete the legacy search indexer/bootstrap/watcher implementation and its tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/wiki/wiki.go Switches search bootstrap to SearchIndexSideEffect.IndexAllPages() and removes watcher shutdown logic.
internal/wiki/wiki_path_test.go Removes tests for searchRootDir after deleting that helper.
internal/wiki/pagesave/search_effect.go Adds IndexAllPages() to rebuild the search index from the tree.
internal/wiki/pagesave/search_effect_test.go Adds tests for IndexAllPages() indexing and clearing stale entries.
internal/search/watcher.go Removes filesystem watcher implementation.
internal/search/indexer.go Removes worker-based filesystem indexer.
internal/search/indexer_test.go Removes indexer tests.
internal/search/bootstrap.go Removes BuildAndRunIndexer bootstrap logic.
internal/search/bootstrap_test.go Removes bootstrap tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/wiki/wiki.go
Comment thread internal/wiki/pagesave/search_effect.go
@perber perber force-pushed the refactor/search-indexing-via-pagesave branch from ec7ebc1 to 539c960 Compare May 22, 2026 17:00
@perber perber merged commit 79d5789 into main May 22, 2026
6 checks passed
@perber perber deleted the refactor/search-indexing-via-pagesave branch May 22, 2026 17:08
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.

2 participants