Repository navigation
Comments: edit and delete your own, on the web and over MCP - #59
Merged
Merged
Conversation
- core: GET/PUT/DELETE /me/posts/{id}, scoped by author in the repository's
own SQL (a comment somebody else wrote is a 404). An edit moves
edited_at, so every view says "edited"; it is refused in a locked or
removed thread. A delete keeps the row as removed (replies still read)
and overwrites the words.
- overlay: `myPosts`, the subset of the page's comment ids the visitor
wrote, bounded like `postVotes`.
- web: OwnComment draws Edit and Delete after paint on your own comments
only (product Talk, thread pages, product post threads), through a
JSON-only /me/own-comment route that reads the session server-side.
- MCP: edit_my_comment (read back or rewrite) and delete_my_comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vijayakrishnans
force-pushed
the
fix/own-comments
branch
from
December 1, 2026 13:50
11eda3b to
432a6a6
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured in CI: the tabs 182,996 B, Talk 187,204, the post's page 188,821. Each limit moves to the measurement plus ~100 B. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nobody could edit or delete their own comments. This adds both.
Core —
GET/PUT/DELETE /me/posts/{id}(under/me, so the gateway forwards it with no new route). Each repository statement hasauthor_subject_id = $1in its WHERE, so somebody else's comment is a 404, never a 403. An edit movesedited_at(the page already says "edited"), and is refused in a locked or removed thread. A delete keeps the row asremoved, so replies under it still read, and overwrites the body.Overlay — new
myPosts: the subset of the post ids the page asked about that the visitor wrote. Bounded exactly likepostVotes; the public post still never carries an author id, and anonymous and signed-in documents stay byte-identical.Web —
OwnCommentdraws Edit and Delete after paint on your own comments in all three comment views (product Talk,/threads/{id}, product post threads). Edit reads the comment back as typed; Delete asks first. Calls go through a JSON-only/me/own-commentroute that reads the session server-side.MCP —
edit_my_comment(no body: read back; body: rewrite) anddelete_my_comment(destructive hint). Parity catalogue updated.Tests — real-Postgres tests for the four statements (yours vs someone else's, locked thread, delete keeps the row and drops the words); the thread-privacy scan classifies them; core handler tests; overlay shape tests; a web test for the control and route.
🤖 Generated with Claude Code