From f63dce6072396569e0acf11877d141df2944c71c Mon Sep 17 00:00:00 2001 From: Sagaj-learn Date: Wed, 24 Jun 2026 11:39:17 +1000 Subject: [PATCH 1/2] Add notes.md Co-Authored-By: Claude Opus 4.8 --- notes.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 notes.md diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..0ee5c68 --- /dev/null +++ b/notes.md @@ -0,0 +1,26 @@ +Changes will be found to variables and accidental characters added to one file + +> Summarize what I've changed, and flag anything that looks unintended. + + Read 1 file, ran 3 shell commands + +Here's a summary of your uncommitted changes (working tree is ahead of the last commit; nothing is staged or pushed): + +Changes + +notes.js (modified) +- Line 12: usage string changed from "Usage: notes add " → "Usage: notes please add " +- Line 55: appended a line asdftrterw after the main(); call + +package.json (modified) +- name: "notes-cli" → "notes-cli-1" +- version: "1.0.0" → "1.0.1" + +notes.md (new, untracked) +- A two-line note: "Changes will be found to variables and accidental characters added to one file" + +🚩 Flags — likely unintended +1. notes.js:55 — asdftrterw is junk. It's a stray top-level statement after main(); that does nothing but will throw a ReferenceError: asdftrterw is not defined athis is almost certainly an accidentalkeystroke. Recommend removing. 2. notes.js:12 — "Usage: notes please add" —usage hint looks accidental/incorrect; thesubcommand is add, so the message no longer matches how the command is actually invoked. Probably should revert to notes add . +3. package.json name notes-cli-1 — the -1 suffix looks like a slip rather than a deliberate rename. The version bump to 1.0.1 may be intentional, but worth confie accidental name change. + +Your own notes.md even says "accidental charhat matches items #1 (and arguably #2). \ No newline at end of file From 248476bee645179c1ee81bd812d736dd8ab14715 Mon Sep 17 00:00:00 2001 From: Sagaj-learn Date: Wed, 24 Jun 2026 14:32:34 +1000 Subject: [PATCH 2/2] Fix matches() to use substring search Search compared note text with strict equality, so partial-term queries returned nothing. Use String.includes to match the documented behavior and the test expectations. Co-Authored-By: Claude Opus 4.8 --- lib/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/store.js b/lib/store.js index 1d9215f..7ceefa0 100644 --- a/lib/store.js +++ b/lib/store.js @@ -38,7 +38,7 @@ function remove(id) { // Returns the notes that match `term`. function matches(notes, term) { - return notes.filter((note) => note.text === term); + return notes.filter((note) => note.text.includes(term)); } function search(term) {