anomalyco / anomalyco/opencode

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

Open
#46,157 5 comments 1 reaction 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 29, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

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

  • #31592 — "Session title no longer auto update" (related: title behavior)
  • #43118 — "Configurable max word count for generated session titles" (related: title length)
  • #42287 — "Session title silently empty when title model is a reasoning model"

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.