Problem
When a StreamingTextNode has more content than fits in the viewport, there is no visual indication that:
- More content exists above or below the visible area
- Where the current scroll position is relative to the total content
- How to scroll (users may not discover PageUp/PageDown)
Expected Behavior
Add an optional vertical scrollbar to StreamingTextNode (and potentially other scrollable nodes):
- Scrollbar track — thin column (1 char wide) on the right edge of the node
- Scrollbar thumb — indicates current position within the total content
- Visual style — configurable characters (e.g.,
│ for track, █ or ┃ for thumb) and colors
- Proportional sizing — thumb size reflects viewport/content ratio
- Auto-hide — only show scrollbar when content exceeds viewport height
API
var chatHistory = StreamingTextNode.Create()
.WithScrollbar() // Enable scrollbar with defaults
// OR
.WithScrollbar(new ScrollbarOptions
{
TrackChar = '│',
ThumbChar = '█',
TrackColor = Color.BrightBlack,
ThumbColor = Color.White,
AutoHide = true // Only show when scrollable
});
Existing Scroll Infrastructure
StreamingTextNode already has full scroll support via PersistedStreamBuffer:
ScrollOffset property tracks position
CanScrollUp / CanScrollDown properties
MaxScroll computed from content vs viewport
HandleInput() handles PageUp/PageDown/Ctrl+Home/Ctrl+End
The scrollbar would simply visualize this existing state during Render().
Reference
Terminal UIs like lazygit, btop, and k9s all use scrollbar indicators. The most common pattern is a single-character-wide track on the right edge.
Problem
When a
StreamingTextNodehas more content than fits in the viewport, there is no visual indication that:Expected Behavior
Add an optional vertical scrollbar to
StreamingTextNode(and potentially other scrollable nodes):│for track,█or┃for thumb) and colorsAPI
Existing Scroll Infrastructure
StreamingTextNodealready has full scroll support viaPersistedStreamBuffer:ScrollOffsetproperty tracks positionCanScrollUp/CanScrollDownpropertiesMaxScrollcomputed from content vs viewportHandleInput()handles PageUp/PageDown/Ctrl+Home/Ctrl+EndThe scrollbar would simply visualize this existing state during
Render().Reference
Terminal UIs like
lazygit,btop, andk9sall use scrollbar indicators. The most common pattern is a single-character-wide track on the right edge.