Skip to content

fix(jetbrains): polish transcript and settings interactions - #11932

Merged
kirillk merged 22 commits into
mainfrom
massive-fontina
Jul 6, 2026
Merged

fix(jetbrains): polish transcript and settings interactions#11932
kirillk merged 22 commits into
mainfrom
massive-fontina

Conversation

@kirillk

@kirillk kirillk commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What

This PR improves JetBrains session transcript rendering and fixes several interaction and spacing issues found while hardening the markdown and subagent UI.

Features

  • Show subagent tool activity inline in JetBrains session transcripts.
  • Render subagent activity as collapsible task rows with nested tool status, row counts, nested scrolling, and retained collapsed state across updates.
  • Show a focus outline around the JetBrains prompt input, aligned over the prompt separator and rounded along the bottom corners in Islands UI.

Bug Fixes

  • Scroll wide markdown tables horizontally instead of cropping or stretching transcript content.
  • Keep collapsed subagent task views collapsed as new child tool updates arrive.
  • Stabilize subagent task body indentation when icon or glyph sizing is unavailable during headless rendering.
  • Fix prompt submission when sending messages that include file or git-change mentions.
  • Make Connect, OAuth, Disconnect, and Enable buttons fully clickable in provider, agent, and MCP settings lists.
  • Fix reasoning effort and model picker interactions so popups open in the expected position and expanded model details remain one-click selectable.
  • Use the standard transcript font for prompt text and custom question responses.
  • Render compaction markers without prompt chrome.
  • Increase todo checklist inner padding.
  • Balance shell command tooltip padding when a horizontal scrollbar is present.

Internal Cleanup

  • Extract markdown projection into MdProjector to simplify hybrid markdown rendering.
  • Expand coverage for markdown rendering, subagent task views, prompt lifecycle, settings list hit-testing, and session UI updates.

Verification

  • ./gradlew :frontend:test --tests "ai.kilocode.client.session.views.TaskToolViewTest.test task body is indented beyond header padding"
  • ./gradlew test
  • ./gradlew typecheck
  • bun run typecheck from packages/kilo-jetbrains/
  • Push hook: bun turbo typecheck --filter=!@kilocode/kilo-jetbrains
  • Push hook: bun turbo typecheck --filter=@kilocode/kilo-jetbrains
  • Fresh PR CI passes for the latest pushed commit.

kirillk added 4 commits July 3, 2026 20:11
Render markdown tables in their own horizontal scroll block, mirroring
the code-block pattern, so a wide table shrinks to the panel width and
scrolls horizontally instead of stretching the message and cropping
content. Derive the pane height from the rendered view's preferred size
so the table is not clipped vertically.
@kirillk kirillk changed the title fix(jetbrains): scroll wide markdown tables fix(jetbrains): improve markdown and subagent rendering Jul 4, 2026
kirillk added 9 commits July 3, 2026 22:22
Hit-testing for inline action cells (Connect/OAuth/Disconnect/Enable)
re-derived cell rectangles by hand, ignoring the horizontal insets the
platform SelectablePanel adds in the New UI. The click target was offset
from the drawn button, so only a small strip responded to clicks.

Read the rectangles back from the actual rendered component tree instead,
giving one source of geometry shared by the provider, agent, and MCP
settings lists.
@kirillk kirillk changed the title fix(jetbrains): improve markdown and subagent rendering fix(jetbrains): polish transcript and settings interactions Jul 5, 2026
@kirillk
kirillk marked this pull request as ready for review July 5, 2026 14:14
@kilo-code-bot

kilo-code-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Incremental review of 5a60c9c0fb..04600b63c2 (1 commit, 1 file changed: deletion of an internal planning doc .kilo/plans/1783185747000-jetbrains-subagent-review-fixes.md, 165 lines removed). This file is not product source or test code, so it introduces no reviewable behavior change.

