Skip to content

fix(tui): split terminal tab title from window title - #74683

Merged
OutThisLife merged 1 commit into
mainfrom
bb/osc-tab-title
Jul 30, 2026
Merged

fix(tui): split terminal tab title from window title#74683
OutThisLife merged 1 commit into
mainfrom
bb/osc-tab-title

Conversation

@OutThisLife

@OutThisLife OutThisLife commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

What changed and why

Terminal.app truncates background tab titles from the left. The TUI was emitting a single OSC 0 (set title+icon) with the full composed string marker · sessionTitle · model · cwd, so a background tab only showed the tail — usually the cwd or process name like python — instead of the session name at the front.

useTerminalTitle now accepts { tab, window } to emit two separate sequences:

  • OSC 1 (icon/tab label) → short: ⏳ session title
  • OSC 2 (window title bar) → full: ⏳ session title · model · cwd

Background tabs now show the session name. The window title bar keeps the full string. When a single string is passed (existing callers), behavior is unchanged — still OSC 0.

How to test

  1. Run the TUI in Terminal.app with 3+ tabs open. Background tabs should show the session title, not the cwd tail.
  2. Check the window title bar (titlebar or Cmd+I) — should show the full marker · session · model · cwd string.
  3. Run in iTerm2/Ghostty/etc — tab should show the short title, window the full one.

Related — superseded PRs

This PR fixes the TUI (Ink/React) tab title. The classic CLI (prompt_toolkit) is a separate code path — #74654 is the complementary CLI implementation and remains open.

The following stale CLI PRs were closed as superseded by #74654:

#5505 (the feature issue) stays open until #74654 merges for the CLI side; the TUI side is fixed here.

Terminal.app truncates background tab titles from the left, so a single
long OSC 0 string (marker · session · model · cwd) leaves only the tail
visible — usually the cwd or process name. Emit OSC 1 (icon/tab) with
just the short session title and OSC 2 (window) with the full composed
string, so background tabs show the session name instead of the cwd tail.
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on f1a91ad

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

1 visual diff.

inline evidence upload failed.

Failed to upload diff-665a0833239e-onboarding-overlay-diff.png with gh image (exit code 1): Error uploading /home/runner/work/_temp/e2e-evidence/diff-665a0833239e-onboarding-overlay-diff.png: step 0 (get upload token): uploadToken not found on repo page — do you have write access to NousResearch/hermes-agent? (or, if NousResearch enforces SAML SSO, authorize at https://github.com/orgs/NousResearch/sso)

@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have labels Jul 30, 2026
@OutThisLife
OutThisLife merged commit c55159f into main Jul 30, 2026
37 checks passed
@OutThisLife
OutThisLife deleted the bb/osc-tab-title branch July 30, 2026 07:58
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
fix(tui): split terminal tab title from window title
33hodl pushed a commit to 33hodl/hermes-agent that referenced this pull request Aug 12, 2026
fix(tui): split terminal tab title from window title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants