AI Chat: scroll position is not preserved when switching chat sessions
Author: safisaCreated Sep 16, 2026Updated Sep 16, 2026
Feature Description:
Switching between AI chat sessions always lands at the bottom of the session. If you were reading somewhere in the middle of a session, that position is lost as soon as you switch away and back.
Current behaviour:
ChatViewTreeWidget.getScrollToRow()returnsthis.rows.sizewhenever auto-scroll is unlocked, so everytrackChatModel()(i.e. every session switch) scrolls to the last row.- If auto-scroll happens to be locked (you scrolled up before switching),
getScrollToRow()returnsundefinedand the virtualized list keeps the previous session's rawscrollTop— the new session then opens at an arbitrary offset. Scroll lock is per-widget, not per-session. - Nothing persists a scroll position:
ChatViewWidget.Stateonly holdslocked/temporaryLocked.
Proposal: remember a per-session scroll position (top visible row index) and restore it when the session becomes active again, optionally persisting it with the widget state so it survives a reload. Making the scroll lock per-session would address the second point.
This is most valuable when the chat view is extracted into a standalone window and used alongside the editor: there, sessions are browsed and revisited like open documents, so losing the reading position on every switch is much more noticeable.
Source: eclipse-theia/theia