[PR #565] [CLOSED] feat: Add height-limited text input with viewport scrolling #9649

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

📋 Pull Request Information

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

Base: devHead: feat/chat-expansion-scroll


📄 Description

Summary

Enhances the text input experience by adding intelligent height management and scrolling capabilities.

Features

  • Natural growth: Text input expands from 1 to 8 lines as you type
  • Fixed height with scrolling: After 8 lines, maintains fixed height with internal viewport
  • Interactive scrollbar: Visual scrollbar for navigating long text
  • Automatic cursor tracking: Cursor stays visible as you type or navigate
  • Keyboard navigation: Page Up/Down support for scrolling through content

Benefits

  • Better UX for long messages: No more endless text box growth pushing chat history off screen
  • Familiar behavior: Similar to other modern chat applications
  • Maintains context: Can see chat history while composing long messages
  • Visual feedback: Scrollbar shows position in long text

Implementation Details

  • Enhanced textarea.Model with MaxHeight and viewport scrolling
  • Added scrollOffset tracking for viewport behavior
  • Implemented ensureCursorVisible() for automatic scroll adjustment
  • Scrollbar appears/disappears based on content overflow

Test Plan

  • Type more than 8 lines of text to see growth limiting
  • Verify scrollbar appears when content exceeds visible area
  • Test cursor stays visible when typing at bottom
  • Confirm Page Up/Down navigation works
  • Check that chat history remains visible

🤖 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/565 **Author:** [@BurgessTG](https://github.com/BurgessTG) **Created:** 6/30/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/chat-expansion-scroll` --- ### 📄 Description ## Summary Enhances the text input experience by adding intelligent height management and scrolling capabilities. ## Features - **Natural growth**: Text input expands from 1 to 8 lines as you type - **Fixed height with scrolling**: After 8 lines, maintains fixed height with internal viewport - **Interactive scrollbar**: Visual scrollbar for navigating long text - **Automatic cursor tracking**: Cursor stays visible as you type or navigate - **Keyboard navigation**: Page Up/Down support for scrolling through content ## Benefits - **Better UX for long messages**: No more endless text box growth pushing chat history off screen - **Familiar behavior**: Similar to other modern chat applications - **Maintains context**: Can see chat history while composing long messages - **Visual feedback**: Scrollbar shows position in long text ## Implementation Details - Enhanced `textarea.Model` with `MaxHeight` and viewport scrolling - Added `scrollOffset` tracking for viewport behavior - Implemented `ensureCursorVisible()` for automatic scroll adjustment - Scrollbar appears/disappears based on content overflow ## Test Plan - ✅ Type more than 8 lines of text to see growth limiting - ✅ Verify scrollbar appears when content exceeds visible area - ✅ Test cursor stays visible when typing at bottom - ✅ Confirm Page Up/Down navigation works - ✅ Check that chat history remains visible 🤖 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:55 -05:00
yindo closed this issue 2026-02-16 18:13:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9649