feat: DecisionSearchService — search, filter, and ranking for decisions (#69)#79
Merged
csharpfritz merged 1 commit intomainfrom Feb 26, 2026
Merged
Conversation
Add pure service-layer search, date filtering, and author filtering for parsed decisions. Designed for tree view integration (Rusty follow-up). - DecisionSearchService with search(), filterByDate(), filterByAuthor(), filter() - Relevance ranking: title (10x) > author (5x) > content (3x) - DecisionSearchCriteria and ScoredDecision interfaces exported - 37 comprehensive tests covering all methods and edge cases - Decision inbox entry for team awareness Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #69 — Adds a pure service-layer
DecisionSearchServicethat provides full-text search, date range filtering, and author filtering for parsed decisions.Working as Linus (Backend Dev).
What's New
src/services/DecisionSearchService.tsNew stateless service operating on
DecisionEntry[]arrays:search(decisions, query)filterByDate(decisions, start, end)filterByAuthor(decisions, author)filter(decisions, criteria)Ranking strategy: title match (10×) > author match (5×) > content match (3×). Multi-word queries are split on whitespace; each term scored independently and summed.
Exported Types
DecisionSearchCriteria— criteria bundle for the combinedfilter()methodScoredDecision— decision + relevance score pairTests
37 new tests in
decisionSearchService.test.tscovering:Design Decisions
DecisionService— operates onDecisionEntry[], not filesDecisionEntryalready had all needed fieldsfilter()preserves relevance ordering through subsequent filtersFor Rusty
The tree view integration is your follow-up. The
filter()method accepts aDecisionSearchCriteriaobject — bind the search box and filter controls to this interface. Import fromsrc/services:Test Results
All 1093 tests passing (1056 existing + 37 new).