Skip to content

fix(jetbrains): improve diff performance and session layout - #12746

Merged
kirillk merged 15 commits into
mainfrom
spectacled-week
Jul 31, 2026
Merged

fix(jetbrains): improve diff performance and session layout#12746
kirillk merged 15 commits into
mainfrom
spectacled-week

Conversation

@kirillk

@kirillk kirillk commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Context

This improves the JetBrains plugin experience for large branch diffs, long session transcripts, and queued-prompt UX. The main problems were expensive full-transcript restyling while rendering diff previews, large inline patches freezing the EDT, cramped diff file names, existing sessions sometimes loading with cropped transcript content until the panel was resized, and the prompt send/stop button getting out of sync when attachments changed during a busy session.

Implementation

  • Cap large inline diff previews and show an overflow placeholder instead of rendering huge patches directly in chat tool cards.
  • Avoid session-wide markdown restyling fan-out when individual transcript blocks are styled.
  • Improve JetBrains diff editor/tree rendering for large branch diffs, including compact relative paths and horizontal scrolling.
  • Add a bounded transcript reflow after existing-session load/restyle so width-keyed cached heights are refreshed after HTML panes settle, without disabling the validate-root/cache optimization.
  • Keep the busy-session prompt send/stop button synchronized when attachments are added, removed, or cleared.
  • Fix layered overlay preferred sizing to avoid double-scaling under IDE zoom.

Screenshots / Video

Cap preview size so it won't slow down UI

Screen Shot 2026-07-31 at 3 48 41 PM

How to Test

Manual/local verification

  • Agent ran ./gradlew typecheck from packages/kilo-jetbrains/.
  • Agent ran ./gradlew :frontend:test --tests "ai.kilocode.client.session.ui.PromptPanelTest" from packages/kilo-jetbrains/.
  • Agent ran ./gradlew :frontend:test --tests "ai.kilocode.client.session.ui.SessionLayoutTest" --tests "ai.kilocode.client.session.ui.SessionMessageListPanelTest" --tests "ai.kilocode.client.session.ui.SessionRootPanelTest" from packages/kilo-jetbrains/.
  • Agent ran ./gradlew :frontend:test --tests "ai.kilocode.client.session.SessionUiLayoutTest" --tests "ai.kilocode.client.session.SessionScrollTest" from packages/kilo-jetbrains/.
  • Earlier commits in this branch include JetBrains diff-focused frontend/backend regression tests for diff rendering, overflow capping, and modified-files behavior.

Reviewer test steps

  1. Open the JetBrains plugin with a branch containing a large diff.
  2. Confirm the diff tree uses compact relative paths and can scroll horizontally for long paths.
  3. Trigger/read tool output containing a very large patch and confirm the chat card shows an overflow placeholder instead of freezing the EDT.
  4. Open an existing long chat session and confirm the transcript is fully laid out on first load without needing to resize the tool window.
  5. Switch editor theme or font settings and confirm transcript content reflows correctly without the previous session-wide freeze.
  6. While a session is busy with an empty prompt, add and remove an attachment; confirm the prompt button switches between Send when a draft exists and Stop when no draft remains.

Blocked checks and substitute verification

  • No blocked checks. The relevant JetBrains typecheck and targeted frontend tests passed locally.

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

Kilo maintainers can reach me through the usual GitHub PR thread.

@kilo-code-bot

kilo-code-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Notes (incremental review at b2f17a2)
  • Incremental scope since f194769: one new frontend test, test non-streaming active state keeps the reflow settle window. No production code changed in this increment.
  • Resolved: the previous SUGGESTION that neither reflow-budget test distinguished model.state is SessionState.Busy from model.state.isBusy(). The new test drives EverGrowing under SessionState.Retry (a state where isBusy() is true but the state is not Busy) and asserts the pass count lands in the idle-budget region (11..30, i.e. the REFLOW_BUDGET-bounded ~25 passes) rather than collapsing to the REFLOW_PASSES window (~7). Reverting the gate to isBusy() would fail this assertion, so the narrowing is now pinned.
  • Bounds check out against the implementation: REFLOW_PASSES = 6, REFLOW_BUDGET = 24, and EverGrowing changes height on every measurement, so the non-Busy chain restarts the settle window each pass and terminates only on the budget.
  • Findings in files untouched by this increment are not carried forward.
Files Reviewed (1 file)
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt
Previous Review Summaries (7 snapshots, latest commit f194769)

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

Previous review (commit f194769)

Status: 1 Issue Found | Recommendation: Optional follow-up

