Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
19 changes: 19 additions & 0 deletions notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Mi mensaje de commit (versión rápida)

fix search

# Mensaje de Claude

```
Fix search to match notes containing the term

matches() compared note.text with === term, so `notes search milk`
only found a note whose entire text was "milk" and missed notes like
"buy milk". Use String.includes so search returns every note that
contains the term, as the README documents. The two failing search
tests in tests/notes.test.js now pass.
```

# Comparación

El mío dice solo el *qué* ("fix search") y no aclara qué estaba roto. El de Claude explica el *por qué*: la causa (`===` en lugar de `includes`), un ejemplo concreto (`milk` vs `buy milk`), la referencia al comportamiento documentado en el README y el efecto en los tests. Es más largo, pero alguien que lea el historial entiende el cambio sin abrir el diff.
Loading