Skip to content

Show messages between agents as cards with the other agent's status - #34824

Merged
brennanb2025 merged 24 commits into
mainfrom
brennanb2025/agent-message-cards
Oct 29, 2026
Merged

brennanb2025 merged 24 commits into
mainfrom
brennanb2025/agent-message-cards

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1556 $\color{#cf222e}{\Huge{\mathbf{−}}}$​30 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1526
Prod 20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1121 $\color{#cf222e}{\Huge{\mathbf{−}}}$​123 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​998

Agent tasks currently put Orca's instructions before the actual task, while messages from other agents use a plain attributed row. This change gives those messages a readable card with the sender's current sidebar icon and status, name, arrival time, and a measured three-line preview with Show more/less.

The heading distinguishes “Task from your coordinator”, “Message from your coordinator”, and “Update from your worker”. Missing, mixed or unrelated relationship evidence uses “Message from”. Sender names keep the existing navigation behavior, including when live status is unavailable.

Task cards derive the exact current task suffix using the existing dispatch grammar. The full original input remains in provider requests, stored messages, status identity, queued editors, and raw readers. Unrecognized or unsupported content keeps its existing fallback; paragraph spacing and attachments remain intact. Copy on the card uses the displayed text and stays available while folded, with the normal hover, keyboard-focus and touch behavior.

Sender relationships are optional delivery-time evidence of the immediate creator, so historical mail does not guess from current lineage or Run depth. Missing or malformed evidence stays generic and never gates delivery. Live glyphs use the existing sidebar authority through shared workspace observation with selected equality and subscription-owned cleanup.

Compatibility and scope

There is no saved body copy, prefix fingerprint, new capability requirement or minimum server version. Older readers can ignore the optional relationship metadata. Current clients can recognize existing task provenance and dispatch grammar from older hosts; otherwise they preserve the existing text fallback. Shared desktop and phone queue/edit contracts retain canonical input.

This PR ships usable desktop cards alone. Worker-start cards and the phone card view are later planned changes. Trimming the existing mail wrapper follows #28567.

Validation

Full review path completed through finding-specific source, reference, performance and readiness checks. CI 40879716513 passed on reviewed head 38b4c3b18980a39d3b2644e1f570efb78d885a3d. Applicable named results total 19 root files / 236 completed passes (including all five shared-fixture importers, the full composer and real CLI contracts), plus 3 mobile files / 32 completed passes.

Six card scenes, 12 focus captures and 50 browser assertions passed at production head 4072e02772c1f322c8325d825a1115bacd90568f. The subsequent commit changes only the Card Copy-state test, so the appearance and interaction evidence carries. The bounded delayed-image investigation found no failing input; its remaining conditional concern is deferred, without a claim of universal refutation.

The normal configured changed-file hook passed over all 33 PR files in a0969d59e5646da184b9bae26eb1121f8eb0f1db..38b4c3b18980a39d3b2644e1f570efb78d885a3d, including every task and applying modifications. All 14 execution receipts were byte/hash verified.

Wide card states, light theme

Narrow card states, dark theme

Narrow card states, light theme

Expanded card states, dark theme

Expanded card states, light theme

@brennanb2025
brennanb2025 marked this pull request as ready for review October 28, 2026 06:40
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 062f1d48-fbb7-48f8-a8bc-53cd0800b206
Commits

Reviewing files that changed from the base of the PR and between 5fd4453 and 907615d.

Files selected for processing: 6
  • mobile/src/session/mobile-structured-queued-message-cards.test.ts
  • mobile/src/session/mobile-structured-queued-message-cards.ts
  • src/main/runtime/orchestration/structured-mail-source.test.ts
  • src/renderer/src/components/native-chat/NativeChatAgentMessageCard.test.tsx
  • src/renderer/src/components/native-chat/native-chat-agent-message-sender-index.test.tsx
  • src/renderer/src/components/native-chat/native-chat-agent-message-sender-source.test.tsx

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

The changes add sender-relation metadata derived from orchestration lineage and task-body extraction from recognized dispatch preambles. Queued cards use task display text while retaining the full message text. Native chat renders sourced messages as agent message cards with sender details, Markdown, attachments, copy controls, and expandable content. Tests cover relation lookup, queued-message editing and delivery, task display projections, and sender presentation.

Priority: Normal

Merge Risk: Minimal · up to 90761

The previously reported lint failure is fixed, and no remaining issue in these changes prevents merging after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the primary change: agent-to-agent messages now appear as cards that show the other agent's status.
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.
Description check Passed PASS: The description clearly explains the user-facing change, implementation approach, compatibility, scope, validation, and visual results. It includes linked issue reference #28567, testing evidenc…
Full details: Description check

Explanation

PASS: The description clearly explains the user-facing change, implementation approach, compatibility, scope, validation, and visual results. It includes linked issue reference #28567, testing evidence, and UI screenshots. It does not reproduce every template heading or checklist item, but the required information is substantially present.

Full details: Docstring Coverage

Explanation

Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 39 functions across 34 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4b286fce-3b27-41d6-b510-32d33e284453
Commits

Reviewing files that changed from the base of the PR and between 55f8a8d and 48c428c.

Files selected for processing: 26
  • src/main/runtime/orchestration/agent-message-relation.ts
  • src/main/runtime/orchestration/dispatch-task-source.ts
  • src/main/runtime/orchestration/preamble.test.ts
  • src/main/runtime/orchestration/preamble.ts
  • src/main/runtime/orchestration/structured-mail-source.test.ts
  • src/main/runtime/orchestration/structured-mail-source.ts
  • src/main/runtime/rpc/methods/orchestration-structured-worker-start-deadline.test.ts
  • src/main/runtime/rpc/methods/orchestration-structured-worker-start-failure.test.ts
  • src/main/runtime/rpc/methods/orchestration/runs/dispatch-methods.ts
  • src/main/runtime/rpc/methods/orchestration/worker/deliver-worker-dispatch-preamble.ts
  • src/renderer/src/components/native-chat/NativeChatAgentMessageCard.test.tsx
  • src/renderer/src/components/native-chat/NativeChatAgentMessageCard.tsx
  • src/renderer/src/components/native-chat/NativeChatAgentMessageSenders.test.tsx
  • src/renderer/src/components/native-chat/NativeChatAgentMessageSenders.tsx
  • src/renderer/src/components/native-chat/NativeChatUserMessageRow.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/components/native-chat/native-chat-agent-message-sender-view.ts
  • src/renderer/src/components/native-chat/native-chat-message-copy-text.ts
  • src/shared/agent-session/agent-message-display-text.ts
  • src/shared/agent-session/agent-session-message-source.test.ts
  • src/shared/agent-session/agent-session-message-source.ts
  • src/shared/structured-agent-session-latest-request.test.ts
  • src/shared/structured-agent-session-latest-request.ts
  • src/shared/structured-agent-session-projection.ts
  • src/shared/structured-agent-session-queued-cards.ts

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1dd5b3ec-2109-4a33-970f-fe6da2486242
Commits

Reviewing files that changed from the base of the PR and between 48c428c and 87dc704.

Files selected for processing: 30
  • mobile/src/session/mobile-agent-message-attribution.test.ts
  • mobile/src/session/mobile-structured-queued-message-cards.test.ts
  • mobile/src/session/use-mobile-structured-queued-edit.test.tsx
  • src/main/native-chat/agent-session-wire/structured-agent-session-queued-message-rig.test-fixture.ts
  • src/main/runtime/orchestration/agent-message-relation.ts
  • src/main/runtime/orchestration/dispatch-task-source.ts
  • src/main/runtime/orchestration/preamble.test.ts
  • src/main/runtime/orchestration/structured-mail-source.test.ts
  • src/main/runtime/orchestration/structured-mail-source.ts
  • src/main/runtime/orchestration/structured-mailbox-pointer-delivery.test.ts
  • src/main/runtime/rpc/methods/orchestration/agent-message-command-contract.test.ts
  • src/renderer/src/components/native-chat/NativeChatAgentMessageCard.fixture.tsx
  • src/renderer/src/components/native-chat/NativeChatAgentMessageCard.test.tsx
  • src/renderer/src/components/native-chat/NativeChatAgentMessageCard.tsx
  • src/renderer/src/components/native-chat/NativeChatAgentMessageRow.test.tsx
  • src/renderer/src/components/native-chat/NativeChatAgentMessageSenders.test.tsx
  • src/renderer/src/components/native-chat/NativeChatAgentMessageSenders.tsx
  • src/renderer/src/components/native-chat/NativeChatQueuedMessageEditor.test.tsx
  • src/renderer/src/components/native-chat/native-chat-agent-message-sender-label.ts
  • src/renderer/src/components/native-chat/native-chat-agent-message-sender-source.test.tsx
  • src/renderer/src/components/native-chat/native-chat-agent-message-sender-source.ts
  • src/renderer/src/components/native-chat/native-chat-agent-message-sender-view.ts
  • src/renderer/src/components/native-chat/native-chat-message-copy-text.ts
  • src/shared/agent-session/agent-message-display-text.test.ts
  • src/shared/agent-session/agent-message-display-text.ts
  • src/shared/agent-session/agent-message-presentation.ts
  • src/shared/agent-session/agent-session-message-source.test.ts
  • src/shared/agent-session/agent-session-message-source.ts
  • src/shared/orca-dispatch-status-prompt.ts
  • src/shared/structured-agent-session-queued-cards.ts
Files skipped from review as they are similar to previous changes: 1
  • src/shared/agent-session/agent-session-message-source.test.ts

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

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with two non-blocking card issues still open from the previous review.

Findings

  1. P2 Rewind button disappears ▶
  2. P2 Loaded content stays clipped ▶

Summary

Adds desktop cards for messages between agents, with sender names, live status, arrival time, and expandable previews.

  • Messages from other agents appear as readable cards with sender details.
  • Mail cards name the sender's coordinator or worker relationship when it is known.
  • Task cards show the task text while keeping the original input intact.

Reviews (7) · Last reviewed commit: "Reuse active copy control in card workfl..." · Reviewed by Greptile

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Agent tasks exposed provider instructions in chat, and agent mail used the old attributed row. The new cards show task text, sender identity and live status, arrival time, and a three-line preview with Show more/less. Sender names keep their existing navigation. Stored text, provider input and queued editors retain the full original message. A changed Save keeps the existing user-authorship behavior; a no-op Save retains attribution.

Six review rounds repaired task/status identity, coordinator/worker attribution, accessible sender controls, complete progress indicators, bounded observation, Markdown/Copy behavior and collapsed-preview focus restoration. This desktop change works independently. Worker-start cards and the phone card view remain later cuts; mail-wrapper trimming follows #28567.

Reviewed head: 38b4c3b18980a39d3b2644e1f570efb78d885a3d. CI 40879716513 passed, including compiler, lint, quality and catalog/extraction checks. Applicable named results total 19 root files / 236 completed passes and 3 mobile files / 32 completed passes. The root count combines 229 passes from 18 unchanged files at 4072e027 and the current Card 7/7 in CI shard 10. The root total includes all 67 shared-fixture importer cases, with the full composer, and both real CLI cases. The CLI proof reaches the legitimate post-edit wake and exact provider handoff. Mobile's 26 test declarations expand to 32 executions.

The mobile cases, six scene comparisons, 12 focus captures and 50 browser-fixture assertions passed at production head 4072e02772c1f322c8325d825a1115bacd90568f. The subsequent 38b4c3b1 commit changes only the Card Copy-state test, so this appearance and interaction evidence carries. Coverage includes both themes, wide/narrow layouts, expansion, native Copy and focus interactions. Payload lengths and hashes were verified. That run's process/configuration cleanup remains report-backed.

The late-image concern is deferred after one bounded investigation. Twelve genuine delayed-image inputs all gained or retained “Show more”; none reached the exact already-capped/no-overflow starting geometry in the claim. This does not prove the concern impossible. No production workaround was added. The probe's separate exported process, listener and configuration cleanup receipts were independently verified.

The unchanged configured hook passed over all 33 PR files in a0969d59e5646da184b9bae26eb1121f8eb0f1db..38b4c3b18980a39d3b2644e1f570efb78d885a3d, including every task and applying modifications. All 14 execution receipts were byte/hash verified; before/after staged diffs and configuration hashes were unchanged.

For Brennan’s review:

Wide card states, dark theme

Wide card states, light theme

Narrow card states, dark theme

Narrow card states, light theme

Expanded card states, dark theme

Expanded card states, light theme

Additional focus proof: wide restored preview, narrow restored preview.

@brennanb2025
brennanb2025 merged commit 7321b06 into main Oct 29, 2026
50 checks passed
brz-anderson pushed a commit to brz-anderson/brza-studio that referenced this pull request Oct 30, 2026
…tablyai#34824)

* Snapshot agent message relations and verify task display prefixes

* Show native chat agent messages in navigable cards

* Keep agent message cards derived from canonical input and sidebar state

* test: correct agent card contracts and cover raw queue editing

* test: repair agent card runtime and operation contracts

* fix: preserve queued image previews and typed test measurements

* fix: use checked worker fixture and owned sender button typography

* fix: complete agent card fixtures and native presentation

* test: preserve queued edit exports and current authorship

* test: use namespace type imports in queued edit fixture

* Preserve sender progress and consolidate card contracts

* Simplify sender and notice contract instrumentation

* Remove duplicate sender and notice measurement mirrors

* Use a template literal for the dispatch boundary fixture

* Correct sender and notice verification phase accounting

* Consolidate agent message tests around user contracts

* Restore folded agent message preview on focus exit

* Consolidate agent message regression coverage

* Consolidate agent message fixture data

* Fix display text test lint diagnostics

* Use conversation view type for mail test records

* Reuse active copy control in card workflow test
(cherry picked from commit 7321b06)

BrzA: the card also draws a Claude Code peer (PLN-001/P63). Its heading reads "Hand-back
from" for a subagent report and its sender name stays plain text; mobile reads the same.
The queue keeps BrzA's older projection with the task display text ported onto it, and
the agent-message-display-text import follows native-chat-prose where it lives here. Left
out, as they need the newer queue editing: the raw-task composer test, its queued-edit
fixture, the agent-message command contract test and the queued-edit cases in the mobile
test and the main rig fixture. The card's scale case counts two enumerations, not three:
BrzA has no visible-authority acquisition. Brought in: native-chat-tooltip-test-harness.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
brz-anderson added a commit to brz-anderson/brza-studio that referenced this pull request Nov 2, 2026
v1.4.246 takes Chat UI out of Experimental (stablyai#36110). 1554 upstream
commits over the fork's last sync (c98a2d6); 404 files conflicted.

Resolution
- Rebrand-only hunks (1393 in 195 files): upstream's text with the same
  Orca -> BrzA Studio rewrite the fork had applied there.
- Locale catalogs: merged key by key; where both sides changed a key,
  upstream's text. The repo-wide rebrand of new upstream copy follows in
  its own commit.
- Upstream-deleted files the fork had only rebranded: deleted. The
  coexistence cases of the deleted identity tests move to brza/ tests;
  the account-switch notice cases to native-chat/brza/.
- stablyai#34824 (agent message card), cherry-picked earlier: upstream's version;
  the fork's Claude Code peer reader, hand-back heading and sender click
  ride on top of it.

Fork features against new upstream
- Continue in another account (P40) gives way to upstream's
  NativeChatUsageLimitActions (stablyai#31241); Resume automatically stays.
- The per-chat account switch (P36) stays beside upstream's global switch
  (stablyai#30955): a pinned chat launches, and lists models, on its pinned
  account, and the switch drops the old account's acquisition receipt.
- Match Terminal follows what the terminal shows, the chat theme when the
  terminal follows it; plugin terminal themes are offered as chat themes.
- Islands Dark becomes useMonacoTheme's fallback for every surface.
- New Orca identity copies: Windows protocol registration uses the brand
  scheme; brza-studio://plugins links are accepted beside orca://.
- The Windows uninstaller no longer removes agent hooks: BrzA's app GUID
  hides an installed upstream Orca from ORCA_OTHER_INSTALL_STATE, and the
  hooks under ~/.orca are shared with it.
- Files pushed past max-lines split into brza/ or sibling modules.

Committed without the pre-commit hook: lint-staged over the merge's 18k
files is killed. The lint and rebrand fixes follow in their own commits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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