feat(cli): show project name in session-manager window title - #37
Merged
Merged
Conversation
The TUI window title was hard-coded to "🧙🏽♂️ fujimoto". It now renders
"🧙🏽♂️ fujimoto - {project}" via _session_manager_title, set in
_init_git_info so it follows the current project across the project
switcher — the same format as an attached Claude session, minus the
worktree portion.
jongracecox
force-pushed
the
worktree/20260706-session-manager-window-title
branch
from
July 6, 2026 18:52
9b65284 to
f059a26
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The session-manager TUI window title was hard-coded to
🧙🏽♂️ fujimoto. It now shows the project name — the same format used when a Claude session is attached, minus the worktree portion.Details
_session_manager_title(project)incli.py, which renders🧙🏽♂️ fujimoto - {project}(falls back to the bare🧙🏽♂️ fujimotoprefix when no project is known)._init_git_info, wheresub_titleis already set. Since_init_git_inforuns on mount and on project switch, the window title correctly follows the active project through the project switcher.FUJIMOTO_WINDOW_TITLEdeliberately does not affect the TUI title — the request was specifically for the project name without the worktree portion, so the TUI uses the fixedfujimoto - {project}form rather than the worktree-oriented template.set_terminal_titlenow writes tosys.__stdout__instead ofsys.stdout. Textual redirectssys.stdoutto an internal capture while the app is running, so the OSC title escape written from_init_git_infonever reached the real terminal (iTerm2).sys.__stdout__stays connected to the tty, so the write lands both before and duringapp.run(). Falls back tosys.stdoutwhen the original stream is unavailable.TestSessionManagerTitleand terminal-title tests covering the project, empty-project, andsys.__stdout__fallback cases.sys.__stdout__gotcha.Full test suite passes.