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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Goal: open the `review-me` pull request, have Claude review it, and judge whethe
3. **Have Claude review it.** Ask: *"Review this PR — look for bugs, edge cases, and anything risky."*
4. **Judge the review.** One bug was planted on purpose. Did Claude catch it? Note what it flagged and whether it found the real problem.
5. **Comment.** Add a one-line comment on the PR saying whether Claude caught the bug.
6. **Open** the pull request against the main repository, not your fork.
6. **Submit** the pull request link.
9 changes: 8 additions & 1 deletion lib/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@ function search(term) {
return matches(load().notes, term);
}

module.exports = { all, add, remove, search, matches };
function edit(id, text) {
const data = load();
const note = data.notes.find((n) => n.id === id);
note.text = text;
save(data);
}

module.exports = { all, add, remove, search, matches, edit };
9 changes: 8 additions & 1 deletion notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,21 @@ function main() {
}
break;
}
case "edit": {
const id = Number(rest[0]);
const text = rest.slice(1).join(" ").trim();
store.edit(id, text);
console.log(`Updated note #${id}`);
break;
}
case "delete": {
const id = Number(rest[0]);
const ok = store.remove(id);
console.log(ok ? `Deleted note #${id}` : `No note #${id} found`);
break;
}
default:
console.log("Commands: add <text> | list | search <term> | delete <id>");
console.log("Commands: add <text> | list | search <term> | edit <id> <text> | delete <id>");
console.log(`(Session locks after ${config.SESSION_TIMEOUT_MINUTES} minutes of inactivity.)`);
}
}
Expand Down