You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(mobile): show the first line of agent-to-agent messages in chat rows - #47340
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.tsxkindWord 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.
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.
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)
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: 4
Check name
Status
Explanation
Title check
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
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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.
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
What Changed
The phone's chat row for a message between agents now follows the desktop's row from #46739:
How it works: the card uses the shared
agentMessagePreviewLinethat the desktop uses, so both pick the same first line and strip the same Markdown.MobileNativeChatEventRowcan 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.tsxkindWordandNativeChatAgentMessageRow.tsx:140(previewShown = preview !== '' && !shown). On the phone it builds on the existing row inMobileNativeChatEventRow.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)
First row opened (dark / light)
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
MobileNativeChatAgentMessageCardrows (task, worker update, plain message, start) in dark and light, collapsed and with a row opened.pnpm check:changedpasses.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
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)