fix(jetbrains): open the worktree row popup only for pull requests - #13676
Merged
Conversation
The Agent Manager row popup is the pull request view, so a row without one opened a balloon with no title, no state pill and no verdict lines: just a restatement of the counts already painted on the row, plus a base-branch behind-count that means nothing for a local scratch worktree. The pointer crossing the list trailed one of those for every row it passed. request() now returns null unless the row has a PR, and WorktreeRowPopupBody.update takes a non-null one so the compiler, not a runtime branch, is what rules the empty popup out.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Reviewed by grok-4.6 · Input: 209.9K · Output: 6.4K · Cached: 343.7K Review guidance: REVIEW.md from base branch |
kirillk
enabled auto-merge
September 1, 2026 13:52
marius-kilocode
approved these changes
Sep 1, 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.
Issue
Fixes #
Context
Hovering any worktree row in the JetBrains Agent Manager opened the detail balloon. For a row with no
pull request there is no PR chrome to show — the title line is hidden, the state pill is gone, the
review and CI lines are hidden — so the popup degraded to a bare restatement of the
N files +A -Dsummary already painted on the row, plus an ahead/behind count against the base branch that is noise
for a local scratch worktree. Passing the pointer down a list of local worktrees trailed one of those
for every row.
The popup is the pull request view, so a pull request is now the bar for opening it.
Implementation
AgentManagerPanel.request()previously opened on any signal — a PR, uncommitted files, or committedfiles/ahead/behind — and its KDoc argued explicitly that a PR was not the bar. That decision is
reversed: the gate is now
val pull = row.pr ?: return null, and the comment states the new rule.WorktreeRowPopupBody.updatetakes a non-nullWorktreePrDtorather than falling back toGhReview.NONE/GhChecksDto(), so the compiler is what rules out a popup without a PR instead of aruntime branch that could drift back.
statsanddirtystay nullable — a PR whose stats have notpolled yet still opens.
Nothing else moves: the row's
#numberpill, review/CI glyphs and changes summary are untouched, asis the dwell. A PR-less row still starts the dwell and simply resolves to no request when it elapses.
One consequence worth a reviewer's attention:
prsis empty wheneverghis missing,unauthenticated, or rate-limited, so in those states no row gets a popup even when it does have a PR
upstream. That follows from making PR presence the gate.
Screenshots / Video
Before
After
How to Test
Manual/local verification
./gradlew typecheckfrompackages/kilo-jetbrains/— passes, and proves no other caller passes a nullpullto the popup body (agent-executed)./gradlew testfrompackages/kilo-jetbrains/— full frontend + backend suite passes (agent-executed)./gradlew :frontend:test --tests '*WorktreeRowPopupBodyTest*'— 9 cases pass, including the replaced one (agent-executed)Reviewer test steps
#numberpill — the detail popup still opens beside it with title, state, verdicts and both change counts#numberpill but with local changes — no popup appears, and the row's ownN files +A -Dsummary and its changes-cell tooltip still workBlocked checks and substitute verification
AgentManagerPanel.placeneeds a root pane and a laid-out list, and underBasePlatformTestCasethe panel is never in a window, soplacereturns null and no balloon opens for any row — which is why the original feature commit (aebd040a80) shipped with no panel test either. Substitute verification is the compile-time non-null contract plusWorktreeRowPopupBodyTest, where the case asserting the old PR-less behaviour was replaced with a PR row carryingahead/behindand uncommitted counts so the changes-breakout coverage it provided survives.Checklist
Get in Touch