Overview

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

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt 224 Both reflow-budget tests pass under the old isBusy() predicate, so nothing locks in this commit's is SessionState.Busy narrowing; a non-Busy busy-ish state (Retry/AwaitingPermission) case would pin it
Notes (incremental review at f194769)
  • Incremental scope since 6820530e: the reflow settle gate narrowing from model.state.isBusy() to model.state is SessionState.Busy, plus one new streaming reflow test.
  • Resolved: the previous WARNING about isBusy() covering AwaitingQuestion/AwaitingPermission/Retry/Offline/Reverting. Only SessionState.Busy now shortens the settle window, so a session restored into a permission/retry/offline state keeps restarting the window while heights move, bounded by REFLOW_BUDGET.
  • Resolved: the previous SUGGESTION about the untested busy branch. test streaming session settles reflow within the pass window drives EverGrowing under Busy and bounds the chain to the pass window.
  • Findings in files untouched by this increment are not carried forward.
Files Reviewed (2 files)
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt - 0 issues
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt - 1 issue

Fix these issues in Kilo Cloud

Previous review (commit 6820530)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt 561 isBusy() covers AwaitingQuestion/AwaitingPermission/Retry/Offline/Reverting, so opening an existing session blocked on a permission prompt now ends the settle chain after REFLOW_PASSES with nothing re-arming it

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt 221 The new budget test runs while the model is Idle, so the isBusy() term added in this commit has no coverage
Notes (incremental review at 6820530)
  • Incremental scope since 87b00a9b: the diff tree's bulkToggle suppression, the isBusy() term in reflowPass, and one new reflow-budget test.
  • Resolved: the per-row layout-cache invalidation on bulk expand/collapse. expandAll/collapseAll now run inside bulkToggle, which suppresses the toggle listener and invalidates the UI-scoped cache once at the end, so a large branch diff no longer re-measures the whole tree per row.
  • Resolved: the missing budget test. test reflow budget terminates when height never settles drives an ever-growing child through the chain and proves termination.
  • Findings in files untouched by this increment are not carried forward.
Files Reviewed (3 files)
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/diff/KiloDiffEditorContent.kt - 0 issues
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt - 1 issue
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt - 1 issue

Fix these issues in Kilo Cloud

Previous review (commit 87b00a9)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/diff/KiloDiffEditorContent.kt 450 New expansion listener invalidates the whole tree layout cache once per row, so expandAll/collapseAll do quadratic re-measure work on large branch diffs
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt 553 Budget exhaustion while the height is still moving leaves the transcript unsettled with nothing re-armed; the cap counts EDT cycles, not elapsed time
packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt 178 The budget cap itself still has no test; a never-stabilizing child would prove the chain terminates
Notes (incremental review at 87b00a9)
  • Incremental scope since 820d5d5f: the diff tree's new TreeExpansionListener in KiloDiffEditorContent.kt plus one new test.
  • Resolved: the previous suggestion about expansion-dependent folder row width. buildFileTree now invalidates the tree layout cache on expand/collapse, and test folder row width tracks its badge visibility pins the width difference the fix depends on.
  • Closed by author decision: the branch-diff budget suggestion in KiloWorkspaceRpcApiImpl.kt — the eager 8 MB cap is being kept intentionally.
  • The two remaining findings live in files untouched by this increment; both were re-verified against current HEAD and are still present.
Files Reviewed (2 files)
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/diff/KiloDiffEditorContent.kt - 1 issue
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/diff/KiloDiffEditorContentTest.kt - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit 820d5d5)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt 553 Budget exhaustion while the height is still moving leaves the transcript unsettled with nothing re-armed; the cap counts EDT cycles, not elapsed time
packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt 178 The new budget cap itself has no test; a never-stabilizing child would prove the chain terminates
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/diff/KiloDiffEditorContent.kt 629 Folder row width is expansion-dependent, but nothing invalidates the tree's cached path bounds on expand/collapse
packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/rpc/KiloWorkspaceRpcApiImpl.kt 84 40x branch-diff budget increase makes up to ~8 MB of patch text eager, resident, and re-sent over RPC on each refresh
Notes (incremental review at 820d5d5)
  • Incremental scope since e0fa585e: the reflowPass hard budget in SessionMessageListPanel.kt and one new test.
  • Resolved: the previous WARNING about the unbounded reflow chain. budget never resets, so a streaming session can no longer keep remaining alive indefinitely; total passes per schedule are capped at 24.
  • Resolved: the previous test-coverage suggestion. test deferred reflow re-arms on first real width layout now latches pendingReflow via a real turn and exercises the doLayout() re-arm.
  • Verified the re-entrancy path (reflow() -> doLayout() -> scheduleReflow()) cannot loop: pendingReflow is only set at zero width, and the stale seq short-circuits the superseded chain.
  • The two findings in unchanged files were re-verified against current HEAD and are still present.
