Skip to content

refactor: remove tree dependency from TagsService and PropertiesService#1022

Merged
perber merged 1 commit into
mainfrom
refactor/decouple-tags-properties-from-tree
May 22, 2026
Merged

refactor: remove tree dependency from TagsService and PropertiesService#1022
perber merged 1 commit into
mainfrom
refactor/decouple-tags-properties-from-tree

Conversation

@perber
Copy link
Copy Markdown
Owner

@perber perber commented May 22, 2026

Both services only used tree for their IndexAllPages bootstrap — no runtime dependency. IndexAllPages is removed from both services; wiki.go now runs a single parallel GetPages pass at startup that feeds both indexes instead of two sequential ReadPageRaw loops

Copilot AI review requested due to automatic review settings May 22, 2026 18:48
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

This PR refactors tag and property indexing so that TagsService and PropertiesService no longer depend on TreeService for a one-time startup bootstrap. Instead, Wiki performs a single startup walk and batched page load, then feeds raw content into both indexes.

Changes:

  • Remove TreeService dependency and IndexAllPages bootstrapping from internal/tags.TagsService and internal/properties.PropertiesService.
  • Add Wiki.bootstrapTagsAndProperties() to bootstrap both indexes from a single WalkNodes + parallel GetPages pass.
  • Update tests and pagesave side-effect tests to construct services without a tree dependency.

Reviewed changes

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

Show a summary per file
File Description
internal/wiki/wiki.go Centralizes tags/properties startup bootstrap into one tree walk + GetPages pass.
internal/wiki/tags/use_cases_test.go Updates tags use-case test setup for new NewTagsService signature.
internal/wiki/pagesave/tags_effect_test.go Updates tags side-effect test to use new service constructor.
internal/wiki/pagesave/properties_effect_test.go Updates properties side-effect test to use new service constructor.
internal/tags/tags_service.go Removes tree dependency and deletes IndexAllPages; service is now store-only.
internal/tags/tags_service_test.go Reworks tests to bootstrap via helper using TreeService externally.
internal/properties/properties_service.go Removes tree dependency; introduces IndexPageContent.
internal/properties/properties_service_test.go Updates bootstrap approach and adds IndexPageContent coverage.

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

Comment thread internal/wiki/wiki.go Outdated
Comment thread internal/properties/properties_service_test.go Outdated
@perber perber force-pushed the refactor/decouple-tags-properties-from-tree branch from 55d433b to 401c6d5 Compare May 22, 2026 18:56
Both services only used tree for their IndexAllPages bootstrap —
no runtime dependency. IndexAllPages is removed from both services;
wiki.go now runs a single parallel GetPages pass at startup that
feeds both indexes instead of two sequential ReadPageRaw loops
@perber perber force-pushed the refactor/decouple-tags-properties-from-tree branch from 401c6d5 to e934081 Compare May 22, 2026 19:04
@perber perber merged commit 78d9548 into main May 22, 2026
6 checks passed
@perber perber deleted the refactor/decouple-tags-properties-from-tree branch May 22, 2026 20:09
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