feat(ui): Improve chat interface with natural scrolling and history preservation#290
Merged
feat(ui): Improve chat interface with natural scrolling and history preservation#290
Conversation
This commit implements smooth, natural mouse wheel scrolling for the chat conversation view, addressing the limitation where users could only scroll using Shift+Up/Down keyboard shortcuts. Changes: - Enable mouse support in Bubble Tea program with tea.WithMouseCellMotion() - Configure viewport with MouseWheelEnabled and MouseWheelDelta (3 lines) - Refactor event handling to use viewport's native mouse wheel support - Remove custom mouse handler that was blocking natural scrolling - Maintain scroll state tracking for auto-scroll behavior The chat interface now provides a more intuitive scrolling experience similar to standard terminal applications, while preserving the existing auto-scroll-to-bottom behavior when new messages arrive. Signed-off-by: Eden Reich <eden.reich@gmail.com>
Remove alt-screen mode and print conversation history when exiting to preserve the full chat session in the terminal scrollback. This allows users to review previous interactions after closing the chat interface. Changes: - Remove tea.WithAltScreen() to keep chat visible in terminal - Add PrintConversationHistory() method to output chat on exit - Store rendered content in ConversationView for accurate text export - Update GetPlainTextLines() to use actual rendered content - Add tea.ClearScreen on init for clean startup Signed-off-by: Eden Reich <eden.reich@gmail.com>
ig-semantic-release-bot bot
pushed a commit
that referenced
this pull request
Nov 30, 2025
## [0.74.0](v0.73.0...v0.74.0) (2025-11-30) ### 🚀 Features * **ui:** Improve chat interface with natural scrolling and history preservation ([#290](#290)) ([6d2694e](6d2694e))
|
🎉 This PR is included in version 0.74.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enhances the terminal chat interface with two key improvements:
Changes
Mouse Wheel Scrolling Enhancement
MouseWheelEnabled = trueandMouseWheelDelta = 3for smooth scrollingHistory Preservation
PrintConversationHistory()method to output the conversation after exitrenderedContentfield to maintain exact formattingGetPlainTextLines()to return the actual rendered content with proper text wrappingTest plan
🤖 Generated with Claude Code