Repository navigation
feat(native-chat): show an agent message's sender by its current title, clickable on the queued card too - #26357
Conversation
…open it from the queued card The sender line on another agent's message and on its queued card now shows the name Orca shows for that agent right now (its sidebar agent row or chat tab name), falling back to the name recorded when it was sent. The queued card's names open the sender, as the transcript row's already do.
…t just its agent A terminal agent's recorded sender name used only a manual tab rename, else the agent type, so mail from CLI agents read as "Codex" or "Claude". The host now names every sender the way Orca shows it: a chat by its rename or saved name, a terminal agent by its sidebar agent row's name (rename, quick command, generated or meaningful live title; a split pane only by its own title). The task title and generic agent label are fallbacks. The renderer shows the live own name, else the recorded one.
…ation-sender-link
Review summaryThe problem: a message from another agent in native chat named its sender badly. Terminal CLI agents showed as "an agent", "Codex" or "Claude" even when their tab had a real title; chat senders showed a stale or task name that never followed renames; and the sender's name on the queued card couldn't be clicked. What's different for you: the message shows the name Orca shows for that agent (chat name or terminal tab title), chat sender names follow renames and Problems found in review, all fixed
No open findings after the final focused reviews. Verified
Not verified
Known limits (intended)
Test apps ran with their own home, profile and agent folders, and every test process was stopped by its recorded process id. My real agent hook settings were unchanged before and after each run. No merge or auto-merge. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (14)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughRuntime sender naming now uses chat names, agent-status rows, generated-title settings, and tracked or split-pane titles. Renderer sender lookup and structured-session activation accept runtime targets and use execution-host identity to select tabs and route calls. Native-chat sender labels can use current chat-tab names and link to senders when a worktree is available. Queued-message cards now use the shared sender component, and localized sender prefixes no longer include sender-name interpolation. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue was established for sender labels or queued-card links. The change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)Full details: Docstring CoverageExplanation Docstring coverage is 34.85% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 66 functions across 39 files. (6 skipped: 6 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ation-sender-link # Conflicts: # src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts # src/main/native-chat/agent-session-wire/structured-conversation-command.ts # src/renderer/src/components/native-chat/NativeChatQueuedMessageCard.tsx # src/renderer/src/components/native-chat/NativeChatQueuedMessageList.test.tsx # src/renderer/src/components/native-chat/NativeChatQueuedMessageList.tsx # src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx # src/renderer/src/i18n/locales/en.json # src/renderer/src/i18n/locales/es.json # src/renderer/src/i18n/locales/fr.json # src/renderer/src/i18n/locales/ja.json # src/renderer/src/i18n/locales/ko.json # src/renderer/src/i18n/locales/zh.json
Main's #26579 keeps a native chat in the same session across /clear, so a message's sender id still names the live chat. Remove the host's orchestration-root projection, the optional status field, and the renderer's lineage lookup and feed capability probe that only served it.
…ation-sender-link # Conflicts: # src/renderer/src/components/native-chat/NativeChatQueuedMessageCard.tsx
ELI5
When another agent sends a message into your native chat, the chat says who it's from. That name is now the one Orca shows for that agent (its chat name, or the title of its terminal tab) instead of "an agent", "Codex" or "Claude". You can click it on the waiting (queued) card too, not just in the conversation. A chat sender's name keeps following that chat after you rename it.
The problem
Since #25888, a message from another agent through Orca orchestration shows "Message from name" in the conversation, and "From name" on its queued card while the chat is busy. Three things were off:
main, a CLI agent in a tab titled "Fix the sender link" shows up as "Message from an agent" (screenshot below). In one day of real use on my machine, terminal senders were recorded as "Codex" 51 times, "Claude" 7 times and with no name once.What changed for you
A terminal sender's name is not live: an old message keeps the name recorded when it was delivered, because that terminal tab may later hold a different conversation.
How it works
getAgentRowConversationName, the sidebar agent row's own resolver, run over the host's copy of the sender's tab. It only uses a title when the pane's agent matches the sender, and in a split tab a pane is named only by its own title (the tab title belongs to whichever pane has focus).orchestrationSenderName), for when the sender is gone, for terminal senders, and for mobile.useAgentMessageSenderLabelfinds the sender's chat tab in this window and uses its rename or conversation name, else the saved name. It looks only on the receiving chat's own host, so a chat with the same id on another computer is never used./clearneeds nothing extra. Since Keep native chat /clear in the same conversation #26579,/clearkeeps a chat in the same conversation and session id, so a message that names the sender's id still finds the same chat, with its current name.NativeChatAgentMessageSendersdraws the conversation line ("Message from") and the queued card line ("From"), so the card gets the same clickable names, "+N", and plain text for senders that can't be opened from here.namefield is unchanged; it just gets a better value.Why this approach
Differences from the common pattern
Linked Issue
N/A: maintainer change, no issue.
Visual Proof
All runs: macOS, hidden isolated test copies of the app, native Codex chats on a stand-in model, and a stand-in CLI agent in a real terminal tab that sends with Orca's CLI. Clicks were pointer clicks on the rendered page.
Terminal CLI agent sender (before:
mainat this PR's base4f4f021f8a1; after:5f143ebfede, whose terminal naming is identical to the final head). The terminal tab is titled "Fix the sender link".In both, clicking the name opened that terminal tab (after: destination). In the before run Orca didn't detect the stand-in as a Claude agent (its tab has a plain terminal icon), so
mainfell back to "an agent"; for a detected agentmainwould say "Claude" or "Codex" instead, which is the 51/7 count above.Chat sender renamed, and the queued card (before:
mainat2460068883d; after: this PR's first commitc9743ce21e1). Chat S ("Parser worker") messaged chat R, was then renamed "Lexer worker", and R was kept busy so a second message waited as a queued card.Testing
runtime-orchestration-sender-names.test.ts): a terminal agent by its tab's real title, not a status like "Codex ready"; a generated title only when that setting is on; a split pane never by its neighbor's title; a rename before the task title, and the task title when there's no own name; a chat by its saved conversation name.NativeChatAgentMessageSenders.test.tsx,native-chat-agent-message-sender-host.test.tsx,native-chat-agent-message-sender-identity.test.tsx): a chat's own name and a rename after arrival; the saved name for terminal senders and senders not in this window; names and clicks stay on the receiving chat's host; an older host's lookup stays on that host.NativeChatAgentMessageRow.test.tsx): the names are buttons that open the sender; "+N" still counts; plain text when there's no chat to open from.e0c0f646b67(after merging currentmain): the targeted suites, the Node and web typechecks and the repo's static checks pass locally.Live check (macOS): every row in Visual Proof passed. Not run live: Windows, Linux, an SSH or paired host, and mobile (see Notes), a real model provider, and the dark theme. The terminal queued card (a terminal sender's message waiting while the chat is busy) wasn't captured live; unit tests and the chat queued-card run above cover it. The live runs were on heads before the final
mainmerge; the merge removed this PR's own/clearhandling (see How it works) and adoptedmain's new queued-card layout, and neither was re-run live.Review
Reviewed for correctness, architecture, performance and compatibility; eight problems were found and fixed along the way. Details are in the review comment. Two of them (4 and 8, about
/clear) are moot after the finalmainmerge, becausemainnow keeps a cleared chat in the same session; that code was removed.Agent skill upstream boundary
Notes