Skip to content

fix(jetbrains): recover stalled startup event streams#11796

Merged
marius-kilocode merged 2 commits into
mainfrom
heartbreaking-thing
Jun 29, 2026
Merged

fix(jetbrains): recover stalled startup event streams#11796
marius-kilocode merged 2 commits into
mainfrom
heartbreaking-thing

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

JetBrains startup currently assumes the SSE event stream either opens or fails through OkHttp. When that callback never arrives, connection state stays Connecting and downstream workspace or session flows can wait until their own timeouts.

This adds a bounded SSE-open timeout that cancels the stalled source and goes through the existing reconnect path. The test fakes now avoid cross-thread mutable list races, and the chat manager malformed-event test waits until its collection subscription is attached before emitting events. That keeps the suite focused on the intended behavior instead of scheduler timing.

@kilo-code-bot

kilo-code-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendConnectionService.kt
Previous Review Summary (commit 8c37da0)

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

Previous review (commit 8c37da0)

Status: 1 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendConnectionService.kt 122 timeoutJob is introduced but never canceled in dispose(), so plugin shutdown can leave the delayed reconnect timer alive briefly after unload.

Fix these issues in Kilo Cloud

Files Reviewed (4 files)
  • .changeset/jetbrains-sse-reconnect-timeout.md - 0 issues
  • packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendConnectionService.kt - 1 issue
  • packages/kilo-jetbrains/backend/src/test/kotlin/ai/kilocode/backend/app/KiloBackendChatManagerTest.kt - 0 issues
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/testing/FakeWorkspaceRpcApi.kt - 0 issues

Reviewed by gpt-5.4-20260305 · Input: 49.5K · Output: 4.1K · Cached: 191K

Review guidance: REVIEW.md from base branch main

@marius-kilocode marius-kilocode merged commit 94f4c23 into main Jun 29, 2026
21 checks passed
@marius-kilocode marius-kilocode deleted the heartbreaking-thing branch June 29, 2026 12:49
vkeerthivikram pushed a commit to vkeerthivikram/kilocode that referenced this pull request Jun 30, 2026
fix(jetbrains): recover stalled startup event streams
NJ-2020 pushed a commit to NJ-2020/kilocode that referenced this pull request Jul 4, 2026
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