Repository navigation
Conversation
Contributor
Author
|
Not needed: Claude already sets the tab title on /rename and on resume, and #475 keeps it across restarts. Stuck tabs fix themselves after one /rename or resume. |
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.
What this does
Claude tabs now show the conversation's topic instead of the folder path. Claude saves every session's title (your
/rename, or the one it generates) in its transcript, but it often never sends it to the terminal, especially after--resume. Programa now reads that title from the transcript when Claude starts a session, takes a prompt, or finishes a turn.Summary
Sources/ClaudeTranscriptTitle.swift: reads the last 512 KB of the transcript and returns the newestcustom-title, else the newestai-title. Compiled into the app and the CLI so it can be unit tested.CLI/CLI+AgentSessionTitle.swift+ 3 call lines inCLI/CLI+Hooks.swift: Claude's session-start, prompt-submit and stop hooks send the title. Best effort, never fails the hook. Sent every time because the app forgets live titles on restart.surface.report_agent_title(contract-first, off-main like the otherreport_*telemetry, length-capped).Workspace.applyAgentTitle: sets the panel's live title, then reuses the restored-title hold from fix: keep restored tab titles until the terminal sends a real one #475 so the shell's cwd, the resume command line and the plain "Claude Code" title don't replace it. Any other real terminal title still does, and a manual rename still wins.Review order:
Workspace+SidebarTelemetry.swift, thenClaudeTranscriptTitle.swift, then the CLI glue; the rest is contract and wiring.Known tradeoff: after Claude exits, the tab keeps the topic until something other than a cwd title arrives, same as a restored title.
Test Plan
ClaudeTranscriptTitleTests(7 tests) and two newWorkspaceUnitTestscases/renamein Claude updates the tab on the next prompt