Skip to content

fix(jetbrains): unblock public API release - #13215

Merged
kirillk merged 5 commits into
mainfrom
fix/jetbrains-public-api-release
Aug 18, 2026
Merged

fix(jetbrains): unblock public API release#13215
kirillk merged 5 commits into
mainfrom
fix/jetbrains-public-api-release

Conversation

@kirillk

@kirillk kirillk commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Issue

No linked issue. Exception: this PR addresses release-blocking JetBrains public API verifier failures and session UI regressions found during release validation.

Context

This keeps the JetBrains public API release path verifier-safe and fixes follow-up session UI behavior uncovered on the same branch. The release verifier was failing on internal JetBrains API usage, migration reconnects could dismiss or strand the migration flow, and empty persisted worktree sessions rendered as blank transcripts instead of the intended empty panel.

Implementation

  • Replace verifier-blocked project opening and side-panel mode lookup paths with public API / content metadata alternatives.
  • Preserve migration-required state across reconnect churn and retry worktree session creation after migration completes.
  • Reuse the session modal layout for the migration wizard.
  • Replace the recents-only view event with a general empty-session event, while keeping recovered non-idle session states in the transcript/progress body.
  • Delegate empty panel construction through session managers so tool windows keep the full panel and worktree editor tabs get the minimal panel.

Screenshots / Video

N/A: no screenshots were captured from this headless agent session. The visible empty-panel and modal layout behavior is covered by JetBrains UI/layout tests.

before after
Empty persisted worktree sessions could show a blank transcript. Empty persisted worktree sessions show the minimal empty panel.

How to Test

Manual/local verification

  • Agent ran ./gradlew :frontend:test --tests 'ai.kilocode.client.session.controller.ViewSwitchingTest' --tests 'ai.kilocode.client.session.controller.HistoryLoadingTest' --tests 'ai.kilocode.client.session.controller.WorkspaceWatchingTest' --tests 'ai.kilocode.client.session.controller.DisposedStateTest' --tests 'ai.kilocode.client.session.SessionUiLayoutTest' --tests 'ai.kilocode.client.session.SessionSidePanelManagerTest' --tests 'ai.kilocode.client.agentManager.worktree.WorktreeSessionEditorManagerTest' --tests 'ai.kilocode.client.session.controller.SessionRecoveryTest' --tests 'ai.kilocode.client.ui.LayeredOverlayPanelTest' --tests 'ai.kilocode.client.session.ui.SessionRootPanelTest' from packages/kilo-jetbrains/; passed.
  • Agent ran ./gradlew typecheck from packages/kilo-jetbrains/; passed.
  • Agent pushed through the repository pre-push typecheck hook; passed.
  • Agent previously ran verifier/release-path checks included in this PR body before the empty-session follow-up: ./gradlew verifyPlugin -Pproduction=true -Pkilo.channel=eap, ./gradlew test, and targeted history/tool-window tests.

Reviewer test steps

  1. Open a JetBrains Agent Manager worktree editor tab for a newly created persisted session with no messages.
  2. Confirm the editor shows the minimal empty session panel rather than an empty transcript body.
  3. Send a prompt in that session and confirm the UI transitions to the normal transcript view.
  4. Exercise a recovered non-idle session state, such as pending permission/question or retry/offline status, and confirm it still renders in the session body.
  5. Run ./gradlew :frontend:test --tests 'ai.kilocode.client.session.controller.SessionRecoveryTest' --tests 'ai.kilocode.client.session.controller.ViewSwitchingTest' from packages/kilo-jetbrains/.

Blocked checks and substitute verification

  • Agent attempted ./gradlew test from packages/kilo-jetbrains/ after the follow-up fix, but the full local run timed out after 300s while unrelated backend test classes were failing/hanging locally. Substitute verification was the expanded affected frontend suite above plus ./gradlew typecheck; GitHub CI re-runs the full JetBrains test job on the pushed branch.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Get in Touch

Kirill / kirillk.

@kilo-code-bot

kilo-code-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 4 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.kt 548 After ShowEmpty, later StateChanged events replace the empty panel with blankBody
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/agentManager/worktree/WorktreeSessionEditorManager.kt 118 Post-migration start() can be dropped while the first create is still pending
packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendAppService.kt 351 Swallowing ConnectionState.Error while migrating can leave a dead CLI under the wizard

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/agentManager/worktree/WorktreeSessionEditorManager.kt 167 Stale comment — the panel does not re-run start()
Files Reviewed (27 files)
  • .changeset/show-empty-jetbrains-sessions.md
  • packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendAppService.kt - 1 issue
  • packages/kilo-jetbrains/backend/src/test/kotlin/ai/kilocode/backend/app/PreservesMigrationTest.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/agentManager/worktree/WorktreeSessionEditorManager.kt - 2 issues
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/migration/ui/MigrationOverlayPanel.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionHost.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionManager.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.kt - 1 issue
  • 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/controller/SessionControllerEvent.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/LayeredOverlayPanel.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/agentManager/worktree/WorktreeSessionEditorManagerTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/agentManager/worktree/WorktreeSessionEditorPanelTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/migration/SessionUiMigrationTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionSidePanelManagerTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiLayoutTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/controller/DisposedStateTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/controller/HistoryLoadingTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/controller/SessionRecoveryTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/controller/ViewSwitchingTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/controller/WorkspaceWatchingTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/EmptySessionPanelTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionRootPanelTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/testing/FakeSessionRpcApi.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/ui/LayeredOverlayPanelTest.kt
  • packages/kilo-jetbrains/script/clear-migration-status.sh

Fix these issues in Kilo Cloud

Previous Review Summary (commit 8ae524b)

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

Previous review (commit 8ae524b)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (6 files)
  • packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/rpc/KiloWorktreeRpcApiImpl.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/KiloToolWindowFactory.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/actions/HistoryAction.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/agentManager/SidePanelKeys.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/KiloToolWindowFactoryTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/actions/HistorySessionActionsTest.kt

Reviewed by grok-4.6 · Input: 288.5K · Output: 43.5K · Cached: 2M

Review guidance: REVIEW.md from base branch main

…orktree session after migration

A transient connection reconnect while the app was paused for legacy
migration re-ran load(), which skipped migration (gate=AlreadyOffered)
and dropped the app into Ready, silently dismissing the wizard. The
connection-state watcher now preserves MigrationRequired across
Connecting/Connected/Error churn, mirroring the existing reconnect()
guard.

The worktree session editor also sat on a blank panel: while the backend
was paused it could not create a session and never retried. It now shows
the empty session panel (like the tool window) when creation is not yet
possible, and re-runs start() once migration completes so the session
appears.

Adds script/clear-migration-status.sh to reset the migration status for
local testing.
@kirillk kirillk changed the title fix(jetbrains): avoid verifier-blocked API usage fix(jetbrains): unblock public API release Aug 18, 2026
@kirillk
kirillk merged commit e4e410d into main Aug 18, 2026
24 checks passed
@kirillk
kirillk deleted the fix/jetbrains-public-api-release branch August 18, 2026 20:43
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