Skip to content

Fix search to match notes containing the term - #333

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

Dcb7305 wants to merge 1 commit into
mate-academy:mainfrom
Dcb7305:fix/search-partial-match

Conversation

@Dcb7305

@Dcb7305 Dcb7305 commented Oct 28, 2026

Copy link
Copy Markdown

matches() used strict equality, so only notes whose text exactly equaled the term were returned. Use includes() for substring matching.

All 3 tests pass (npm test).

matches() used strict equality, so only notes whose text exactly
equaled the term were returned. Use includes() for substring matching.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Your solution correctly fixes the search bug in the notes tool. The matches function in lib/store.js now uses .includes() for substring matching, which properly finds notes containing a search term rather than requiring an exact match. All three tests pass, and all core functional requirements are met: add, all (list), search, and remove functions are implemented correctly. The implementation is minimal and focused—one line change that addresses the core issue. Great work on fixing this bug!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example ↩

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