[PR #486] [CLOSED] feat: Add interactive scrollbar to chat interface #9629

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/486
Author: @BurgessTG
Created: 6/27/2025
Status: Closed

Base: devHead: feat/interactive-scrollbar


📝 Commits (7)

  • 36c76fc feat: Add interactive scrollbar to chat interface
  • 955ed63 fix: merge with dev branch scroll tracking changes
  • deb2e27 fix: complete merge with dev branch
  • f498624 Merge branch 'dev' into feat/interactive-scrollbar
  • e04aba6 fix: Resolve merge conflicts for interactive scrollbar PR #486
  • af6ded9 Merge origin/dev into pr-486-interactive-scrollbar
  • 6ef2dba Merge branch 'dev' into feat/interactive-scrollbar - Resolved conflicts in messages.go

📊 Changes

2 files changed (+185 additions, -15 deletions)

View changed files

📝 packages/tui/internal/components/chat/messages.go (+180 -13)
📝 packages/tui/internal/tui/tui.go (+5 -2)

📄 Description

Summary

  • Add visual scrollbar with click-to-jump and drag-to-scroll functionality to the chat interface
  • Implement clean rendering using OpenCode's overlay system to prevent ANSI escape sequence corruption

Implementation Details

  • Visual Design: Theme-integrated scrollbar with blue thumb (█) and muted track (│)
  • Interactions: Click-to-jump to position, drag thumb for smooth scrolling
  • Architecture: Uses layout.PlaceOverlay() for non-intrusive rendering
  • Mouse Events: Proper routing through TUI system for scrollbar interactions
  • Performance: Only renders when content overflows viewport

Technical Changes

  • Added scrollbar rendering and interaction logic to MessagesComponent
  • Extended mouse event handling in TUI router for scrollbar events
  • Preserved existing viewport functionality and key bindings
  • Used OpenCode's theme system for consistent styling

Test Plan

  • Scrollbar appears when chat content exceeds viewport height
  • Click-to-jump functionality works correctly
  • Drag-to-scroll provides smooth interaction
  • No visual corruption or ANSI escape sequences in output
  • Mouse wheel scrolling continues to work normally
  • Theme integration matches OpenCode's visual design

🤖 Generated with opencode


🔄 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/486 **Author:** [@BurgessTG](https://github.com/BurgessTG) **Created:** 6/27/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/interactive-scrollbar` --- ### 📝 Commits (7) - [`36c76fc`](https://github.com/anomalyco/opencode/commit/36c76fc2bf2bb9a525d4396eda0eb254268bc4e8) feat: Add interactive scrollbar to chat interface - [`955ed63`](https://github.com/anomalyco/opencode/commit/955ed631c3e6a51760000150aee8e00e1151f753) fix: merge with dev branch scroll tracking changes - [`deb2e27`](https://github.com/anomalyco/opencode/commit/deb2e27c924aab94df90b273398679bde720b1aa) fix: complete merge with dev branch - [`f498624`](https://github.com/anomalyco/opencode/commit/f498624112b18318574df984a7909b5be40ec2d0) Merge branch 'dev' into feat/interactive-scrollbar - [`e04aba6`](https://github.com/anomalyco/opencode/commit/e04aba6f7f4ed199ff94dce50107dd1c38ee13af) fix: Resolve merge conflicts for interactive scrollbar PR #486 - [`af6ded9`](https://github.com/anomalyco/opencode/commit/af6ded948e0e32ee5feac9047bdcbb71868d15bb) Merge origin/dev into pr-486-interactive-scrollbar - [`6ef2dba`](https://github.com/anomalyco/opencode/commit/6ef2dba263e2ff66b1a1c61b1edfbb8cbc53cb63) Merge branch 'dev' into feat/interactive-scrollbar - Resolved conflicts in messages.go ### 📊 Changes **2 files changed** (+185 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/chat/messages.go` (+180 -13) 📝 `packages/tui/internal/tui/tui.go` (+5 -2) </details> ### 📄 Description ## Summary - Add visual scrollbar with click-to-jump and drag-to-scroll functionality to the chat interface - Implement clean rendering using OpenCode's overlay system to prevent ANSI escape sequence corruption ## Implementation Details - **Visual Design**: Theme-integrated scrollbar with blue thumb (█) and muted track (│) - **Interactions**: Click-to-jump to position, drag thumb for smooth scrolling - **Architecture**: Uses layout.PlaceOverlay() for non-intrusive rendering - **Mouse Events**: Proper routing through TUI system for scrollbar interactions - **Performance**: Only renders when content overflows viewport ## Technical Changes - Added scrollbar rendering and interaction logic to MessagesComponent - Extended mouse event handling in TUI router for scrollbar events - Preserved existing viewport functionality and key bindings - Used OpenCode's theme system for consistent styling ## Test Plan - [x] Scrollbar appears when chat content exceeds viewport height - [x] Click-to-jump functionality works correctly - [x] Drag-to-scroll provides smooth interaction - [x] No visual corruption or ANSI escape sequences in output - [x] Mouse wheel scrolling continues to work normally - [x] Theme integration matches OpenCode's visual design 🤖 Generated with [opencode](https://opencode.ai) --- <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:13:53 -05:00
yindo closed this issue 2026-02-16 18:13:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9629