Files Reviewed (2 files)
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt - 1 issue
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt - 1 issue

Fix these issues in Kilo Cloud

Previous review (commit e0fa585)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt 553 Reflow chain resets its budget on every height change, so it can re-measure the whole transcript once per EDT cycle for as long as a session keeps streaming

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/diff/KiloDiffEditorContent.kt 629 Folder row width is now expansion-dependent, but nothing invalidates the tree's cached path bounds on expand/collapse, so a collapsed folder can paint at the narrower expanded-state width
packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt 170 Test never latches pendingReflow (no turns in turnViews), so the doLayout() re-arm path is uncovered
packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/rpc/KiloWorkspaceRpcApiImpl.kt 84 40x branch-diff budget increase makes up to ~8 MB of patch text eager, resident, and re-sent over RPC on each refresh; consider on-demand per-file patches
Notes (incremental review at e0fa585)
  • Incremental scope since 632e4ca8: KiloDiffEditorContent.kt (hide rolled-up folder badges while expanded) and its test.
  • The !(item.dir && expanded) guard is correct for leaves: JTree passes expanded = false for leaf rows, and the root is hidden (isRootVisible = false), so only real folder rows are affected. Aggregate stats stay reachable in the header badge.
  • New tests derive expanded from tree.isExpanded(...) rather than hardcoding it, so both the expanded-hide and collapsed-show paths are genuinely exercised.
  • Note that buildFileTree calls expandAll(tree), so folder badges are hidden on first paint by default -- assumed intentional.
  • The three findings above from earlier commits were re-verified at current HEAD and are still present.
Files Reviewed (2 files)
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/diff/KiloDiffEditorContent.kt - 1 issue
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/diff/KiloDiffEditorContentTest.kt - no issues

Fix these issues in Kilo Cloud

Previous review (commit 632e4ca)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt 553 Reflow chain resets its budget on every height change, so it can re-measure the whole transcript (after forgetAll()) once per EDT cycle for as long as a session keeps streaming

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt 170 New test never latches pendingReflow (no turns in turnViews), so the doLayout() re-arm path added by this commit is uncovered
packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/rpc/KiloWorkspaceRpcApiImpl.kt 84 40x branch-diff budget increase makes up to ~8 MB of patch text eager, resident, and re-sent over RPC on each refresh; consider on-demand per-file patches
Notes (incremental review at 632e4ca)
  • Incremental scope since 7e0468fa: SessionMessageListPanel.kt (zero-width reflow guard + pendingReflow re-arm in doLayout) and its test.
  • The new width <= 0 guard is consistent with SessionLayout's width-keyed cache, so skipping forgetAll()/revalidate() at zero width cannot leave a stale real-width measurement: measure() only trusts a cache hit when hit.width == width.
  • Re-entrancy checked: reflow() calls doLayout(), but pendingReflow is cleared before scheduleReflow(), so the override cannot loop; the extra scheduleReflow() only bumps seq, cancelling the in-flight pass chain.
  • Scroll behavior checked: the re-armed reflow can fire onReflow(true), but SessionScroll.followTail() is gated on tail, so it will not yank a user who scrolled away.
  • dispose()/clear()/scheduleReflow() all reset pendingReflow, so no stale flag survives teardown.
  • The two findings above were raised previously and are still unresolved at current HEAD.
Files Reviewed (2 files)
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt - 1 issue (carried forward)
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanelTest.kt - 1 issue

Fix these issues in Kilo Cloud

Previous review (commit 7e0468f)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt 525 Reflow chain resets its budget on every height change, so it can re-measure the whole transcript (after forgetAll()) once per EDT cycle for as long as a session keeps streaming

SUGGESTION

