feat(server): add forgejo_create_pr_thread_comment for inline review thread replies #4
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!4
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/t-69"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
forgejo_create_pr_thread_comment { number, comment_id, body }, a mutating Forgejo tool that posts a reply into an existing inline review comment thread. It takes the inline comment id thatforgejo_list_pr_comments_and_reviewsshows (inline comment 15969 on CHANGELOG.md:60 · review 36), finds that comment across the PR's reviews, and posts throughPOST /pulls/{n}/reviews/{review_id}/comments. The reply reuses the original comment's path, side, line andextra_lines_count, which is what Forgejo uses to group it into the same thread. This is the only Forgejo API that posts into an existing thread. The web UI's Reply button takes the same server path.The fetch of each review's inline comments is now a shared helper,
fetchInlineComments, used by both the list tool and the new tool. The new tool scans every review that has inline comments, with no 100-review cap. The system-context block and the descriptions offorgejo_post_review,forgejo_create_pr_comment,forgejo_create_issue_commentandforgejo_list_pr_comments_and_reviewsnow point agents to the new tool for thread replies. The web tool card, its collapsed summary (PR #3 · comment 15969) and the approval dialog show the new tool's arguments. Approval-by-default and Idea-mode blocking come automatically from themutatingflag.Decisions
index.test.tshad two more hard-coded tool counts the plan didn't list (the "all 17 tools" test name and the config-change test'stoBe(17)). Both are updated to 18.docs/configuration.mdis updated the same way.prs.tsandindex.tsheader comments already had the wrong tool counts (8 and 16). They are corrected to 10 and 18.Verification
bun test apps/server/src/forgejo apps/server/src/bridge/permission-filter.test.ts: 156 pass, 0 fail. This includes the newbuildThreadReplyPayloadtests (new side, old side, line-range copy and omission, missing line, missing path) and the updated inventory and permission lists.bun run typecheck(protocol, server, web): exit 0.Bun.serve) with the realForgejoClient:posted reply 16000 in the thread of inline comment 15969 (CHANGELOG.md:60) on PR #3./pulls/3/reviews/36/commentswith body{"body":"ack","path":"CHANGELOG.md","new_position":60}.comment_id: 99returnederror: inline comment 99 not found on PR #3. …and made no POST.forgejo_list_pr_comments_and_reviewsoutput is unchanged (inline comment 15969 on CHANGELOG.md:60 · review 36).Posts a reply into an existing inline review comment thread via POST /pulls/{n}/reviews/{review}/comments, addressed by the inline comment id that forgejo_list_pr_comments_and_reviews shows. The tool locates the comment across the PR's reviews and copies its path, side, line and line range so Forgejo groups the reply into the same thread. The system context and the post_review, create_pr_comment, create_issue_comment and list_pr_comments_and_reviews descriptions point agents at the new tool for thread replies. Web tool card and approval dialog render the new tool's arguments. Co-Authored-By: Claude Opus 5.5 via omp-deck