Skip to content

feat(mobile): show the first line of agent-to-agent messages in chat rows - #47340

Merged
AmoabaKelvin merged 1 commit into
mainfrom
show-first-line-of-agent-messages-phone
Nov 23, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
show-first-line-of-agent-messages-phone

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

When agents message each other in a chat, the phone row only said who sent it ("Message from Parser"). You had to open each one to see what it said. Now the row shows the first line of the message, like the desktop.

Files Added Deleted Net
Test 0 0 0 0
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​61 $\color{#cf222e}{\Huge{\mathbf{−}}}$​22 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​39

What Changed

The phone's chat row for a message between agents now follows the desktop's row from #46739:

  • It shows the sender's name, then the message's first line as plain text. The phone keeps its two-line row, so a long first line wraps once and is cut with "…".
  • Starts, hand-offs and tasks keep a one-word kind before the name ("Task", "Started", "Handed off", "Reopened", "Follow-up"), using the desktop's strings. Plain messages and worker updates drop the "Message from" / "Update from" lead.
  • When the row is open, the first line is hidden from the row because the whole message shows below.
  • VoiceOver still reads the full lead and the first line: "Task from Coordinator: Fix the retry timer…".

How it works: the card uses the shared agentMessagePreviewLine that the desktop uses, so both pick the same first line and strip the same Markdown. MobileNativeChatEventRow can now take its words as a function of whether the row is open, so the card reads the open state from the row. It no longer keeps a second copy of it.

Pattern followed: the desktop's NativeChatAgentMessageCard.tsx kindWord and NativeChatAgentMessageRow.tsx:140 (previewShown = preview !== '' && !shown). On the phone it builds on the existing row in MobileNativeChatEventRow.tsx:57.

One difference from the desktop: on the phone, a row with details always opens. On the desktop, a short message that fits on one line isn't a button. The desktop decides that by measuring the text, and the phone's long-press actions are on the row's button.

Why

This is phone parity with #46739. The phone row was the only place you couldn't see what an agent said without opening the message.

Linked Issue

No issue. This is follow-up parity for #46739.

Visual Proof

Rows, collapsed (dark / light)

Before After

First row opened (dark / light)

Before After

Captured from the real phone components rendered on the web, at 390 pt wide.

Testing

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

  • Rendered the real MobileNativeChatAgentMessageCard rows (task, worker update, plain message, start) in dark and light, collapsed and with a row opened.

  • pnpm check:changed passes.

  • No new tests. The shared first-line helper already has tests from Agent message rows: show the first line and an always-visible chevron #46739, and what's left here is row copy and layout.

Performance

None, because the row runs one small pure string pass over a message it has already loaded, once per render. The card no longer subscribes to the chat's open/closed store, so it does no extra work when other rows open.

Risk

Only the agent-message row on the phone changes. The worst case is a row that shows the wrong first line or none, and the message itself still opens in full. Older hosts aren't affected: this uses only fields the phone already reads. Back out with a plain revert.

Level: Low

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

MobileNativeChatEventRow now supports render-function children and passes them a boolean that is true only when details are available and open. Agent-message cards now derive translated kind labels and first-line previews, then display them in the event-row label and, when the row is closed, its content. English translations were added for started, reopened, follow-up, handed-off, and task events.

Merge Risk: Low · up to 22b33

Mobile agent-message rows get previews that match desktop. Rows without expandable details may be read by VoiceOver without the full "from" lead. This is a small accessibility gap that is worth fixing but does not block merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(mobile): show the first line of agent-to-agent messages in chat rows" matches the main change. The PR adds the first line of agent messages to mobile chat rows, using the shared deskto…
Description check Passed The description follows the template well. It has the ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, and Checklist sections, all filled in with specific content. It e…
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: Title check

Explanation

The title "feat(mobile): show the first line of agent-to-agent messages in chat rows" matches the main change. The PR adds the first line of agent messages to mobile chat rows, using the shared desktop helper. The title is specific and concise, and it does not describe anything missing from the changeset.

Full details: Description check

Explanation

The description follows the template well. It has the ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, and Checklist sections, all filled in with specific content. It explains the before and after behavior, the mechanism, the reasoning, and the risk, and it includes before and after screenshots. Minor gaps: the Linked Issue section names no issue (it refers to #46739 as parity follow-up, which the template says should be an actual issue for outside contributors), the Risk level is given but the revert note is brief, and the AI Disclosure section is empty.

  • 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

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: c6bc3d93-b6eb-43e5-a607-71f7927d1c2e
Commits

Reviewing files that changed from the base of the PR and between bc47b4e and 22b3323.

Files selected for processing: 2

  • mobile/src/i18n/locales/en.json
  • mobile/src/session/native-chat/transcript/messages/MobileNativeChatEventRow.tsx
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.

@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: 12dc3138-048a-43b4-87e9-922d86934ffc
Commits

Reviewing files that changed from the base of the PR and between 9c31c0f and bc47b4e.

Files selected for processing: 3

  • mobile/src/i18n/locales/en.json
  • mobile/src/session/native-chat/transcript/agent-messages/MobileNativeChatAgentMessageCard.tsx
  • mobile/src/session/native-chat/transcript/messages/MobileNativeChatEventRow.tsx

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

<MobileNativeChatEventName>
{items.map((item) => item.title).join(', ')}
</MobileNativeChatEventName>
{kind ? `${kind} ` : null}

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.

Minor · Functional Correctness · Quick win

Keep the full accessibility label on rows without details.

When a row has no details, MobileNativeChatEventRow renders no toggle button. The label prop is then never applied. VoiceOver reads only the visible words, such as "Task Coordinator", and omits the lead "from", which this change removes from the visible text. The same applies to plain messages whose kind word is omitted.

In MobileNativeChatEventRow.tsx, apply label to the words Text when the row has no toggle. Keep the existing button label for rows with details.

Suggested fix

         <Text
           pointerEvents={toggles ? 'none' : 'auto'}
+          accessibilityLabel={toggles ? undefined : label}
           numberOfLines={wordsLines}
           style={[styles.words, type]}
         >

@AmoabaKelvin
AmoabaKelvin force-pushed the show-first-line-of-agent-messages-phone branch from bc47b4e to 22b3323 Compare November 23, 2026 10:48
@AmoabaKelvin
AmoabaKelvin merged commit cc112b6 into main Nov 23, 2026
28 checks passed
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