Skip to content

feat(native-chat): show an agent message's sender by its current title, clickable on the queued card too - #26357

Merged
brennanb2025 merged 11 commits into
mainfrom
brennanb2025/orchestration-sender-link
Oct 9, 2026
Merged

brennanb2025 merged 11 commits into
mainfrom
brennanb2025/orchestration-sender-link

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1172 $\color{#cf222e}{\Huge{\mathbf{−}}}$​41 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1131
Prod 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​399 $\color{#cf222e}{\Huge{\mathbf{−}}}$​132 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​267

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:

  • Messages from terminal CLI agents had a generic name. The host saved a terminal sender's name as its manual tab rename only, else its agent type, else nothing. It never used the title the tab actually shows. On 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.
  • A chat sender's name was the wrong one and never updated. It was saved once at send time, the worker's orchestration task title won over a name you gave the chat, and the chat's saved conversation name was skipped. Renaming the sender afterward changed nothing.
  • The queued card's name wasn't clickable. In the conversation, clicking the name opens that agent. On the card above the composer it was plain text.

What changed for you

Before After
A message from a terminal CLI agent "an agent", "Codex" or "Claude", unless you had renamed its tab The name its sidebar agent row shows: your rename, quick-command label, generated title (when that setting is on), or the real title the agent puts on its tab (not a status like "Codex ready"). Recorded when Orca delivers the message
A message from a chat Its tab rename or tab label Its rename, else the chat's saved conversation name
Renaming a chat sender after its message arrived No change The new name shows right away, in the conversation and on the queued card
A worker with no name of its own Its task title Its task title (unchanged)
Sender closed, on another computer, or not in this window The saved name The saved name, now chosen the same way as above
Clicking the name on the queued card Not clickable Opens that agent's chat or terminal, the same as clicking it in the conversation
Your own messages and cards Unchanged

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

  • One naming order on the host. The agent's own name first, then the worker's task title, then the agent's generic label.
    • A chat's own name: your rename, else its saved conversation name.
    • A terminal agent's own name: 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).
  • The host saves that name on the message (orchestrationSenderName), for when the sender is gone, for terminal senders, and for mobile.
  • The chat screen shows a chat sender's name live. useAgentMessageSenderLabel finds 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.
  • /clear needs nothing extra. Since Keep native chat /clear in the same conversation #26579, /clear keeps 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.
  • One component for both places. NativeChatAgentMessageSenders draws 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.
  • Older hosts: nothing new goes over the wire. The message's name field is unchanged; it just gets a better value.

Why this approach

  • Reusing the sidebar's and chat tab's resolvers keeps the chat and the sidebar from disagreeing about an agent's name, and keeps agent status text ("Codex ready", spinner titles) from becoming a name.
  • A saved name plus a live name for chats covers both cases. The saved name works with no window open, after a restart, or after the agent is gone. The live name follows renames.
  • Terminal names stay as recorded because a terminal tab is reused: following it live would relabel an old message with whatever runs in that tab later.
  • Own name before task title. You asked to see the name you know the agent by. The task title stays as the fallback for workers that have no name of their own.

Differences from the common pattern

  • The common pattern labels a message by the sender's live name and falls back when it's gone. The saved fallback name is Orca-specific (from feat(native-chat): show which agent a chat message is from, and open it #25888). Intended: Orca's workers are often short-lived, and once one is gone there's no live name left.
  • Terminal senders use the saved name only, not a live one. Intended: a terminal tab can be reused by a later conversation, so a live name could be wrong for an old message.

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: main at this PR's base 4f4f021f8a1; after: 5f143ebfede, whose terminal naming is identical to the final head). The terminal tab is titled "Fix the sender link".

Before After
"Message from an agent" before-terminal-sender "Message from Fix the sender link" after-terminal-sender

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 main fell back to "an agent"; for a detected agent main would say "Claude" or "Codex" instead, which is the 51/7 count above.

Chat sender renamed, and the queued card (before: main at 2460068883d; after: this PR's first commit c9743ce21e1). 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.

Before After
Sender renamed after its message arrived Still "Message from Parser worker" before-F1-renamed "Message from Lexer worker" after-F1-renamed
Queued card while the chat is busy "From Lexer worker" is plain text; the only controls are Steer, Delete and More before-card "From Lexer worker", and the name is a link after-F2-queued
Clicking the card's name Nothing to click Opens chat S (its tab is now active) after-F3-card-click

Testing

  • Host naming (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.
  • Live names (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.
  • Queued card (NativeChatAgentMessageRow.test.tsx): the names are buttons that open the sender; "+N" still counts; plain text when there's no chat to open from.
  • Final head e0c0f646b67 (after merging current main): 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 main merge; the merge removed this PR's own /clear handling (see How it works) and adopted main's new queued-card layout, and neither was re-run live.

  • I manually tested these changes locally
  • Automated tests added/updated

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 final main merge, because main now keeps a cleared chat in the same session; that code was removed.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer source was copied or translated.

Notes

  • SSH and paired hosts: the sender's name is chosen on the host the sender runs on, and the chat screen only looks up a live chat name on the receiving chat's own host. Clicking still asks that host to open the sender. Not run live over SSH: a Linux test host was prepared, but the test app had no way to use a separate SSH config, so it couldn't connect without my real one.
  • Windows: the change has no platform-specific code. The Windows test run stopped in its own setup before the app started, so there's no live Windows run. CI's Windows packaging passed; the WSL job was skipped.
  • Mobile: unchanged; it still shows the saved name, which is now the better one. Not run live: attaching the simulator view needs desktop automation I don't allow on this machine.
  • Older hosts: a newer screen talking to an older host keeps today's names; an older screen gets the better saved name.
  • Performance: each sender name reads a few store selectors that return a tab reference or a string, so a row re-renders only when its sender's name changes.

…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.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review summary

The 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 /clear, and the name opens the sender from both the conversation and the queued card.

Problems found in review, all fixed

  1. Terminal senders never used the title their tab actually shows, only a manual rename or the agent type. (in the PR)
  2. In a split terminal tab, a pane could be named by its neighbor's title, because the tab title belongs to whichever pane has focus. (in the PR)
  3. A name you gave the sender could lose to its task title. (in the PR)
  4. After /clear in a chat sender, its earlier messages lost the chat's name. (in the PR)
  5. Old terminal messages were relabeled live, so once a terminal tab was reused by a later conversation, old messages took the new conversation's name. Terminal names are now kept as recorded at delivery. (in the PR)
  6. The fix for 4 and 5 broke chat names when the screen talks to an older Orca host that doesn't send the new field. Older hosts now keep the existing direct lookup. (introduced during review)
  7. The same fix could look up a sender on the local computer when the chat lives on a remote host. Lookups and clicks now stay on the receiving chat's host. (introduced during review)
  8. Found by the live test, not by reading code: after /clear, both the old and the new conversation records claimed the chat's original id, so a received message fell back to its saved generic name. The host now works out which conversation currently owns the chat from its saved session records and publishes that on the existing status feed as soon as the clear is saved. (introduced during review, fixed in b738263f44d)

No open findings after the final focused reviews.

Verified

  • Unit tests and checks: targeted suites for host naming, live names, /clear publication, the queued card and sender clicks pass on b738263f44d, with the Node typecheck and the repo's static checks. CI is green on that head (20 passed, 17 skipped). The first CI attempt failed in a browser startup test this PR doesn't touch; the rerun passed.
  • Live on macOS (hidden isolated test copies of the app, stand-in agents, real Orca CLI, real pointer clicks):
    • Terminal sender, before (main at 4f4f021f8a1): "Message from an agent" for a CLI agent whose tab is titled "Fix the sender link". After (5f143ebfede, same terminal naming as the final head): "Message from Fix the sender link". Clicking opens that terminal in both.
    • Chat sender rename and the clickable queued card: before/after on main vs this PR's first commit.
    • /clear on the final head: right after /clear the old message keeps the chat's name and opens the chat's new conversation; after another rename, both old and new messages show the new name and each opens the current conversation.
    • Screenshots are in the PR body.

Not verified

  • Terminal queued card live: the terminal sender's message waiting on a busy chat wasn't captured live (two tries missed the window). Covered by unit tests and the chat queued-card run.
  • Windows: no live run; the Windows test setup stopped before the app started. CI's Windows packaging passed and the WSL job was skipped, which isn't a pass.
  • SSH / paired host: no live run; a Linux test host was prepared, but the test app had no way to use a separate SSH config, so it couldn't connect without my real one.
  • Mobile: not attempted; attaching the simulator view needs desktop automation I don't allow on this machine. Mobile behavior is unchanged apart from getting the better saved name.
  • Real model providers, Linux desktop, and the dark theme weren't run live.

Known limits (intended)

  • A terminal sender's name is recorded when Orca delivers the message to the chat. If the terminal is renamed or restarted between the send and the delivery, the later name is used. Clicking opens that terminal tab as it is now, which may hold a later conversation.
  • Against an older Orca host, chat names still work but don't follow /clear.

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.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 9, 2026 03:17
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: defd4c3c-6d8c-4db3-8626-756ef05739d9
📥 Commits

Reviewing files that changed from the base of the PR and between b738263 and e0c0f64.

📒 Files selected for processing (14)
  • src/renderer/src/components/native-chat/NativeChatAgentMessageSenders.test.tsx
  • 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/components/native-chat/native-chat-agent-message-sender-host.test.tsx
  • src/renderer/src/components/native-chat/native-chat-agent-message-sender-identity.test.tsx
  • src/renderer/src/components/native-chat/native-chat-agent-message-sender-label.ts
  • 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
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/i18n/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

Runtime 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 e0c0f

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)

Check name Status Explanation Resolution
Docstring Coverage Warning 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:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main changes: showing current sender titles and making queued-card sender names clickable.
Description check Passed The description is detailed and covers the user impact, implementation, rationale, linked-issue exception, visual proof, testing, review notes, compatibility considerations, and known test limitations…
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…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
@brennanb2025
brennanb2025 merged commit 55d348d into main Oct 9, 2026
30 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/orchestration-sender-link branch October 9, 2026 23:02
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.

1 participant