Skip to content

Show agent message cards in phone chats - #36162

Merged
brennanb2025 merged 53 commits into
mainfrom
brennanb2025/agent-phone-cards
Nov 1, 2026
Merged

brennanb2025 merged 53 commits into
mainfrom
brennanb2025/agent-phone-cards

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1278 $\color{#cf222e}{\Huge{\mathbf{−}}}$​86 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1192
Prod 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​980 $\color{#cf222e}{\Huge{\mathbf{−}}}$​113 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​867

Agent messages on the phone currently appear as plain attribution rows. This PR gives them the cards already used on desktop: sender name and arrow, agent icon and available live status, relation heading, timestamp, Copy, and a body folded after three rendered lines. It includes Started worker cards as well as tasks and messages from other agents.

Tapping a sender uses the same opening policy as desktop. Saved native chats open on the phone, including closed Claude and Codex chats, while the desktop keeps its current view. Terminal senders open their terminal on the phone. The phone uses the existing compatibility path on older paired hosts and shows one translated notice when a target cannot open.

This is the phone follow-up tracked in #34824 and #35263. It is stacked on #36315 and can merge only after that foundation. Plan: agent-message-cards, PR 3 — phone. The shared card presentation rules stay unchanged; this PR adds the native phone view and its sender-arrow adapter. No saved field or wire shape is added here.

Intended: the phone shows a live glyph only for a sender its current workspace's session tabs know. Missing status does not prevent opening the sender. Header Copy and the fold-only footer match desktop; a short card reserves no footer. Messages without sender provenance keep their current presentation. A proven missing terminal uses desktop's existing pane-unavailable notice, translated through the phone's message mapper.

Temporary: the phone still uses its legacy sender index. Restart, /clear, reopened workers and dispatch senders can miss live identity until the phone consumes the host-published associations from #36660. That integration, including phone publication delivery and the saved-kind icon fallback from #36653 if it has not landed by final sync, is tracked in STA-13207. Opening senders on another computer remains tracked in STA-12948.

Review used the full path for phone/server compatibility and asynchronous navigation. The final source review and reference comparison are complete. CI is green on 52c5d56. The mobile tests cover fold measurement and the image-only case, the faded fold edge and queue extraction, Copy/Select, sender routing and older-host failures, Started cards and answered receipts, and scoped updates at 10 and 100 consumers.

On an iPhone simulator, both closed Claude and Codex senders reopened from their actual card arrows, preserved their conversations, and returned real follow-up replies while desktop stayed on its selected workspace and tab. Those senders had closed when Orca released the finished workers; user-close uses the same reopening path and has dispatcher tests. This evidence is from b0a130a and carries across the appearance-only fade repair. Final screenshots on 52c5d56 verify the folded edge in portrait, landscape and dark mode, expansion/refolding, full-body Copy and selection, and short, exactly-three-line and image-only cards.

The phone chat screen ships as a host-served page inside the phone app's WebView. Android WebView was not run. New phone strings use the configured English fallback until the usual translation pass; Spanish fallback was observed in the simulator.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 29, 2026 23:36
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

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: 7fc45405-32c7-4628-a4fb-399242eec087
Commits

Reviewing files that changed from the base of the PR and between 7253a4b and 7efdc3d.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 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: a9262a34-30d4-46b3-9877-d0a01eda5507
Commits

Reviewing files that changed from the base of the PR and between 0bf4b77 and 7253a4b.

Files selected for processing: 22
  • mobile/src/components/MobileEdgeFade.tsx
  • mobile/src/i18n/locales/en.json
  • mobile/src/session/MobileQueuedMessageScrollList.test.tsx
  • mobile/src/session/MobileQueuedMessageScrollList.tsx
  • mobile/src/session/MobileSessionActiveContent.tsx
  • mobile/src/session/TerminalPaneView.test.tsx
  • mobile/src/session/mobile-agent-message-terminal.ts
  • mobile/src/session/mobile-structured-session-open-message.test.ts
  • mobile/src/session/mobile-structured-session-open-message.ts
  • mobile/src/session/mobile-terminal-layout-choice.test.tsx
  • mobile/src/session/native-chat/transcript/MobileAgentMessageProvider.test.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatAgentMessageCard.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessage.test.ts
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessageActionsSheet.test.tsx
  • mobile/src/session/native-chat/transcript/mobile-agent-message-renderer.test-fixture.ts
  • mobile/src/session/use-mobile-agent-message-navigation.test.ts
  • mobile/src/session/use-mobile-agent-message-navigation.ts
  • mobile/src/session/use-mobile-structured-agent-session.test.tsx
  • mobile/src/session/use-mobile-structured-agent-session.ts
  • mobile/vitest.config.ts
  • src/main/runtime/mobile-desktop-relay/mobile-desktop-relay.integration.test.ts
Files skipped from review as they are similar to previous changes: 1
  • mobile/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

The mobile transcript now includes worker-start entries and renders agent messages with sender attribution, attachments, status, and expandable content. Sender names can open a structured chat session or terminal pane, with guarded asynchronous navigation and localized failure messages. A shared edge-fade component now serves the agent-message card and queued-message list. Tests cover transcript rendering, navigation outcomes, copy text, provider updates, and edge fades.

Merge Risk: Low · previous review 7253a

The mobile test typecheck may still fail in two test files; confirm or fix those failures before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 5.26% 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. Documentat… 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 and concisely describes the main change: adding agent message cards to phone chats.
Description check Passed The description is detailed and covers the user-facing changes, rationale, linked issues, testing, visual verification, platform limitations, and known follow-up work. It does not follow the template …
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.
Full details: Description check

Explanation

The description is detailed and covers the user-facing changes, rationale, linked issues, testing, visual verification, platform limitations, and known follow-up work. It does not follow the template headings or include the checklist explicitly, but the required information is mostly present.

Full details: Docstring Coverage

Explanation

Docstring coverage is 5.26% 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 19 functions across 29 files. (1 skipped: 1 unsupported.)

Resolution

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

Finishing Touches
Generate docstrings
  • 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

@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: d89b60a7-fa7f-424a-856b-83fd08c89a94
Commits

Reviewing files that changed from the base of the PR and between 3fcac72 and ebdaa35.

Files selected for processing: 11
  • mobile/src/i18n/locales/en.json
  • mobile/src/session/MobileSessionActiveContent.tsx
  • mobile/src/session/native-chat/transcript/MobileAgentMessageProvider.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatAgentMessageCard.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessage.test.ts
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx
  • mobile/src/session/native-chat/transcript/mobile-agent-message-context.ts
  • mobile/src/session/use-mobile-agent-message-navigation.test.ts
  • mobile/src/session/use-mobile-agent-message-navigation.ts
  • src/main/runtime/mobile-rpc-allowlist.test.ts
  • src/main/runtime/runtime-rpc/runtime-rpc-mobile-method-routing.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.

@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: 780d6a16-c832-4f81-acd0-754fc2ff80a8
Commits

Reviewing files that changed from the base of the PR and between 64a6b58 and 0bf4b77.

Files ignored due to path filters: 1
  • src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
Files selected for processing: 36
  • mobile/src/i18n/locales/en.json
  • mobile/src/session/MobileSessionActiveContent.tsx
  • mobile/src/session/mobile-agent-message-navigation-rpc.ts
  • mobile/src/session/mobile-agent-message-open-outcome.ts
  • mobile/src/session/mobile-file-preview-lifecycle.test.ts
  • mobile/src/session/mobile-markdown-document-lifetime.test.ts
  • mobile/src/session/mobile-session-terminal-frame-layout.test.tsx
  • mobile/src/session/native-chat/transcript/MobileAgentMessageProvider.test.tsx
  • mobile/src/session/native-chat/transcript/MobileAgentMessageProvider.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatAgentMessageCard.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessage.test.ts
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessageActionsSheet.test.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessageActionsSheet.tsx
  • mobile/src/session/native-chat/transcript/mobile-agent-message-context.ts
  • mobile/src/session/native-chat/transcript/mobile-agent-message-renderer.test-fixture.ts
  • mobile/src/session/native-chat/transcript/mobile-native-chat-display-copy.ts
  • mobile/src/session/notification-pane-tab.ts
  • mobile/src/session/use-mobile-agent-message-navigation.test.ts
  • mobile/src/session/use-mobile-agent-message-navigation.ts
  • mobile/src/session/use-mobile-session-close-actions.test.tsx
  • mobile/src/session/use-mobile-session-close-actions.ts
  • mobile/src/session/use-mobile-session-tab-switching.ts
  • mobile/src/session/use-notification-pane-navigation.test.tsx
  • mobile/src/session/use-notification-pane-navigation.ts
  • mobile/src/test-support/mobile-agent-icon-assets-node.ts
  • mobile/vitest.config.ts
  • src/main/runtime/client-session-tab-selection.test.ts
  • src/main/runtime/client-session-tab-selection.ts
  • src/main/runtime/mobile-desktop-relay/mobile-desktop-relay.integration.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-reveal.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-reveal.ts
  • src/main/runtime/rpc/methods/structured-agent-session-schemas.ts
  • src/main/runtime/rpc/methods/structured-agent-session.test.ts
  • src/main/runtime/rpc/methods/structured-chat-tab-table.test.ts
  • src/main/runtime/session-lifecycle/projection/apply-mobile-session-tab-navigation.ts
  • src/shared/rpc-contract/structured-agent-session-params.ts
Files with no reviewable changes: 1
  • src/main/runtime/rpc/methods/structured-agent-session.test.ts
Files skipped from review as they are similar to previous changes: 1
  • mobile/src/i18n/locales/en.json

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

Comment thread mobile/vitest.config.ts Resolved
@brennanb2025
brennanb2025 changed the base branch from main to brennanb2025/phone-open-chats October 30, 2026 09:35
…2025/phone-open-chats

# Conflicts:
#	src/main/runtime/orchestration/orchestration-party-location.test.ts
#	src/main/runtime/rpc/methods/orchestration-structured-worker-start-failure.test.ts
#	src/main/runtime/structured-agent-session-startup-reconcile.test.ts
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Agent messages on the phone previously appeared as plain attribution rows. They now use the desktop card presentation: sender and arrow, available status, relation heading, header Copy and timestamp, and a body folded after three rendered lines. A sender arrow uses the shared opener so a saved chat can reopen on the phone while desktop keeps its current workspace and tab.

The review repaired natural body measurement, empty-body spacing, displayed Copy/Select text, scoped sender updates, older-host failure feedback, and the faded fold edge. Five correctness rounds are complete, the last with zero new findings. The whole-mechanism reference comparison, performance review and readiness checklist are complete. CI on 52c5d568 passed all 24 checks; Mobile verify passed 12,076 tests with 4 skipped, including all 238 tests across the 24 targeted suites. No lint, typecheck or coverage gate was weakened.

On the shipping iPhone simulator screen, short, long, exactly-three-line and image-only cards render correctly; expansion/refolding, portrait/landscape, full-body Copy, selection through the fade, and light/dark backgrounds passed. Actual closed Claude and Codex sender arrows reopened the correct saved chats and returned real follow-up replies. Desktop stayed on its selected workspace and tab; sender tabs were appended without selecting them there.

The real arrow runs were on b0a130a4e902bff2d7717bb9bc314a719336bc13. Commit 52c5d56893b680ba7026c38e9c42095938337591 changes only the card's appearance, the existing queue fade extraction and their tests (tests-row flows); navigation and shared opening policy are unchanged. CI and fresh agent-free phone screenshots cover that commit. The carried native shell is unchanged; the phone loaded the current 52c mobile-web bundle. Sender closure in the real runs came from releasing completed workers; user-close reaches the same opener inputs and branch and is covered by dispatcher tests. All owned copies, helpers and simulators are stopped, and QA slots released.

Intended: desktop card rules and sender-opening policy are shared. The phone glyph uses known current-workspace status, which never gates the arrow. A proven missing terminal gets desktop's pane-unavailable notice through the existing phone translation mapper. Temporary: the legacy phone sender index and its restart/clear/reopened-worker/dispatch identity gaps are tracked in STA-13207; other-computer senders are tracked in STA-12948. Lifecycle findings moved to #36315 per PO-CUT; this PR does not claim to fix them.

The shipping phone chat is a host-served page inside the phone app's WebView. Android WebView was not exercised. New strings use the configured English fallback until the usual translation pass; Spanish fallback was observed. The existing human-message fold also has a hard-cut edge; that separate main behavior was left out of this PR.

For Brennan's review:

Final phone cards: short, folded, expanded, refolded, image-only, landscape and dark

Short cards, with no reserved footer:

fade-short-cards.png

Folded paragraph and exactly-three-line card:

fade-portrait-collapsed.png

Expanded paragraph, with all text at full contrast:

fade-expanded.png

Landscape collapsed and refolded:

fade-landscape-collapsed.png

fade-landscape-refolded.png

Image-only card:

fade-02-session-bottom.png

Dark mode:

fade-dark-collapsed.png

Real closed sender arrows: Claude and Codex replies, desktop before/after

Claude phone reply:

claude-reply.png

Codex phone reply:

codex-reply.png

Desktop before and after both arrows, with the selected workspace/tab retained:

stage2-before-claude-desktop.png

stage5-desktop.png

Code judgment spots: natural measurement and fold edge, scoped sender source, shared opener adapter.

merges only after #36315; needs retarget to main

@brennanb2025
brennanb2025 changed the base branch from brennanb2025/phone-open-chats to main November 1, 2026 01:58
@brennanb2025
brennanb2025 merged commit de0c5c1 into main Nov 1, 2026
45 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/agent-phone-cards branch November 1, 2026 02:33
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