feat(jetbrains): open sub-agent sessions in editor tabs - #13255
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (21 files)
Previous Review Summaries (7 snapshots, latest commit 009dd19)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 009dd19)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous review (commit aac2898)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Previous review (commit 61f3892)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (2 files)
Fix these issues in Kilo Cloud Previous review (commit ba87c72)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (1 files)
Fix these issues in Kilo Cloud Previous review (commit 1f669a7)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (1 files)
Fix these issues in Kilo Cloud Previous review (commit b65d11a)Status: No Issues Found | Recommendation: Merge Files Reviewed (8 files)
Previous review (commit cbd4b1c)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (19 files)
Reviewed by grok-4.6 · Input: 226.3K · Output: 15K · Cached: 697.2K Review guidance: REVIEW.md from base branch |
Call ensureSubagentSessionEditorKind() before opening the sub-agent VFS file so the first click reliably creates the virtual file, matching the diff and attachment open sites. Also cap SubagentTitleCache with an access-order LRU so high-churn child session ids do not accumulate for the IDE lifetime.
The sub-agent open control used a persistent header HoverIcon that never reliably opened the editor tab. Switch it to the same hover-overlay open-in-editor affordance the edit/patch and modified-files cards already use (SessionCopyTarget + open-diff icon), and extract that button+anchor wiring into a shared HeaderOpenAction so the three cards no longer duplicate it.
Append the open action to the flexible header slot so it sits right after the task summary like the edit/patch card, instead of pinned to the far-right header group.
Collapsed task cards now show the same hover popup as the edit/patch and changes cards. Instead of rebuilding a static snapshot, the popup reparents the live TaskBodyScroll the in-place expanded card uses, so streaming child tools keep updating inside the popup. The popup's disposable detaches the shared body on hide (unless the card reclaimed it by expanding) without disposing it, so it stays reusable across expand/collapse.
Streaming child tools no longer pack the whole IDE window. The task popup is now a fixed, bounded box: a 60-char floor width, the shared height cap, and both scrollbars, so live child updates scroll inside the balloon instead of resizing it. HeaderPopupBody gains opt-in minWidth/fixedHeight/horizontal params; snapshot popups keep their content-sized behavior.
The open-action anchor lived in the header fill slot, a fitHorizontal stack that clips trailing children to zero width. A long summary could starve the anchor so the hover open control failed to appear. Move the summary and anchor into the non-fit left group like the edit/patch cards, so the anchor always reserves its width right after the text.
# Conflicts: # packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.kt # packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/ModifiedFilesView.kt # packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/tool/TaskToolView.kt # packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiLayoutTest.kt
…anslations Route ChangesCardView.Header's open-in-diff button through the shared HeaderOpenAction, matching the edit/patch and task cards, so the toolbarButton + hoverPlaceholder wiring lives in one place. Add the new sub-agent bundle keys (openSubagent, subagent.title, subagent.path) to all locale files.
Issue
No linked issue; implementation requested from the JetBrains sub-agent session editor parity plan.
Context
JetBrains task tool cards currently show child sessions only inline. VS Code can open sub-agent sessions in a separate read-only viewer, which makes child agent output easier to inspect and follow while preserving parent-session controls.
Implementation
Adds a JetBrains VFS-backed sub-agent session editor kind keyed by
{sessionId, directory}so repeated opens dedupe to the same editor tab. The new host reusesSessionUiwith areadonlySessionManagercapability, hiding the composer and session-mutating controls while still streaming the child session transcript.The task tool view now exposes a retained hover action when
childSessionIdis present, and the open callback is threaded through the existing transcript view stack so nested sub-agent task cards work inside read-only child viewers too. A small app-level title cache supplies stable editor tab labels without putting titles into the VFS identity.Screenshots / Video
How to Test
Manual/local verification
./gradlew typecheckfrompackages/kilo-jetbrains/../gradlew testfrompackages/kilo-jetbrains/.Reviewer test steps
tasktool.Open sub-agent in editor.Blocked checks and substitute verification
Checklist
Get in Touch
N/A