From b4aeb005b54877a1c094cd33755a1a05eb9e01f0 Mon Sep 17 00:00:00 2001 From: Kailigithub <12250313+Kailigithub@users.noreply.github.com> Date: Wed, 29 Jul 2026 03:09:48 +0800 Subject: [PATCH] fix(desktop): scroll to bottom when switching to active session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #683 — switching to a session whose agent is still streaming left the viewport pinned near the user's last message instead of jumping to the latest draft. Mirror the existing refreshEmptyState(sess); scrollBottom(true) pattern from sibling render paths so setActiveSession lands at the bottom. --- frontends/desktop/static/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontends/desktop/static/app.js b/frontends/desktop/static/app.js index f3b674e03..7f04d4c0e 100644 --- a/frontends/desktop/static/app.js +++ b/frontends/desktop/static/app.js @@ -2711,6 +2711,7 @@ function setActiveSession(id) { r.draftEl = null; resetTypewriterState(r); renderAllMessages(sess); + scrollBottom(true); setBusy(sess, rt(sess).busy); renderSessionList(); refreshPlanBar(null);