Skip to content

fix(mobile): a computer's page lists one row per agent with only its live chats - #47996

Merged
AmoabaKelvin merged 1 commit into
mainfrom
mobile-computer-page-agent-list
Nov 24, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
mobile-computer-page-agent-list

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Opening a computer on the phone showed its agents like the desktop's sidebar: every agent with "Home Chat" and all its chats under it, so your projects were pushed off the first screen. Now each agent is one row, like the project rows, and only chats that are busy, waiting on you or unread show under it.

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

What Changed

On a computer's page (Home → a computer), the agents section:

  • One row per agent, styled like the workspace rows: name in primary text (never grey), one line, time on the right, hairlines inset to the text. Tapping an agent opens its Home Chat.
  • Under an agent only chats that reply, wait on you or are unread, never Home Chat. A left-out chat's live workers still list flat under the agent, so one waiting on you stays reachable. No per-agent chevron while its chats are read, and no "Loading chats" placeholder.
  • Chat rows sit on the agent row's grid: icon centred under the avatar, title where the agent's title starts, time on the same right edge (the chevron column only shows for a chat that folds).
  • Usage-limit line: "Continues 1:40 AM" / "Continues Tue 1:40 AM" / "Nov 24", without "Home Chat ·" and without a stale age. One phone helper (mobile/src/bots/mobile-usage-limit-copy.ts) now formats this for the rows, Home rows and the chat's usage-limit notice.
  • Folded header keeps its count and shows one mark before +: the rows' own Needs you count, else a working spinner. The scrolling face strip is gone.
  • Search: the matched words in a purpose are bold and the snippet no longer starts with "…" (it only cuts when the match is past what one line shows). When the only match is a paused agent, the list shows the phone's "No matches" state with "1 paused match" and Show paused. The no-match message no longer says "No matching workspaces".
  • Agents can't list (computer too old, agents switched off, or the first read failed): the agents' home folders no longer show as raw folder rows with their full paths; one muted line names the computer and says why (update Orca there, they are switched off there, or they couldn't load). A failed first read retries a few times with growing waits.
  • Missing screen (fix(mobile): say which Orca to update when a screen is on neither the phone nor the host #47609's screen and the page bundle's own catch-all): the phone's state view, with an icon, "Update Orca", one line naming the computer, and Back plus the store link (the app shell only; a page can't tell which store installed the app). Labels are translated, and the unreachable-server variant is too.
  • Agent message rows in chat (feat(mobile): show the first line of agent-to-agent messages in chat rows #47340) wrap to two lines, so the first line isn't cut at about 30 characters.

Mechanism: hostBotChatItems filters the shared sidebar tree's chats; buildHostBotSections hides rows the host marks botHome and adds the end line; readHostBotListing returns update-needed / read-failed for this computer; MobileStateView takes an optional second action.

Pattern followed: workspace rows (mobile/src/worktree/row-presentation/worktree-list-row-styles.ts:7, host-screen-secondary-styles.ts:19-56), Home's agent rows (mobile/src/bots/MobileBotHomeRow.tsx MobileBotRowView), and Tasks' older-host state (mobile/src/tasks/task-list/mobile-tasks-list-state.tsx:92, MobileStateView).

Why

The redesign review found this section copied the desktop tree: Home Chat repeated under every agent, read agents looked disabled next to their own chats, and two time columns. Showing only live chats keeps the section short and still surfaces anything that needs you. Hosts too old to mark their homes can't be told apart from real folders, so those rows stay under the update line.

Linked Issue

Follow-up to #47609, #47340, #47624, #47654 and #47663 (design review of the phone's agent screens).

Visual Proof

Same fixture data and 393 pt viewport before and after (main's page bundle vs this branch's).

Agents on a computer's page

Before After
Dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Folded header

Before After
Dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Search: matched words in the purpose

Before After
Dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Search: only a paused agent matches

Before After
Dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Agents switched off

Before After
Dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Computer too old to list agents

Before After
Dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Missing screen (page)

Before After
Dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Missing screen (app shell)

Before After
Dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Agent message rows in chat

Before After
Dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Long names and long chat titles truncate on one line with the count and time kept; checked in light and dark.

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 page bundle (pnpm build:mobile-web) in Chromium with the shell double and fixture host data for every state above (agents, folded, search by name/purpose/none/paused + Show paused, agents off, old host, failed read, missing screen), dark and light, and read computed styles to check the text columns (agent and chat titles at x 60, times at the same right edge, end lines at the header title's x). Native rows (agent message rows, the shell's missing-screen copy) rendered from the real components. pnpm --dir mobile typecheck, pnpm verify:mobile-localization and pnpm check:changed pass. No tests added: this is presentation and list wiring (AGENTS.md).

Performance

None, because the list does the same reads as before: chat filtering and the folded header's sum run over the already-built rows. The only new work is a capped retry (5 reads, 3–48 s apart) after this computer's first read of its agents fails. The page bundle's eager bytes went down about 4.8 KB (MobileCollapsedBotPreview removed).

Risk

Level: Medium

The riskiest part is the agents section hiding the rows a host marks botHome whenever the section can't list agents (agents off, a failed first read, an old host). If that marking were wrong, a real folder would drop out of Projects. Hosts only mark their agents' home folders. Older hosts that don't mark them keep today's folder rows. Server listings keep their existing behaviour, apart from one "Update Orca on X" line for a server that is too old. To back this out, revert it; nothing is saved.

Review

Two review rounds (Codex and Claude). Accepted and fixed: Home Chat's live workers had disappeared; tapping an agent didn't open Home Chat; a live child worker under a finished root; a failed first read had no retry; status lines were hidden by a saved fold; the agents-off line showed while searching; the offline Needs you count; the a11y count; the limit line falling back to English in translated locales. Left as follow-ups: paused matches show only in the empty no-match state (when a workspace also matches, there is no paused hint), and a group's home folder still shows while the agents read fails, because its groups are unknown then.

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

Mobile only. Works for a paired computer and its relayed servers; the group row's faces and the title colour line up with #47966 (Home rows), which makes the same one-line title change.

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 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes update mobile bot chat and home rows, host listing and retry behavior, bot search results, and paused-bot search controls. They revise unavailable-route screens and shared mobile state actions. They also add mobile usage-limit formatting and localized copy, change bot Home Chat row navigation, and allow native chat event text to wrap onto two lines.

Merge Risk: Low · up to 01456

The mobile bot list rework looks safe to merge, with two small open issues. A worker that is active only under a settled root chat may be hidden from its bot. Expanded bots with listed chats may have no way to fold again. Both are narrow behavior gaps with workarounds.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title is a conventional-commit style subject that names the main change: the computer's page on mobile now lists one row per agent, with only live chats beneath it. The raw summary and PR objectiv…
Description check Passed The description follows the template sections: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, upstream boundary, Notes, and Checklist. It expla…
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 is a conventional-commit style subject that names the main change: the computer's page on mobile now lists one row per agent, with only live chats beneath it. The raw summary and PR objectives both describe this one-row-per-agent redesign as the core change, so the title is on topic and specific.

Full details: Description check

Explanation

The description follows the template sections: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, upstream boundary, Notes, and Checklist. It explains the user-facing before/after, the mechanism, the rationale, the risk and rollback, and includes before/after visuals and testing details. Gaps are minor: the Linked Issue section references follow-ups (#47609, #47340, etc.) but does not contain a 'Fixes #' issue link, the Risk level is stated, and the AI Disclosure section is left blank, which the template says to fill in only for non-internal contributors.

  • 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: 574cdaed-9aaa-484d-ba68-1d2df871d6d7
Commits

Reviewing files that changed from the base of the PR and between 6d2b9b7 and 01456da.

Files selected for processing: 14

  • mobile/src/bots/MobileBotHomeRow.tsx
  • mobile/src/components/feedback/MobileStateView.tsx
  • mobile/src/i18n/locales/de.json
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/fr.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/pt.json
  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
  • mobile/src/i18n/locales/zh-Hant.json
  • mobile/src/i18n/locales/zh.json
  • mobile/src/session/native-chat/transcript/agent-messages/MobileNativeChatAgentMessageCard.tsx
Files skipped from review as they are similar to previous changes: 12

  • mobile/src/components/feedback/MobileStateView.tsx
  • mobile/src/i18n/locales/de.json
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/fr.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/pt.json
  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
  • mobile/src/i18n/locales/zh-Hant.json
  • mobile/src/i18n/locales/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 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: 2

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: 50a00400-a8be-4c34-aeb4-ab5b046c27da
Commits

Reviewing files that changed from the base of the PR and between 644d677 and 6d2b9b7.

Files selected for processing: 39

  • mobile/src/bots/MobileBotChatRows.tsx
  • mobile/src/bots/MobileBotHomeRow.tsx
  • mobile/src/bots/MobileBotsSectionHeader.tsx
  • mobile/src/bots/MobileCollapsedBotPreview.tsx
  • mobile/src/bots/host-bot-chat-items.ts
  • mobile/src/bots/host-bot-entries.ts
  • mobile/src/bots/host-bot-failed-read-retries.ts
  • mobile/src/bots/host-bot-listing.ts
  • mobile/src/bots/host-bot-row-facts.ts
  • mobile/src/bots/host-bot-sections.ts
  • mobile/src/bots/mobile-bot-row-line.ts
  • mobile/src/bots/mobile-usage-limit-copy.ts
  • mobile/src/bots/use-host-bot-sections.ts
  • mobile/src/bots/use-host-bots.ts
  • mobile/src/bots/use-mobile-bots-list-parts.tsx
  • mobile/src/components/feedback/MobileStateView.tsx
  • mobile/src/components/host-connection/ProtocolBlockScreen.tsx
  • mobile/src/home/bots/MobileHomeBotRow.tsx
  • mobile/src/host-screen/workspace-list/host-workspace-list.tsx
  • mobile/src/host-screen/workspace-list/use-host-list-sections.ts
  • mobile/src/i18n/locales/de.json
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/fr.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/pt.json
  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
  • mobile/src/i18n/locales/zh-Hant.json
  • mobile/src/i18n/locales/zh.json
  • mobile/src/mobile-web-shell/presentation/PageRouteUnavailableScreen.tsx
  • mobile/src/mobile-web-shell/presentation/ShellStateScreen.tsx
  • mobile/src/navigation/workspace-route.tsx
  • mobile/src/session/native-chat/transcript/agent-messages/MobileNativeChatAgentMessageCard.tsx
  • mobile/src/session/native-chat/transcript/notices/native-chat-usage-limit-copy.ts
  • mobile/src/worktree/execution-hosts/host-workspace-list-states.tsx
  • mobile/src/worktree/row-presentation/WorktreeListRow.tsx
  • mobile/src/worktree/workspace-list/workspace-list-types.ts
Files with no reviewable changes: 1

  • mobile/src/bots/MobileCollapsedBotPreview.tsx

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

Comment on lines 64 to 84
}
}))
const items: WorkspaceListItem[] = []
// Lines of the chats left out lead, so none reads as a listed chat's.
const leftOut: WorkspaceListItem[] = []
const liveIds = botLiveWorkspaceIds(tree.chats)
for (const chatView of view.chats) {
const { chat } = chatView
if (!listsUnderBot(chat)) {
// A chat left out (Home Chat, or a quiet one) still lists its live and open workers, flat
// under the bot, so one waiting on you can be reached.
for (const branch of chatView.lines) {
if (branch.lines.some((line) => liveIds.has(line.row.worktreeId) || line.row.isActive)) {
leftOut.push(...lineItems(branch, view.notes.get(branch.id)))
}
}
continue
}
items.push({
row: home.row,
view: {

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

Compute activeLineId from any line in the branch, not only its root.

activeLineId checks only branch.lines[0], the root row. The sleeping-worker filter keeps a branch when any of its lines is active. When the active worker is a descendant of a settled root that falls past the first page, the root is not retained. Its active descendant then disappears from the bot. A chat that is left out has no paging control, so the user cannot reveal it.

Suggested fix

-    activeLineId: args.branches.find((branch) => branch.lines[0]?.row.isActive)?.id ?? null
+    activeLineId:
+      args.branches.find((branch) => branch.lines.some((line) => line.row.isActive))?.id ?? null

{!down && (count > 0 || bot.foldsChats || view.lineageCollapsed) && onToggle ? (
{/* Its live chats list under it unfolded, so only a folded bot, or one whose chats this host
can't list, keeps a chevron; a down host's bot is its row alone. */}
{!down && (view.lineageCollapsed || (!bot.listsChats && count > 0)) && onToggle ? (

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

Expanded bots with listed chats cannot be folded again.

The chevron for a bot row renders only when the bot is folded, or when it lists no chats and has child rows. An expanded bot with listed chats (bot.listsChats) has no fold control. The row press opens the Home Chat, the long-press action menu has no lineage or fold entry, and the default row's lineage toggle does not run for bot rows. The change removes the fold workflow for these bots. Keep a reachable fold control for expanded bots with listed chats, or state explicitly that these bots stay expanded.

… live chats

Agent rows read like the workspace rows under them, and tapping one opens its Home Chat. Under an
agent only chats that reply, wait on you or are unread list (never Home Chat); a left-out chat's
live workers still list flat. The usage-limit line says "Continues 1:40 AM" from one phone helper
the chat notice shares. The folded header keeps its count and one mark. Search bolds the matched
words and offers Show paused when only paused agents match. A computer whose agents can't list
hides their home folders and says why in one line, and a failed first read is retried. The
missing-screen page uses the phone's state view, and agent message rows wrap to two lines.
@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-computer-page-agent-list branch from 6d2b9b7 to 01456da Compare November 24, 2026 12:14
@AmoabaKelvin
AmoabaKelvin merged commit 824d375 into main Nov 24, 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