Context#
Issue comments are a core part of any issue tracker workflow — used for follow-up questions, status updates, linking related work, and closing the loop. During dogfooding of the CLI (issue #3), there was no way to add a comment to an existing issue (e.g. to note "completed" after finishing a task). This was a noticeable gap.
The sh.tangled.repo.issue.comment lexicon already exists and is straightforward:
{
"$type": "sh.tangled.repo.issue.comment",
"issue": "at://<did>/sh.tangled.repo.issue/<rkey>",
"body": "...",
"createdAt": "<ISO datetime>"
}
The optional replyTo field (an AT-URI) allows threading replies to specific comments.
Tasks#
- Implement
tangled issue comment <issue-number> [--body <body> | --body-file <file> | -F -]command.- Resolve the issue number to its AT-URI using the same lookup as
tangled issue view. - Create a
sh.tangled.repo.issue.commentrecord usingcom.atproto.repo.createRecordwith fields:issue(AT-URI),body, andcreatedAt. - Support all standard body input methods:
--body "text",--body-file <path>,-F -(stdin). - Support
--jsonoutput for machine-readable confirmation.
- Resolve the issue number to its AT-URI using the same lookup as
- Display comments in
tangled issue view <n>output, below the issue body.- Fetch comments using
com.atproto.repo.listRecordswithcollection: "sh.tangled.repo.issue.comment"filtered by the issue's AT-URI. - Show commenter handle (using
resolveHandle()from issue #9), timestamp, and body for each comment.
- Fetch comments using
- Add tests for both the
issue commentcommand and the updatedissue viewcomment display.
Notes#
Follow the same body input patterns as tangled issue create — these are already well-tested and provide a consistent UX. The replyTo field (for comment threading) can be deferred to a follow-up issue.