Skip to content

feat(mobile): one line per workspace in project groups on a computer's page - #48649

Open
AmoabaKelvin wants to merge 5 commits into
mainfrom
mobile-host-list-one-line
Open

AmoabaKelvin wants to merge 5 commits into
mainfrom
mobile-host-list-one-line

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

A computer's page in the phone app listed its workspaces like the desktop sidebar: every name bold, chips and branch lines under each, about six on a screen. Now each project is one rounded group, like Home, and each workspace is one short line that says only what matters: who needs you, the PR, or how long ago something happened. About ten fit on a screen.

Files Added Deleted Net
Test 0 0 0 0
Prod 42 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​582 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1365 $\color{#cf222e}{\Huge{\mathbf{−}}}$​783

What Changed

  • Project groups (host-section-header.tsx, host-workspace-list.tsx): each project is an inset group with Home's heading: repo icon, name at 15/600, count, a + that opens New workspace already set to that project, and a fold chevron. The whole heading folds; targets are 44 pt.
  • One line per workspace (WorktreeListRow.tsx, worktree-list-row-styles.ts), 44 pt:
    • state dot, then the name at 16 pt (bold only when unread; the repo's main checkout in grey);
    • on the right: the agents that need you and "Needs you", else the PR number, the agent logo and how long ago (or "Failed").
    • Tapping a row that needs you opens the agent that's asking.
    • No focused-row accent bar, no bell, no meta line, chips or terminal count. Branch, links and notes are in the long-press sheet already.
    • Outside project grouping (or a child from another project), the row shows its project's icon. A row whose computer is down shows that computer's health word. On the tablet sidebar the open workspace keeps a fill.
  • Bots sits in the same kind of group, and the section is hidden while there are no bots (Home's Bots tab makes the first one).
  • Deleted the inline agent list (WorktreeAgentList, WorktreeAgentRow, WorktreeAgentSummary, WorktreeAgentChildDisclosure) and WorktreeMetaGlyphs; prStateColor moved to pr-state-color.ts.

This replaces #47274 (the flat list, which wasn't dense enough).

Why

The host page is the screen you land on most, and it was the one list that didn't read like the rest of the phone. Option A copies Home's grouped rows (home/home-list-styles.ts:17-86) and the Agents tab's row values (agents/MobileAgentListRows.tsx:345-358), so the same element has the same spacing everywhere.

Linked Issue

None. This is the approved phone UX round (host screen, option A).

Visual Proof

Real host page (the shipped page bundle) over a shell double with the audit's seed data, 393×852 at 2x. Before = main.

pr1-list

pr1-bots

Testing

  • I manually tested these changes locally. Rendered the real page in Chromium, dark and light: project groups, bots group, needs-you rows, PR rows, folded projects, a 46-character project name, a 70-character branch with three agents asking, non-Latin names, 34 rows in one project, 320 pt width.
  • Automated tests added/updated, or explained why not below. UI-only; no new tests, per the repo's test policy.
  • Every added test fails without this change and avoids the test anti-patterns

pnpm check:changed passes. pnpm build:mobile-web passes; eager bytes go down.

Performance

None, because rows draw less than before. Only rows with agents read the shared 30 s clock, as before, and the swipe callbacks the next PR adds are stable so unchanged rows still skip re-rendering.

Risk

The riskiest part is what the row no longer shows: the per-agent lines (you now open the workspace, or tap a needs-you row to open the asking agent) and the desktop's card properties (the next PRs drop the card-layout options the phone no longer draws). Old paired desktops send the same fields. A plain revert backs it out.

Level: Low

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

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

Host workspace sections and worktree rows now use shared grouped layouts and updated headers. Repository-group actions pass repository context through host-screen state to the new-worktree modal, where repository loading can filter by execution host. Worktree rows display updated agent facts and pull-request marks. The previous agent-lineage and metadata-glyph presentation components, related translations, and a TypeScript include entry are removed.

Merge Risk: Low · up to ca185

The redesigned computer page looks mergeable. Two small issues remain: the new-workspace picker can show a hidden project from another computer, and Chinese users will see an English "Needs you" label on rows that need attention. Both are low-impact and easy to fix.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title says the change puts one line per workspace inside project groups on a computer's page in the mobile app. The changeset matches this. It adds grouped project headers, compact one-line worksp…
Description check Passed The description follows the template closely. It includes ELI5, What Changed, Why, Visual Proof with before and after images, Testing with a checked manual test, a Performance line, a Risk section wit…
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 says the change puts one line per workspace inside project groups on a computer's page in the mobile app. The changeset matches this. It adds grouped project headers, compact one-line workspace rows (WorktreeListRow, worktree-list-row-styles), and a bots group, and it removes the inline agent list components. The title is specific and scans well, though it does not mention the removal of the agent list or the new New-workspace shortcut.

Full details: Description check

Explanation

The description follows the template closely. It includes ELI5, What Changed, Why, Visual Proof with before and after images, Testing with a checked manual test, a Performance line, a Risk section with level and rollback, and the checklist. The Linked Issue section says 'None' and gives a reason, but the template asks for a linked issue. The Risk section also does not name a level-specific mitigation beyond a plain revert, and the Review section is empty. These gaps are minor.

Resolution

Optionally, link a tracking issue in the Linked Issue section or state why none applies in more detail. Consider filling the empty Review section and the AI Disclosure section if the rules apply to this contributor.

  • 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: 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: 6fd79d9d-57ef-406c-9001-3dbe3f89c282
Commits

Reviewing files that changed from the base of the PR and between a40d14c and ca185c4.

Files selected for processing: 42

  • config/tsconfig.tc.web.json
  • mobile/src/bots/MobileBotsSectionHeader.tsx
  • mobile/src/bots/host-bot-sections.ts
  • mobile/src/bots/items/MobileBotItemLinks.tsx
  • mobile/src/bots/use-mobile-bots-list-parts.tsx
  • mobile/src/host-screen/host-bottom-bar.tsx
  • mobile/src/host-screen/host-screen-overlays.tsx
  • mobile/src/host-screen/host-screen-secondary-styles.ts
  • mobile/src/host-screen/use-host-screen-state.ts
  • mobile/src/host-screen/workspace-actions/use-host-worktree-actions.ts
  • mobile/src/host-screen/workspace-actions/workspace-details-sheet.tsx
  • mobile/src/host-screen/workspace-list/host-pending-creation-row.tsx
  • mobile/src/host-screen/workspace-list/host-section-header.tsx
  • mobile/src/host-screen/workspace-list/host-workspace-list.tsx
  • mobile/src/i18n/en-runtime-required.json
  • 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/new-workspace/creation/forms/new-worktree-modal-types.ts
  • mobile/src/new-workspace/creation/modal/NewWorktreeModal.tsx
  • mobile/src/new-workspace/creation/runtime/use-new-workspace-repositories.ts
  • mobile/src/session/MobileSourceControlButton.tsx
  • mobile/src/tasks/item-detail/mobile-tasks-item-state-glyph.ts
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentChildDisclosure.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentList.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentRow.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentSummary.tsx
  • mobile/src/worktree/agent-lineage/worktree-agent-child-rows.ts
  • mobile/src/worktree/row-presentation/WorktreeListRow.tsx
  • mobile/src/worktree/row-presentation/WorktreeMetaGlyphs.tsx
  • mobile/src/worktree/row-presentation/pr-state-color.ts
  • mobile/src/worktree/row-presentation/worktree-list-row-layout.ts
  • mobile/src/worktree/row-presentation/worktree-list-row-styles.ts
  • mobile/src/worktree/row-presentation/worktree-meta-glyph-presence.ts
Files with no reviewable changes: 11

  • config/tsconfig.tc.web.json
  • mobile/src/i18n/en-runtime-required.json
  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentChildDisclosure.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentList.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentRow.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentSummary.tsx
  • mobile/src/worktree/agent-lineage/worktree-agent-child-rows.ts
  • mobile/src/worktree/row-presentation/WorktreeMetaGlyphs.tsx
  • mobile/src/worktree/row-presentation/worktree-meta-glyph-presence.ts

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

"folder": "文件夹",
"project": "项目 {{repo}}",
"remoteHost": "远程主机"
"unsavedName": "未保存的名称:{{name}}"

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

Add the zh needsYou label for worktree rows.

When a row needs attention and the zh locale is active, WorktreeListRow reads components.worktreeListRow.needsYou. This key is absent from mobile/src/i18n/locales/zh.json, and the runtime English subset also omits it. The lookup falls back to the English inline default "Needs you", so Chinese users see an English status label on this row.

Add the Chinese translation for this key to the components.worktreeListRow block in mobile/src/i18n/locales/zh.json:

     "worktreeListRow": {
       "children_one": "{{count}} 个子工作区",
       "children_other": "{{count}} 个子工作区",
+      "needsYou": "需要你处理",
       "unsavedName": "未保存的名称:{{name}}"
     },
Committable suggestion

IMPORTANT
Review the replacement and indentation, then test before committing.

Suggested change
"unsavedName": "未保存的名称:{{name}}"
"needsYou": "需要你处理",
"unsavedName": "未保存的名称:{{name}}"

// Hidden projects drop out as on desktop, except the one this form was opened for.
const eligible = pickerRepos(getNewWorkspaceDialogEligibleRepos(allRepos), initialRepoId)
return initialRepoHost
return initialRepoHost && onlyInitialRepoHost

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

Limit the hidden-project exception to the requested host.

If local repo R opens the form, pickerRepos(..., initialRepoId) also admits a hidden repo R on another host. With onlyInitialRepoHost=false, this branch now retains that hidden repo and exposes it in the project or run-target picker.

Apply the hidden-project exception using both repository ID and execution-host ID. Keep the requested hidden repo available without exposing hidden same-ID repos on other hosts.

This branch has not been deployed

No deployments
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