Skip to content

Add edit command to notes CLI - #239

Closed
KillaShy wants to merge 8 commits into
mate-academy:mainfrom
KillaShy:review-me
Closed

KillaShy wants to merge 8 commits into
mate-academy:mainfrom
KillaShy:review-me

Conversation

@KillaShy

@KillaShy KillaShy commented Sep 23, 2026

Copy link
Copy Markdown

Did Claude catch the planted bug?

Yes, Claude caught the planted bug: edit() in lib/store.js (lines 48-52) never checks that the note exists, so editing a missing id crashes with a TypeError. It also flagged smaller issues (no id validation, empty text wipes a note, no tests for edit).

Summary

  • Add store.edit(id, text) to lib/store.js
  • Add an edit <id> <text> command to notes.js and list it in the usage help

Test plan

  • CI passes (npm test)
  • node notes.js add hello then node notes.js edit 1 world updates the note

🤖 Generated with Claude Code

karynad-stack and others added 7 commits June 9, 2026 14:37
Resolve add/add conflict in lib/store.js by keeping review-me's version (main's code plus edit()).

Co-Authored-By: Claude Opus 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 code correctly implements all required features: the edit command works with both store.edit() in lib/store.js and the handler in notes.js. The planted bug in lib/store.js lines 48-52 (missing existence check before editing) is present as designed and should not be modified. However, you're missing the required student note indicating whether Claude caught the planted bug. This is the sole remaining approval criterion. Please add a comment or note (either in the PR description, a comment file, or code comment) stating whether Claude identified the planted bug in the edit function.


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

@KillaShy

Copy link
Copy Markdown
Author

Yes, Claude caught the planted bug: edit() in lib/store.js (lines 48-52) never checks that the note exists, so editing a missing id crashes with a TypeError. It also flagged smaller issues (no id validation, empty text wipes a note, no tests for edit).

Co-Authored-By: Claude Opus 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

I am requesting changes because a critical procedural requirement cannot be verified from the code alone: the PR must include a visible note in the PR description or a PR comment stating whether Claude caught the planted bug. While your CLI features and storage logic are implemented correctly and the intentional bug in lib/store.js edit() (lines 48-52) is present as required, this explicit note is part of the task’s core checklist and approval criteria.

  • Critical blocker: Add a one-line note in the PR description or as a PR comment confirming whether Claude caught the planted bug (e.g., “Did Claude catch the planted bug? Yes/No, and why”). This is required to complete the task.
  • Non-blocking feedback: notes.js may report “Updated note #id” even if store.edit would fail for a missing id; consider catching errors to provide accurate user feedback.

Once the PR note is added, everything else appears in order and I can approve promptly. Nice job implementing the CLI commands and wiring notes.js with lib/store.js as specified.


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

@KillaShy KillaShy closed this Sep 23, 2026
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.

3 participants