Skip to content

fix(jetbrains): wrap session status messages - #14435

Merged
kirillk merged 2 commits into
mainfrom
zesty-reef
Sep 22, 2026
Merged

kirillk merged 2 commits into
mainfrom
zesty-reef

Conversation

@kirillk

@kirillk kirillk commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Issue

No linked issue. This fixes the directly reported JetBrains session bug where long provider retry messages are clipped instead of wrapping.

Context

Long retry and offline status messages can exceed the session width, especially for provider-capacity errors. The existing footer lays out the status at its natural single-line width, so text is clipped beside the spinner and elapsed timer.

Implementation

Render retry and offline messages as escaped HTML in retained, copyable JBLabel components with auto-wrapping enabled. A width-aware footer layout reserves space for the spinner and elapsed timer before measuring the message, while keeping short rows centered. Busy text remains on the existing plain ShimmerLabel so its animation and styling are unchanged. The pre-transcript loading state uses the same HTML wrapping behavior.

Provider text remains semantic plain text for accessibility and assertions, HTML-looking content is escaped, and explicit line breaks are preserved.

Screenshots / Video

N/A: an after screenshot was not captured in the headless test environment. The originating report included the clipped before state; automated Swing geometry tests verify increased multi-line height and bounded child layout at narrow widths.

How to Test

Manual/local verification

  • Agent: ran ./gradlew typecheck test from packages/kilo-jetbrains/; all JetBrains typechecks and tests passed.
  • Agent: ran focused ProgressPanelTest, LoadingPanelTest, and SessionUiLayoutTest suites; all passed.
  • Agent: the pre-push hook ran repository-wide typechecks; all passed.

Reviewer test steps

  1. Open a JetBrains Kilo session in a narrow tool window.
  2. Trigger a retry or offline state with a long provider message.
  3. Confirm the message wraps onto multiple lines without clipping the spinner or elapsed timer.
  4. Widen the tool window and confirm the message reflows and short rows remain centered.
  5. Start a normal busy turn and confirm the existing shimmer style remains unchanged.

Blocked checks and substitute verification

  • Manual IDE screenshot capture was unavailable in the headless environment. Swing layout tests cover narrow/wide height changes, component bounds, HTML escaping, explicit line breaks, centered short rows, and busy shimmer restoration.

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

Not provided.

@kilo-code-bot

kilo-code-bot Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The two previous findings are resolved in f022acb72a: Footer.space() now reads the parent chain's fresh width before falling back to its own (stale) width, and markup() delegates to the new UiStyle.Text.wrapLines() shared helper instead of duplicating the escaped line-break join.

Files Reviewed (3 files)
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/ProgressPanel.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/UiStyle.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/ProgressPanelTest.kt
Previous Review Summary (commit 4dd6905)

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

Previous review (commit 4dd6905)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/ProgressPanel.kt 354 Footer.space() prefers the footer's own (previous-layout) width while getPreferredSize() runs, so after a resize the wrapped height is measured against the old width until the next revalidate.
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/ProgressPanel.kt 377 markup() duplicates the escaped line-break HTML join already implemented in UiStyle.Text.tipLines().
Files Reviewed (5 files)
  • .changeset/jetbrains-session-status-wrap.md - no issues
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/LoadingPanel.kt - no issues
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/ProgressPanel.kt - 2 issues
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/LoadingPanelTest.kt - no issues
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/ProgressPanelTest.kt - no issues

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

- Read the ancestor's fresh width in Footer.space() instead of this
  component's stale width, matching SessionLayout's resize-then-measure
  pattern.
- Extract the escaped-lines HTML builder into UiStyle.Text.wrapLines()
  so it shares implementation with tipLines() instead of duplicating it.
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