File Line Issue
packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/rpc/KiloWorkspaceRpcApiImpl.kt 84 40x branch-diff budget increase makes up to ~8 MB of patch text eager, resident, and re-sent over RPC on each refresh; consider on-demand per-file patches
Notes
  • The diff-tree compact() rewrite only changes intermediate directory Node.name/path; leaf paths stay intact, so find/selectTreeNode/activePath lookups and updateStats still resolve correctly.
  • Dropping selection?.applyStyle(style) from MdViewHybrid.applyStyle looks safe: SessionSelection caches the last style and applies it to items at registration time, and SessionUi.applyStyle is the single fan-out point on theme change.
  • The new APPLIED user-data guard in SessionEditorStyle.applyToEditor composes correctly with applyTranscriptToEditor (transcript font is set after, and re-applying the same snapshot no longer clobbers it).
  • New diff.overflow.* keys were added to KiloBundle.properties only, which matches the existing convention (translated bundles already lag the default).
  • Reviewed against head 7e0468fa (the branch picked up a main merge mid-review; none of the PR's own files changed).
Files Reviewed (30 files)
  • packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/rpc/KiloWorkspaceRpcApiImpl.kt - 1 issue
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/SessionMessageListPanel.kt - 1 issue
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/diff/DiffBlocks.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/diff/KiloDiffEditorContent.kt
  • 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/ui/SessionLayout.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/ui/style/SessionUiStyle.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/tool/DiffOverflow.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/tool/EditToolView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/tool/PatchBody.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/tool/ToolMarkdownBody.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/tool/ToolSupport.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/LayeredOverlayPanel.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/md/hybrid/MdViewHybrid.kt
  • packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties
  • .changeset/jetbrains-attachment-button-sync.md, .changeset/jetbrains-diff-view-fixes.md, .changeset/jetbrains-session-load-crop.md
  • 9 test files (backend BranchDiffTest; frontend diff, session UI, prompt, and tool-view tests)

Fix these issues in Kilo Cloud


Reviewed by claude-opus-5 · Input: 32 · Output: 4.9K · Cached: 1.2M

Review guidance: REVIEW.md from base branch main

Opening a session could pin the transcript to a bottom computed from a zero-width measurement, cropping the last content until a toolwindow resize forced a re-measure. Reflow now no-ops until the panel has a real width and re-arms from doLayout once it does, so the transcript is always measured on-screen. The streaming path is untouched: pendingReflow is only set by a rebuild/clear that ran before layout, so the added doLayout check short-circuits during live updates.
Expanded folders already reveal child file badges, so showing the rolled-up folder total duplicates the visible counts. Keep aggregate badges only on collapsed folders while preserving file badges.
The reflow chain restarted its pass budget on every height change, so a
session that keeps streaming after open reset the budget each EDT cycle and
held the panel in a perpetual forgetAll()/re-measure loop, defeating the
width-keyed height cache. Add a hard total-pass budget that never resets so
the layout can still settle across a few height changes while capping the
work a streaming session can trigger. Covers the doLayout re-arm path with a
test that latches pendingReflow via a real turn at zero width.
A folder row hides its rolled-up badge while expanded, so its preferred
width now depends on expansion state. JTree only invalidates cached path
bounds on model changes, not on expand/collapse, so a collapsed folder could
keep its narrower expanded-state bounds and let the re-shown badge squeeze
the file name until an unrelated re-measure. Add a TreeExpansionListener that
invalidates the layout cache on toggle so the row re-measures immediately.
kirillk added 2 commits July 31, 2026 17:00
Only treat a moving preferred height as an unsettled layout while the session
is idle. During streaming the height just tracks incoming content, so the
chain now counts its passes down instead of restarting the settle window,
settling in REFLOW_PASSES and handing off to the per-turn forgetTurn path
rather than risking a narrow crop-until-resize when the hard budget trips
mid-stream. Keep the budget as the idle backstop and cover it with a test
that drives an ever-growing child so the chain would spin without the cap.
…ggle

invalidateCacheAndRepaint is UI-scoped, so firing it from the expansion
listener on every row made expand/collapse-all O(rows^2) to re-measure on
large branch diffs. Suppress the listener during bulk toggles and invalidate
once at the end, and register it after the initial expandAll. Per-row user
toggles still invalidate immediately.
isBusy() is true for awaiting-permission/question, retry, and offline —
states recoverPending() can seed right after history load, where no deltas
arrive and a moving height genuinely means the panes are still settling.
Gating the settle-window shortcut on those states cut the reflow chain to
REFLOW_PASSES and reintroduced the crop-until-resize bug on exactly that
path. Gate only on SessionState.Busy (the streaming state) so the runaway
fix stays while blocked/retry/offline sessions keep their full settle window.
Add a Busy-state test that fails if the term is dropped or inverted.
Add a Retry-state reflow test (isBusy() == true but not SessionState.Busy):
it must keep restarting the settle window toward the idle budget rather than
collapsing to REFLOW_PASSES. This is the only case that distinguishes
`is SessionState.Busy` from the old `isBusy()` predicate — verified it fails
(7 passes) if the gate is reverted to isBusy().
@kirillk
kirillk merged commit 0aabd47 into main Jul 31, 2026
24 checks passed
@kirillk
kirillk deleted the spectacled-week branch July 31, 2026 23:55
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
fix(jetbrains): improve diff performance and session layout
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