Skip to content

feat(cli): show project name in session-manager window title - #37

Merged
jongracecox merged 1 commit into
mainfrom
worktree/20260706-session-manager-window-title
Jul 6, 2026
Merged

feat(cli): show project name in session-manager window title#37
jongracecox merged 1 commit into
mainfrom
worktree/20260706-session-manager-window-title

Conversation

@jongracecox

@jongracecox jongracecox commented Jul 6, 2026

Copy link
Copy Markdown
Owner

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

  • Added _session_manager_title(project) in cli.py, which renders 🧙🏽‍♂️ fujimoto - {project} (falls back to the bare 🧙🏽‍♂️ fujimoto prefix when no project is known).
  • Called from _init_git_info, where sub_title is already set. Since _init_git_info runs on mount and on project switch, the window title correctly follows the active project through the project switcher.
  • FUJIMOTO_WINDOW_TITLE deliberately does not affect the TUI title — the request was specifically for the project name without the worktree portion, so the TUI uses the fixed fujimoto - {project} form rather than the worktree-oriented template.
  • set_terminal_title now writes to sys.__stdout__ instead of sys.stdout. Textual redirects sys.stdout to an internal capture while the app is running, so the OSC title escape written from _init_git_info never reached the real terminal (iTerm2). sys.__stdout__ stays connected to the tty, so the write lands both before and during app.run(). Falls back to sys.stdout when the original stream is unavailable.
  • Added TestSessionManagerTitle and terminal-title tests covering the project, empty-project, and sys.__stdout__ fallback cases.
  • Updated CLAUDE.md and README.md to document the TUI-screen title behavior and the sys.__stdout__ gotcha.

Full test suite passes.

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
jongracecox force-pushed the worktree/20260706-session-manager-window-title branch from 9b65284 to f059a26 Compare July 6, 2026 18:52
@jongracecox
jongracecox merged commit 3677300 into main Jul 6, 2026
5 checks passed
@jongracecox
jongracecox deleted the worktree/20260706-session-manager-window-title branch July 6, 2026 18:54
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