[PR #1110] [MERGED] fix(tui): ensure viewport scrolls to bottom on new messages #9811

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1110
Author: @monotykamary
Created: 7/17/2025
Status: Merged
Merged: 7/18/2025
Merged by: @adamdotdevin

Base: devHead: fix/tui-scrolling-issue


📝 Commits (1)

  • 17f3490 fix(tui): ensure viewport scrolls to bottom on new messages

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 packages/tui/internal/components/chat/messages.go (+3 -0)

📄 Description

Summary

Fixes a scrolling issue in the TUI client where pressing Enter or continuing a conversation wouldn't always scroll to the bottom to show new messages.

Changes

  • Added explicit GotoBottom() call in renderView() when tail is enabled
  • Ensures consistent scrolling behavior after content updates
  • Maintains user control when manually scrolled up

Problem

Users occasionally had to manually scroll to see new messages after pressing Enter or continuing a conversation due to timing issues in viewport scrolling.

Solution

The fix ensures that whenever new content is rendered and the user was previously at the bottom (indicated by tail=true), the viewport will immediately scroll to show the latest messages.

Testing

  • Pressing Enter after typing a message scrolls to bottom
  • New incoming messages auto-scroll when at bottom
  • Manual scroll up preserves reading position
  • Scroll behavior works consistently across different conversation states

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1110 **Author:** [@monotykamary](https://github.com/monotykamary) **Created:** 7/17/2025 **Status:** ✅ Merged **Merged:** 7/18/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `fix/tui-scrolling-issue` --- ### 📝 Commits (1) - [`17f3490`](https://github.com/anomalyco/opencode/commit/17f349018728fc8c8678aa019123fb5ae71a1b81) fix(tui): ensure viewport scrolls to bottom on new messages ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/chat/messages.go` (+3 -0) </details> ### 📄 Description ## Summary Fixes a scrolling issue in the TUI client where pressing Enter or continuing a conversation wouldn't always scroll to the bottom to show new messages. ## Changes - Added explicit GotoBottom() call in renderView() when tail is enabled - Ensures consistent scrolling behavior after content updates - Maintains user control when manually scrolled up ## Problem Users occasionally had to manually scroll to see new messages after pressing Enter or continuing a conversation due to timing issues in viewport scrolling. ## Solution The fix ensures that whenever new content is rendered and the user was previously at the bottom (indicated by tail=true), the viewport will immediately scroll to show the latest messages. ## Testing - [x] Pressing Enter after typing a message scrolls to bottom - [x] New incoming messages auto-scroll when at bottom - [x] Manual scroll up preserves reading position - [x] Scroll behavior works consistently across different conversation states --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:12 -05:00
yindo closed this issue 2026-02-16 18:14:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9811