fix(agent-manager): stabilize PR review comments - #13272
Merged
Merged
Conversation
marius-kilocode
force-pushed
the
fix-long-code-references-in-pr-comments
branch
from
August 20, 2026 11:22
1cf7c05 to
a9e9570
Compare
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Previous Review Summaries (2 snapshots, latest commit 58c6d68)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 58c6d68)Status: No Issues Found | Recommendation: Merge Files Reviewed (7 files)
Previous review (commit e56a7a9)Status: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (21 files)
Reviewed by grok-4.6 · Input: 304.6K · Output: 19.1K · Cached: 272.8K Review guidance: REVIEW.md from base branch |
marius-kilocode
force-pushed
the
fix-long-code-references-in-pr-comments
branch
from
August 20, 2026 12:23
e56a7a9 to
3f770e6
Compare
marius-kilocode
force-pushed
the
fix-long-code-references-in-pr-comments
branch
from
August 20, 2026 12:31
c7c19c0 to
58c6d68
Compare
chrarnoldus
approved these changes
Aug 21, 2026
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.
The Agent Manager PR review panel did not provide enough context for comments that refer to code below the commented line, and periodic PR refreshes could close open comments, reset scroll, or unmount the panel when GitHub returned a transient empty result.
This change keeps a compact GitHub-style hunk window, then appends verified lines from the active worktree when the hunk ends at the comment. It keeps the agent payload wider than the card while preserving valid unified-diff metadata. The panel now stores comment expansion, resolved-group, send, error, and scroll state per managed worktree, and stable thread IDs keep cards bound to their own threads through regrouping.
Transient empty PR lookups no longer replace a known PR on the same branch. Comment fetch failures retain the last visible comment list, while branch changes still clear stale PR state. Regression coverage covers real file context reads, mtime invalidation, hunk parsing, remount state retention, regrouping, polling, and the bridge cache behavior.
Before/after
The before comparison supplied for this work showed the old panel rendering the whole hunk, showing collapsed unmodified-line rows, and omitting the code the comment referred to. The after image is the reproducible Agent Manager PR comment Storybook state from this branch: the card uses a compact diff window, continues with trailing context, and keeps the comment actions visible.