Name the agent tab for the backend it is actually running (#255) - #260
Merged
Conversation
A Main loop's tab strip said "Claude Code" whatever backend the loop had chosen, because `agentTabTitle` returned that string as a literal for the three attended loop types. Only `.timeBased` and `.goalBased` escaped it, and only because they name what the session is doing rather than what is doing it. The rule now returns `backend.displayName`, and moved from a private method on the view to a static one, so which name a tab gets is assertable without a window. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hEyiK8W9XW4Tq6je98kTX
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.
Fixes #255.
The bug
A Main loop's terminal tab was labelled Claude Code whatever backend the loop had actually been created with — Copilot CLI, Codex, or OpenCode.
Cause
LoopWorkspaceView.agentTabTitlereturned the string as a literal:.timeBased("Loop") and.goalBased("Goal") were unaffected only because they name what the session is doing rather than what is doing it — so the wrong name showed up on exactly the three attended types, Main among them.The pane header two rows below it was already correct (
store.node.backend.displayName.lowercased()), which is why the strip and the pane disagreed in the reporter's screenshot.The fix
Return
backend.displayName. The rule moved from a private method on the view to a static one taking(loopType, backend, launchesAgent), so which name a tab gets is assertable without a window — the previous shape could only have been caught by looking at it.Verification
xcodebuild testswiftlint lintswift format lint --strictNew
AgentTabTitleTestscovers all four backends on the attended types, both unattended types across every backend, and a plain shell pane.🤖 Generated with Claude Code
https://claude.ai/code/session_011hEyiK8W9XW4Tq6je98kTX