Skip to content

fix(jetbrains): auto-scroll #9937

Open
kirillk wants to merge 5 commits intomainfrom
recondite-crane
Open

fix(jetbrains): auto-scroll #9937
kirillk wants to merge 5 commits intomainfrom
recondite-crane

Conversation

@kirillk
Copy link
Copy Markdown
Contributor

@kirillk kirillk commented May 5, 2026

Context

Existing JetBrains sessions could open near the bottom of the transcript without reaching the latest message because history load, view switching, and Swing revalidation happened across separate EDT passes.

Implementation

  • Extract session scrolling into SessionScroll so bottom-follow behavior is centralized and testable.
  • Preserve normal auto-scroll behavior for streaming updates while respecting user scroll position.
  • Add a dedicated existing-session open path that disables normal auto-follow during history load, waits for the transcript layout to settle, then scrolls to the final bottom before re-enabling auto-scroll.
  • Add regression coverage for streaming updates, scroll button behavior, recovered pending state, replayed events during open, and delayed layout/revalidation while opening history.

Demo

GIF Recording 2026-05-05 at 5 27 40 PM

How to Test

  • Open a JetBrains session with enough history to require scrolling.
  • Confirm the transcript lands at the newest message after the session finishes loading.
  • Scroll upward, then trigger another session update and confirm the scroll position is preserved.
  • Run ./gradlew :frontend:test --tests "ai.kilocode.client.session.SessionScrollTest" --tests "ai.kilocode.client.session.SessionUiLayoutTest" --tests "ai.kilocode.client.session.update.ViewSwitchingTest" --rerun-tasks from packages/kilo-jetbrains/.

Get in Touch

Kilo team.

@kirillk kirillk changed the title fix(jetbrains): stabilize existing session scroll fix(jetbrains): auto-scroll May 5, 2026
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented May 5, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (16 files)
  • .changeset/jetbrains-existing-session-scroll.md
  • .changeset/jetbrains-scroll-bottom.md
  • .changeset/jetbrains-session-scroll-layout.md
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionScroll.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/SessionMessageListPanel.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/update/SessionController.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/TextView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/UiStyle.kt
  • packages/kilo-jetbrains/frontend/src/main/resources/icons/scroll-bottom.svg
  • packages/kilo-jetbrains/frontend/src/main/resources/icons/scroll-bottom_dark.svg
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionScrollTest.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/SessionUiTestBase.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/testing/FakeSessionRpcApi.kt

Reviewed by gpt-5.5-2026-04-23 · 871,138 tokens

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.

1 participant