Reconciled all previously open findings against current HEAD:

  • The 8 findings on SessionModel.kt, SettingsListModel.kt, PromptPanel.kt, SessionEditorStyle.kt, and ShellToolView.kt/ShellToolViewTest.kt were fixed in commit 6138b102fb, which is already an ancestor of the current HEAD (author replies confirm this).
  • The PromptPanel.kt:310 focus-outline test-coverage suggestion was resolved in 5a60c9c0fb (already reflected in the previous review).
  • The two remaining findings without an explicit "addressed" reply — the undocumented double invokeLater nesting (SessionEditorTextField.kt) and the toolbar-removal test not proving prior presence (PromptPanelTest.kt:150) — were verified directly against current source: commit bf41013402 (an ancestor of both the previous review baseline and current HEAD) already removed the double-invokeLater nesting entirely (replaced with UiNotifyConnector.doWhenFirstShown) and added a toolbarControl()/assertTrue(hasFloatingToolbar(...)) check that proves the toolbar exists before removal. Both findings are moot against current code.

No new issues found in the incremental diff.

Files Reviewed (1 file, incremental)
  • .kilo/plans/1783185747000-jetbrains-subagent-review-fixes.md (deleted, non-source planning doc)

Assumptions: All 20 previously tracked inline comments were re-verified against current HEAD (04600b63c2) rather than carried forward blindly; none remain open. Gradle tests were not re-run in this sandbox; verification relied on reading the actual diffs of the commits that resolved each finding.

Previous Review Summaries (6 snapshots, latest commit 5a60c9c)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 5a60c9c)

Status: No Issues Found | Recommendation: Merge

Incremental review of 819cef526d..5a60c9c0fb (1 test file changed, 41 lines added). The single new commit adds PromptPanelTest.kt coverage for the focus-outline painting introduced earlier in PromptPanel.kt — rendering the panel into a BufferedImage and asserting the outline color is absent without editor focus and present in the theme focus color once the editor content component owns focus (via a swapped-in TestFocusManager). This directly resolves the previously open SUGGESTION on PromptPanel.kt:310 about missing test coverage for that painting logic. The test setup, assertions, and cleanup (restoring the original KeyboardFocusManager in a finally block) are correct and follow the existing BufferedImage/createGraphics paint-assertion pattern used elsewhere in the suite.

Files Reviewed (1 file, incremental)
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/PromptPanelTest.kt

