opencode
opencode copied to clipboard
[Bug] Model/Session dialog truncating & incorrectly wrapping long names (#6166)
Description
Long session names in the Sessions dialog (ctrl+k) are truncated with "..." even though there's vertical space available. This makes it hard to distinguish between sessions with similar prefixes.
Current behavior
Session names are truncated at ~61 characters with ellipsis, displayed on a single line.
Proposed behavior
Allow session names to wrap to a second line (up to 2 lines max) before truncating, making better use of available space.
Fix
The fix involves:
- Adding
flexWrap="wrap"to the option container - Replacing
overflow="hidden"withwrapMode="word"andmaxHeight={2}on the text element - Removing redundant
paddingLeft={3}on the text element - this was causing opentui's flex layout to incorrectly calculate wrap width, resulting in some items displaying with double row height even when text fit on one line - Increasing truncation limit from 61 to 122 characters
Screenshot
Before:
- "Make scrollback and session list limits configurable #6137, ..." (truncated)
After:
- Full title visible across two lines with truncation only if exceeding ~122 chars