Skip to content

feat: TUI mode with scroll, mouse, conversation rendering fixes#24

Open
PTFOPlayer wants to merge 1 commit into
masterfrom
tui-fixes
Open

feat: TUI mode with scroll, mouse, conversation rendering fixes#24
PTFOPlayer wants to merge 1 commit into
masterfrom
tui-fixes

Conversation

@PTFOPlayer
Copy link
Copy Markdown
Owner

  • Add full TUI mode with conversation pane, input bar, status bar, sidebar
  • Fix scroll: mouse scroll and PageUp/PageDown/Home/End now always go to conversation widget regardless of focus
  • Fix mouse scroll: SGR mouse event parsing was broken (< prefix not stripped from parameter string, causing scroll events to be parsed as left-click)
  • Fix conversation text overflow: text now wraps at conversation area width (area.x + area.width - 1) instead of full screen width, preventing overflow into sidebar area
  • Fix conversation line height: now uses character-level wrapping matching actual screen rendering, preventing visual rows from being undercounted
  • Fix scroll offset: changed from conversation-line units to visual-row units that account for text wrapping, so scrolling works correctly with long messages
  • Fix partially-scrolled line rendering: added write_str_wrapped_skip_clipped to Screen that skips N visual rows before rendering, so lines scrolled off the top of the viewport don't re-render their full text
  • ToolResult now renders all content lines (not just first), with background fill, line truncation, and a 20-line cap with truncation indicator
  • ToolResult trims trailing blank lines from content
  • Scrollbar column is reserved (1 column) so text doesn't overlap it
  • Add thinking indicator: shows [thinking] with spinner during thinking phase, accumulates thinking text, transitions to 'Responding' label on first streaming text
  • Widget trait render method changed from &self to &mut self
  • All widget implementations updated accordingly

- Add full TUI mode with conversation pane, input bar, status bar, sidebar
- Fix scroll: mouse scroll and PageUp/PageDown/Home/End now always go to
  conversation widget regardless of focus
- Fix mouse scroll: SGR mouse event parsing was broken (< prefix not stripped
  from parameter string, causing scroll events to be parsed as left-click)
- Fix conversation text overflow: text now wraps at conversation area width
  (area.x + area.width - 1) instead of full screen width, preventing
  overflow into sidebar area
- Fix conversation line height: now uses character-level wrapping matching
  actual screen rendering, preventing visual rows from being undercounted
- Fix scroll offset: changed from conversation-line units to visual-row units
  that account for text wrapping, so scrolling works correctly with long messages
- Fix partially-scrolled line rendering: added write_str_wrapped_skip_clipped
  to Screen that skips N visual rows before rendering, so lines scrolled off
  the top of the viewport don't re-render their full text
- ToolResult now renders all content lines (not just first), with background
  fill, line truncation, and a 20-line cap with truncation indicator
- ToolResult trims trailing blank lines from content
- Scrollbar column is reserved (1 column) so text doesn't overlap it
- Add thinking indicator: shows [thinking] with spinner during thinking phase,
  accumulates thinking text, transitions to 'Responding' label on first
  streaming text
- Widget trait render method changed from &self to &mut self
- All widget implementations updated accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant