Skip to content

Add dynamic window title (#293)#297

Merged
sbertix merged 1 commit into
mainfrom
supacode/293-window-title
May 5, 2026
Merged

Add dynamic window title (#293)#297
sbertix merged 1 commit into
mainfrom
supacode/293-window-title

Conversation

@sbertix
Copy link
Copy Markdown
Collaborator

@sbertix sbertix commented May 5, 2026

Summary

  • Sets .navigationTitle() on the main content view from the current sidebar selection, so window-tracking tools (Toggl etc.) can attribute time per repo/tab. Closes Feature Request: Change window title based on active repository/folder #293.
  • Worktree selected → <repo> · <tab> (or just <repo> when no tab title yet). Archived view → Archive. Nothing selected → Supacode.
  • Tab titles are stripped of control characters before joining to keep an embedded \n from silently truncating NSWindow.title.
  • The Window scene title and the ⌘0 menu item are untouched.

Test plan

  • make build-app
  • make check (format + lint)
  • make test — 1032 tests pass, including 14 new WindowTitleTests covering format, sanitize, and the compute branches (archived, no-selection, unknown worktree, custom-title precedence, whitespace-only custom title, repo-name fallback)
  • Manual smoke: title updates when switching between worktrees, when entering/leaving the Archived view, and when a tab emits OSC 0/2 (printf '\033]0;new\007') mid-session

Closes #293

Sets the macOS navigationTitle from the current selection so window-tracking tools like Toggl can attribute time per repo/tab. Worktree → "<repo> · <tab>" (or just "<repo>"), archived view → "Archive", nothing selected → "Supacode". The Window scene title and the ⌘0 menu item are unchanged. Tab titles are stripped of control characters before joining to prevent embedded "\n" from silently truncating NSWindow.title.
@sbertix sbertix enabled auto-merge (squash) May 5, 2026 21:48
@sbertix sbertix merged commit 028ef41 into main May 5, 2026
2 checks passed
@sbertix sbertix deleted the supacode/293-window-title branch May 5, 2026 21:51
@tuist
Copy link
Copy Markdown

tuist Bot commented May 6, 2026

🛠️ Tuist Run Report 🛠️

Builds 🔨

Scheme Status Duration Commit
supacode 1m 14s 5430aa528

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.

Feature Request: Change window title based on active repository/folder

1 participant