Skip to content

fix: keep restored tab titles until the terminal sends a real one - #475

Merged
vanvasten merged 3 commits into
mainfrom
fix/keep-restored-tab-titles
Oct 22, 2026
Merged

vanvasten merged 3 commits into
mainfrom
fix/keep-restored-tab-titles

Conversation

@vanvasten

Copy link
Copy Markdown
Contributor

What this does

After restarting Programa, tabs went back to showing folder paths. They only got their names back once you used the Claude Code session in each one. Now a restored tab keeps the name it had when you quit, until the terminal sends a real new title.

Summary

  • Session restore already saved and restored each tab's title. But the restored shell immediately sets its own title to its cwd, and that replaced the saved title.
  • A restored title is now held (panelsHoldingRestoredTitle). While it is held, updatePanelTitle ignores startup titles, which Workspace.isTerminalStartupTitle recognizes:
    • a cwd (/path, ~/path, user@host: ~/path)
    • the resume command line (claude --resume <id>, codex resume <id>, with or without the cd -- '<dir>' && prefix)
    • the bare "Claude Code" banner
  • The first title that is not a startup title releases the hold, and titles behave normally from then on.
  • A tab that was already showing a path when you quit isn't held, so its shell updates it as before.
  • Order of precedence is unchanged: custom name, then live title.

Test Plan

  • CI unit tests pass, including testSessionRestoreKeepsTitleUntilTheShellSendsARealOne and testSessionRestoredPathTitleYieldsToTheShell in WorkspaceUnitTests.
  • The first commit adds only the tests, so they should fail on it. CI runs on the head commit, so that red run is not shown here.
  • Manual check:
    1. Have a few tabs with Claude Code topic titles, then quit and relaunch.
    2. The tabs keep their topics.
    3. Run any command in one of them, such as ls. That tab's title then follows the shell again.

After a relaunch each restored shell sets its cwd as the title, which replaced the
saved agent topic on every tab. A restored title now holds until a title arrives
that is not a cwd, a resume command line or an untitled Claude Code banner.
@vanvasten
vanvasten merged commit 0efb07e into main Oct 22, 2026
12 checks passed
@vanvasten
vanvasten deleted the fix/keep-restored-tab-titles branch October 22, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant