[BUG] Model/Session dialog truncating & incorrectly wrapping long names (#6166) #3867

Open
opened 2026-02-16 17:41:44 -05:00 by yindo · 1 comment
Owner

Originally created by @CasualDeveloper on GitHub (Dec 25, 2025).

Originally assigned to: @rekram1-node on GitHub.

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:

  1. Adding flexWrap="wrap" to the option container
  2. Replacing overflow="hidden" with wrapMode="word" and maxHeight={2} on the text element
  3. 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
  4. Increasing truncation limit from 61 to 122 characters

Screenshot

Before:

  • "Make scrollback and session list limits configurable #‍6137, ..." (truncated)
    Image

After:

  • Full title visible across two lines with truncation only if exceeding ~122 chars
    Image
Originally created by @CasualDeveloper on GitHub (Dec 25, 2025). Originally assigned to: @rekram1-node on GitHub. ### 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: 1. Adding `flexWrap="wrap"` to the option container 2. Replacing `overflow="hidden"` with `wrapMode="word"` and `maxHeight={2}` on the text element 3. 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 4. Increasing truncation limit from 61 to 122 characters ### Screenshot Before: - "Make scrollback and session list limits configurable #‍6137, ..." (truncated) <img width="718" height="294" alt="Image" src="https://github.com/user-attachments/assets/590e084b-a8cb-4daf-ad63-9c5c68e529f3"/> After: - Full title visible across two lines with truncation only if exceeding ~122 chars <img width="704" height="313" alt="Image" src="https://github.com/user-attachments/assets/f84fc84c-9971-4261-942f-993cbf0a4600"/>
yindo added the opentui label 2026-02-16 17:41:44 -05:00
Author
Owner

@CasualDeveloper commented on GitHub (Dec 30, 2025):

Will continue rebasing on top of release tags as they're set.

@CasualDeveloper commented on GitHub (Dec 30, 2025): Will continue rebasing on top of release tags as they're set.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3867