Skip to content

[FEATURE]: Dynamic two-row session bar — auto-expands when session title width drops below threshold #46157

Open

Description

@neohiro

Summary

  • I have searched for existing issues before filing this

Add a second dynamic row to the session tab bar that appears automatically when any session title's rendered width falls below its container's threshold — preventing premature fadeout and improving scannability.


Problem

OpenCode's session bar displays session titles in a single row. When titles are long, they either:

  • Truncate with ellipsis — lost context
  • Fade out to the right — invisible navigation

When many sessions are open, short titles ("fix", "refactor", "explore") compete for space with long ones, and the whole bar becomes unscannable.

The transition between "readable" and "faded" is abrupt and not adaptive — there's no middle ground.


Proposed Behavior

TRIGGER: session title rendered width < container threshold (before fadeout)

When threshold is met for ANY session:
  → Session bar EXPANDS to a second row
  → ALL sessions reflow into a 2-row grid
  → Short titles get full visibility
  → Long titles truncate less aggressively
  → Bar remains scannable

When sessions close:
  → If remaining titles all exceed threshold
  → Bar contracts back to a single row

Why width-based not char-count: Character count is fragile across variable-width fonts, DPI scaling, and theme settings. Width-in-pixels measured at runtime is the reliable trigger — it fires precisely when a title would actually fade out, regardless of font or display configuration.


Mockup (ASCII)

Before (threshold not met — all titles long enough):

[bug fix opencode serve auth] [refactor plugin API] [explore context model] [→]

After (threshold met — second row forms):

[bug fix opencode serve auth] [refactor plugin API]
[explore context model] [fix TUI render] [new session] [→]

Related

This issue is distinct: it's about session bar layout responsiveness, not title generation.


OS

Cross-platform (all TUI and Desktop clients).


🦙 Creative Monkey at FrenzyPenguin Media — open-source security hardening & privacy tools

Activity

  1. neohiro commented on Aug 29, 2026

    @neohiro
    Author

    Hey @thdxr @adamdotdevin @fwang @Brendonovich — dynamic two-row session bar that triggers when session title rendered width falls below its container threshold (before fadeout). Fires precisely when a title would actually disappear, regardless of font or DPI. Collapses back to single row when sessions close and all titles fit. Distinct from #31592 / #43118 — this is pure layout responsiveness. 🦙 Creative Monkey at FrenzyPenguin Media

  2. github-actions commented on Aug 29, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The title uses [ENHANCEMENT]: but our Feature Request template requires the title to start with [FEATURE]:
    • The Feature Request template requires a verification checkbox confirming the feature hasn't been suggested before — this is missing

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  3. github-actions commented on Aug 29, 2026

    @github-actions
    Contributor

    This issue still doesn't meet our contributing guidelines.

    What still needs to be fixed:

    • The title uses [ENHANCEMENT]: but our Feature Request template requires the title to start with [FEATURE]:
    • The Feature Request template requires a verification checkbox confirming the feature hasn't been suggested before — this is still missing from the issue body

    Please edit the issue to address both points.

  4. github-actions commented on Aug 29, 2026

    @github-actions
    Contributor

    This issue still doesn't meet our contributing guidelines.

    What still needs to be fixed:

    • The title uses [ENHANCEMENT]: but our Feature Request template requires the title to start with [FEATURE]:
    • The Feature Request template requires a verification checkbox confirming the feature hasn't been suggested before — this is still missing from the issue body

    Please edit the issue to address both points.

  5. changed the title [-][ENHANCEMENT]: Dynamic two-row session bar — auto-expands when session title width drops below threshold[/-] [+][FEATURE]: Dynamic two-row session bar — auto-expands when session title width drops below threshold[/+] on Aug 29, 2026
  6. github-actions commented on Aug 29, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now follows the contributing guidelines and template requirements. We appreciate the detailed mockup and clear problem description.

  7. opencodejr commented on Oct 28, 2026

    @opencodejr

    Thanks for the detailed write-up, @neohiro! You're asking for the session tab bar to wrap into a second row when session titles would otherwise be truncated or fade out, and to go back to a single row when there's room again. The trigger would be the measured title width rather than a character count.

    The maintainers will consider this. These issues are related but don't cover the same thing:

    This can't be done as a plugin today, because plugins can't change the layout of the session tab bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions