Add permalink anchors to comments and GET comment-by-ID API

- Comment dates are now clickable anchor links (#comment-{id})
- Pages scroll to and highlight the target comment when URL has a hash
- Added GET /api/issues/:id/comments/:commentId endpoint
- Updated skill docs with new endpoint and comment URL format

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dotta
2026-03-05 11:02:22 -06:00
parent 732ae4e46c
commit 85f95c4542
5 changed files with 63 additions and 5 deletions

View File

@@ -779,6 +779,13 @@ export function issueService(db: Db) {
.where(eq(issueComments.issueId, issueId))
.orderBy(desc(issueComments.createdAt)),
getComment: (commentId: string) =>
db
.select()
.from(issueComments)
.where(eq(issueComments.id, commentId))
.then((rows) => rows[0] ?? null),
addComment: async (issueId: string, body: string, actor: { agentId?: string; userId?: string }) => {
const issue = await db
.select({ companyId: issues.companyId })