Skip to content

Fix search matching to use substring match instead of exact equality#15

Open
pppmppp wants to merge 1 commit into
mate-academy:mainfrom
pppmppp:fix/search-substring-match
Open

Fix search matching to use substring match instead of exact equality#15
pppmppp wants to merge 1 commit into
mate-academy:mainfrom
pppmppp:fix/search-substring-match

Conversation

@pppmppp

@pppmppp pppmppp commented Jun 23, 2026

Copy link
Copy Markdown

Summary

  • matches() in lib/store.js was using strict equality (===) to compare note text against the search term, so it only returned results when the term was an exact match of the full note text
  • Changed to .includes() so search returns any note whose text contains the term as a substring
  • All three search tests now pass

Test plan

  • npm test — all 3 tests pass green

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.

1 participant