Repository navigation
fix(tab-bar): native chat tabs show their recorded provider, not one guessed from the title - #28082
Conversation
…guessed from the title A native chat was rendered as a fake terminal tab, so its conversation name went through terminal agent detection and could replace the chat's provider once a turn finished (a Codex chat named after Hermes showed Hermes). SortableTab now takes the agent as a prop: terminal tabs resolve it through TerminalSortableTab (useTabAgent, unchanged), and native chat tabs pass the provider recorded on the tab. The chat's session id and provider reach the session-history menu together instead of riding on a terminal launch hint. STA-10347
…-native-codex-chat-is-misidentified-as-hermes-when-its # Conflicts: # src/renderer/src/components/tab-bar/tab-session-history-switch.test.ts # src/renderer/src/components/tab-bar/tab-session-history-switch.ts
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No actionable issue remains from this review; the change is mergeable after normal checks. Pre-merge checks ·
|
…-native-codex-chat-is-misidentified-as-hermes-when-its
|
A native Codex chat titled with another agent's name could show that agent's tab icon and hover label after a turn finished or the window reloaded. The tab was guessing the agent from the conversation title. This PR uses the provider recorded on the chat, so its tab, hover card, and drag preview continue to show Codex regardless of the title or turn state. Terminal tabs keep their existing live agent detection. Review found no PR-caused issue to fix or defer. The branch was synced once with current CI is blocked by an unrelated |
…guessed from the title (stablyai#28082) A native chat was rendered as a fake terminal tab, so its conversation name went through terminal agent detection and could replace the chat's provider once a turn finished (a Codex chat named after Hermes showed Hermes). SortableTab now takes the agent as a prop: terminal tabs resolve it through TerminalSortableTab (useTabAgent, unchanged), and native chat tabs pass the provider recorded on the tab. The chat's session id and provider reach the session-history menu together instead of riding on a terminal launch hint. STA-10347 (cherry picked from commit 09ae6d2)
…guessed from the title (#28082) A native chat was rendered as a fake terminal tab, so its conversation name went through terminal agent detection and could replace the chat's provider once a turn finished (a Codex chat named after Hermes showed Hermes). SortableTab now takes the agent as a prop: terminal tabs resolve it through TerminalSortableTab (useTabAgent, unchanged), and native chat tabs pass the provider recorded on the tab. The chat's session id and provider reach the session-history menu together instead of riding on a terminal launch hint. STA-10347 (cherry picked from commit 09ae6d2)
ELI5
A native Codex chat whose conversation name mentions another agent, for example "Hermes automation deprecation", showed that other agent's icon on its tab once a turn finished. The chat already knows which agent it is: Orca records the provider when the chat is created. The tab bar ignored that record and guessed from the conversation name instead. Now the tab uses the recorded provider, so the icon never changes with the chat's name or turn state.
What Changed
Before: a native chat tab could show Hermes, OpenCode, Grok or Claude instead of Codex whenever its conversation name mentioned that agent. While Codex was working, the live status hid the problem. Once the turn finished, or after a restore, the name took over. The drag preview and the tab's hover card showed the same wrong agent.
After: a native chat tab always shows its own provider's icon in the tab, the hover card and the drag preview, whatever the chat is called and whatever state the turn is in. Terminal tabs behave exactly as before.
Mechanism: the tab bar used to dress a native chat up as a fake terminal tab, with the conversation name as the terminal title and the provider passed as a terminal launch hint. The shared tab component then ran the terminal logic that works out which agent is in a terminal, and that logic lets a title override a finished turn. Now:
SortableTab) no longer works out identity itself. It takes the agent as a prop.TerminalSortableTab) that runs the existing terminal logic (useTabAgent) unchanged.agentSessionAgent) and no longer build a fake terminal tab.nativeChat).Why
A chat cannot change provider, so its identity is a recorded fact and doesn't need inferring. The common pattern is to draw a conversation's icon from the provider stored on the conversation and never from its title, and this follows it. The alternative was to tighten the terminal title rules so a mention doesn't count, but that would only reduce guessing for something we already know. It would also leave chats exposed to every future change in terminal identity logic.
This PR deliberately leaves terminal identity alone. Terminal tabs can still be mislabelled when their title mentions another agent. That is a separate, known problem with its own tickets and an open PR (#26615), and it is out of scope here.
If a chat tab has no recorded provider, it now shows the generic icon instead of guessing from its name.
Linked Issue
Linear STA-10347 (also covers STA-10162, the same bug with OpenCode in the name).
Visual Proof
The same real native Codex chat, after Codex named it "Hermes Automation Deprecation Planning" and its turn finished. It was recorded in a hidden dev build, first with
main's tab code and then with this branch's code. The workspace sidebar shows Codex in both.main)After a full window reload, the tab still shows Codex:
Testing
New tests in
TabBarItemRow.test.tsx: a Codex chat named "Hermes automation deprecation", "Claude Code review", "Review Grok usage" or "OpenCode launch-flow design" renders withcodexas its agent, and passes its session id and provider to the menu. A chat with no recorded provider renders with no agent. These tests fail onmain.Existing tab-bar, terminal-pane resume, session-history switch and
useTabAgentsuites pass (82 files, 763 tests). Tests that rendered the tab component directly now pass the agent explicitly.orca-ci-checks(lint, code quality, localization, typecheck) passes.Live check on macOS (hidden dev build): created a real native Codex chat with the prompt "We are planning the Hermes automation deprecation", let the turn finish, and recorded the tab before and after the change and after a window reload (screenshots above). The before state matches the report: Hermes icon and hover card while the sidebar says Codex.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
agentSessionAgent). No wire or protocol change.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)