[PR #3988] Fix: Auto-scroll to bottom when selecting session from list #10837

Closed
opened 2026-02-16 18:15:35 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3988

State: closed
Merged: Yes


Problem

When selecting a session from the /sessions list, the conversation view shows the top instead of the latest messages.

Fix

Added auto-scroll to bottom when navigating to a session so users see the latest messages immediately.

Why this fix was needed

Although there was already a toBottom() function in the code, it was only being called when the revert position changed. When navigating to a session from the /sessions list, the route.sessionID changes but this doesn't trigger the existing scroll-to-bottom logic.

The new effect watches for sessionID changes and ensures the scroll happens after both the scroll element is available and messages are loaded.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3988 **State:** closed **Merged:** Yes --- ## Problem When selecting a session from the /sessions list, the conversation view shows the top instead of the latest messages. ## Fix Added auto-scroll to bottom when navigating to a session so users see the latest messages immediately. ## Why this fix was needed Although there was already a `toBottom()` function in the code, it was only being called when the revert position changed. When navigating to a session from the /sessions list, the route.sessionID changes but this doesn't trigger the existing scroll-to-bottom logic. The new effect watches for sessionID changes and ensures the scroll happens after both the scroll element is available and messages are loaded.
yindo added the pull-request label 2026-02-16 18:15:35 -05:00
yindo closed this issue 2026-02-16 18:15:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10837