Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Open a GitHub PR in the pull request panel where a bot left a review summary longer than 1,000 characters, for example a pullfrog review.
- Add that review summary to the chat (the "[Review comment: #N; ...]" chip) and send it to an agent.
- Look at the
<t3_context kind="review-comment">block the agent receives.
Seen on TonybynMp4/yMusic#137, with pullfrog reviews:
- At cb1b925, the summary said "Two minor suggestions inline". The line comments had been posted as a separate review, 5937741853, and the agent had to find them itself.
- At db70dd2, the summary said "One misplaced doc comment inline", but review 5937777275 has no line comments at all. The bot never posted it. The agent searched
/pulls/137/comments, found nothing, and then found the problem by reading the diff.
Expected behavior
The agent gets the whole summary, plus the line comments that review posted, or a plain statement that it posted none.
Actual behavior
- The comment text is cut at 1,000 characters. The agent got text ending mid-sentence ("...`escape_s...", "A mutation holds the requested state while Rust ...") and had to call the GitHub API for the rest.
- A review summary arrives without the line comments that review posted. The agent can't tell whether line comments exist, so it goes looking.
Cause
buildPullRequestCommentContext in apps/web/src/components/pullRequest/pullRequestDetail.logic.ts runs the body through bounded(), which uses FINDING_BODY_MAX_LENGTH = 1_000. That limit was meant for the batch "Fix findings" prompt, which bundles up to 20 findings. It's the wrong limit for one comment you picked to discuss.
The function also never looks at reviewThreads, even though GitHub thread comments carry a reviewUrl that links them to their review.
Proposed fix
- Raise the limit to 8,000 characters for comments and threads added to the chat. Fix handoffs keep 1,000. Going higher doesn't help, because the composer clamps a review comment's text at 16,000 characters (
COMPOSER_CONTEXT_REVIEW_TEXT_MAX_CHARS), and the line comments need some of that room. - For a GitHub review summary (URL anchor
pullrequestreview-N), add the review URL and the line comments matched byreviewUrl. Each one lists the path, line, a resolved or outdated flag, and the body. List as many as fit in the room the summary leaves under the 16,000 limit, then a count of the rest. Without that budget, the clamp cuts the end of the list and the agent never learns anything was dropped. - If the review posted none, say so, and give a count of the author's unresolved threads from other reviews. That covers the cb1b925 case.
- If not every thread was loaded, or a thread still has replies on a page not fetched yet, say the list may be incomplete instead of claiming there are none.
GitLab and Azure DevOps don't link review summaries to their line comments, so for them only the longer limit applies. Mobile doesn't build these chat contexts. The commit SHA isn't included because comments don't carry it, and the review URL gets the agent to it in one call.
Impact
Minor bug or occasional failure
Version or commit
main @ 25da86c
Environment
Claude Code provider
Activity