Assumptions: No prior findings from earlier commits are re-raised — the SUGGESTION on PromptPanel.kt:310 is resolved by this commit and left out per the incremental protocol (resolved findings aren't restated; history is preserved by the platform). The unrelated open SUGGESTION on PromptPanelTest.kt:150 (floating-toolbar removal test) sits on unchanged context lines in this diff and is left untouched, consistent with incremental-review scope. Gradle test execution was not run in this sandbox; reviewed statically by diffing the new test against the paintChildren/editorFocused implementation it exercises.

Previous review (commit 819cef5)

Status: 1 Issue Found | Recommendation: Address before merge

Incremental review of bf41013402..819cef526d (1 source file changed, ~50 lines). The two new commits in this range (dd0a6323fb, 819cef526d) add a themed focus outline around the JetBrains prompt panel, replacing an earlier flat top-highlight with a rounded-corner border drawn in paintChildren. The drawing logic (radius clamping, closed Path2D, Graphics2D creation/dispose in a finally block) is sound and correctly accounts for only the bottom two corners being rounded.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/prompt/PromptPanel.kt 310 New focus-outline painting in paintChildren has no test coverage; existing BufferedImage/createGraphics paint-assertion pattern used elsewhere could verify it
Files Reviewed (1 file, incremental)
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/prompt/PromptPanel.kt

Assumptions: No prior findings from earlier commits are re-raised — all other findings from previous reviews were previously verified as resolved, or (for PromptPanelTest.kt and SessionEditorTextField.kt) fall outside this incremental diff's changed files and are left untouched per incremental-review scope. Gradle build/test execution was not run in this sandbox; reviewed statically by reading the new paintChildren/editorFocused implementation and diffing against the prior flat-highlight version.

Fix these issues in Kilo Cloud

Previous review (commit bf41013)

Status: No Issues Found | Recommendation: Merge

Incremental review of 6e388ea23b..bf41013402 (2 files changed, ~24 lines). Both prior SUGGESTIONS from the last review are resolved in this commit:

  • SessionEditorTextField.kt: the fragile double-nested SwingUtilities.invokeLater hack is replaced with UiNotifyConnector.doWhenFirstShown, plus a comment explaining why this ordering reliably runs after EditorFloatingToolbar creation.
  • PromptPanelTest.kt: the test now creates an unmodified control EditorTextField, asserts it does show the floating toolbar, then asserts the SessionEditorTextField-based prompt editor does not — proving the fix actually suppresses something that would otherwise appear.

No new issues found in the incremental diff.

Files Reviewed (2 files, incremental)
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/editor/SessionEditorTextField.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/PromptPanelTest.kt

Assumptions: No prior findings from earlier commits are re-raised — all other findings were previously verified as resolved at 6138b102fb with author confirmation on each thread. Gradle build/test execution was not run in this sandbox; reviewed statically by reading UiNotifyConnector.doWhenFirstShown usage and the updated test's control/subject comparison.

Previous review (commit 6e388ea)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2

Incremental review of 6138b102fb..6e388ea23b (3 files changed, ~60 lines) which adds a new fix: hide the JetBrains editor floating toolbar from the Kilo prompt input.

Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/editor/SessionEditorTextField.kt 88 Double-nested invokeLater has no comment explaining why two EDT cycles are needed
packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/PromptPanelTest.kt 139 New test only asserts the toolbar's absence; doesn't prove it would have existed without the fix
Files Reviewed (3 files, incremental)
  • .changeset/jetbrains-prompt-floating-toolbar.md
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/editor/SessionEditorTextField.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/PromptPanelTest.kt

Assumptions: No prior findings from earlier commits are re-raised — all 8 were previously verified as resolved at 6138b102fb with author confirmation on each thread. Gradle build/test execution was not run in this sandbox; the toolbar-removal logic and the new test were reviewed statically, including cross-referencing install()'s hierarchy-listener timing against the test's two dispatchAllInvocationEvents() calls.

Fix these issues in Kilo Cloud

Previous review (commit 6138b10)

Status: No Issues Found | Recommendation: Merge

Incremental review of dafe38fbd0..6138b102fb (12 files changed). This commit directly addresses all 8 findings from the previous review with correct fixes and new regression tests:

  • SessionModel.kt / SessionController.kt — child-tool removals now leave per-part tombstones (childRemoved), and the controller tracks a part-to-child map (childParts) so stale history backfill can no longer resurrect a removed child row, and rekeying a task's childSessionId now untracks the old child subscription. Also fixed a latent ordering bug where trackChild() calls before subscribeEvents() would have been wiped out by subscribeEvents()'s internal cancelSubscriptions().
  • SettingsListModel.ktsettingsListCellAt now bounds-checks index before getElementAt, matching its sibling.
  • PromptPanel.kt — cancellation cleanup now uses withContext(NonCancellable + Dispatchers.Main) so submitting = false reliably runs on cancel; restored setFontInheritedFromLAF(false).
  • SessionEditorStyle.ktapplyTranscriptToEditor now uses the same disposal guard as applyToEditor.
  • ShellToolView.ktpadPopup now grows the field's own preferred/min/max size (not just the scroll pane's), avoiding clipping.
  • ShellToolViewTest.kt — new assertions verify the field's height actually grew to accommodate the padding, closing the gap from the earlier test.

All fixes were verified against the current code and are accompanied by new tests exercising the actual implementation (SessionModelTest, PromptLifecycleTest, PromptPanelTest, SessionEditorStyleTest, SettingsListViewTest, ShellToolViewTest).

Files Reviewed (12 files, incremental)
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/controller/SessionController.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/model/SessionModel.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/prompt/PromptPanel.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/style/SessionEditorStyle.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/tool/ShellToolView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsListModel.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/controller/PromptLifecycleTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/model/SessionModelTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/PromptPanelTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionEditorStyleTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/views/ShellToolViewTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/settings/base/SettingsListViewTest.kt

Assumptions: Gradle build/test execution was not run in this sandbox (per environment time limits); verification is based on static reading of the diff, existing test infrastructure (FakeSessionRpcApi), and cross-checking against the previous review's findings. All 8 prior inline threads have author replies claiming resolution at this commit, which matches independent verification here.

Previous review (commit dafe38f)

Status: 8 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 5
SUGGESTION 3
Issue Details (click to expand)

WARNING

File Line Issue
SessionModel.kt 206 Stale seedChild history backfill can resurrect a child tool row that was already removed via a live PartRemoved event
SettingsListModel.kt 100 settingsListCellAt calls getElementAt(index) with no bounds check, unlike its sibling settingsListCellBounds
PromptPanel.kt 536 withContext(Dispatchers.Main) inside a CancellationException catch block will itself throw before running, so submitting = false may never execute on cancel
SessionEditorStyle.kt 55 applyTranscriptToEditor calls colorsScheme.setEditorFontName/Size outside the disposal guard used by applyToEditor
ShellToolView.kt 227 padPopup adds a border to a height-fixed field without growing its size, clipping content instead of balancing padding

SUGGESTION

File Line Issue
SessionModel.kt 459 Controller-side child subscription/coroutine isn't cancelled when a tool's childSessionId is rekeyed
PromptPanel.kt 161 Removed setFontInheritedFromLAF(false) with no replacement, unlike other EditorTextField usages in this codebase
ShellToolViewTest.kt 414 New assertions check static border insets but don't verify the field's height actually grew, so they wouldn't catch the clipping regression above
Files Reviewed (50 files)
  • .changeset/*.md (7 changesets) — clear, user-facing, correct bump type
  • .kilo/plans/1783185747000-jetbrains-subagent-review-fixes.md
  • packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/controller/SessionController.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/model/Message.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/model/SessionModel.kt — 2 issues
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/ReasoningPicker.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/model/ModelPicker.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/prompt/PromptPanel.kt — 2 issues
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/style/SessionEditorStyle.kt — 1 issue
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/style/SessionUiStyle.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/CompactionView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/MessageView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/PromptView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/ViewFactory.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/question/QuestionView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/todo/TodoListPanel.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/todo/TodoWriteView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/tool/ShellToolView.kt — 1 issue
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/tool/TaskToolView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsListModel.kt — 1 issue
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsListRenderer.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsListView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/md/hybrid/MdProjector.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/md/hybrid/MdTerminal.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/md/hybrid/MdViewHybrid.kt
  • 22 test files under packages/kilo-jetbrains/frontend/src/test/kotlin/ — 1 issue (ShellToolViewTest.kt)

Assumptions: No existing PR comments/reviews were present at review time, so all findings above are newly raised. Lint/typecheck/test-runner failures, kilocode_change marker rules, and other CI-covered checks were intentionally skipped per repo review guidance.

Fix these issues in Kilo Cloud


Reviewed by claude-sonnet-5-20260630 · Input: 46 · Output: 11.1K · Cached: 1.2M

Review guidance: REVIEW.md from base branch main

@Kilo-Org Kilo-Org deleted a comment from kilo-code-bot Bot Jul 6, 2026
@kirillk
kirillk merged commit 3673ac4 into main Jul 6, 2026
20 checks passed
@kirillk
kirillk deleted the massive-fontina branch July 6, 2026 14:49
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
fix(jetbrains): polish transcript and settings interactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants