Skip to content

feat(mobile): arrangeable Home with stats, usage and machine types, plus mobile feedback fixes - #37959

Closed
AmoabaKelvin wants to merge 11 commits into
mainfrom
MOBILE-VERSION-IMPROVEMENTS
Closed

AmoabaKelvin wants to merge 11 commits into
mainfrom
MOBILE-VERSION-IMPROVEMENTS

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 66 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​743 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2530 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1787
Prod 151 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6234 $\color{#cf222e}{\Huge{\mathbf{−}}}$​8343 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2109

ELI5

This PR acts on user feedback about the new mobile app. It fixes several bugs and changes the Home screen:

  • Home can be rearranged, and sections can be hidden.
  • Stats and account usage are back on Home.
  • Each desktop row shows what kind of machine it is.
  • Jump back in rows name their project.
  • Switching tabs no longer shows a popup.
  • A host can be edited from its own screen.

It also brings in the terminal input work from #37900.

What Changed

Bug fixes

Home

  • No times in Jump back in. Only rows with a live terminal had a time, so most rows, including "Last opened", had none.

  • Desktops show the machine kind. Each row has a laptop, desktop or server tile with the connection dot on its corner, and a line like MacBook Pro · macOS. The desktop reports this through a new optional hostMachine field on status.get, found once per process:

    • macOS: system_profiler.
    • Windows: one PowerShell CIM query.
    • Linux: DMI files.

    Older desktops fall back to showing only the OS.

  • Your stats and Account usage are back, below Automations, centred, with agent time in whole units (139d, 7h, 42m). Stats come from stats.summary on connected desktops. Usage uses one accounts.subscribe stream per connected desktop, shared with the Accounts screen's decoder.

  • Arrange Home. An up/down button next to Settings opens a sheet where you can drag sections into a new order and turn them on or off. Desktops can't be hidden, so "Pair a desktop" stays reachable. The layout is saved on the phone (orca:homeLayout). Unknown or new section ids fall into their default place.

Host screen, Edit host, Automations

  • Edit host from the host screen. The host screen's ⋯ menu gains Edit host and Network diagnostics.
  • Edit host moves onto the standard compact bar and gains Remove host. Pages refuse host removal by design (fix(mobile): the page never removes a host, and stops bundling push #22283), so removal lives on the native screen.
  • Automations uses the standard bar, with its Automations / Runs switcher pinned under it, as Source Control has. Before, the switcher scrolled with the list on a track the same colour as the screen.
  • The host screen header shows the machine line.

Terminal input: this includes #37900 (one live terminal input with the key row).

Why

Users reported the tab popup, the branch/folder setting being ignored, sheets cut off on short phones, and Jump back in rows they couldn't tell apart. Stats and usage left Home in #36520. They come back at the bottom so the top of Home stays about getting back to work, and Arrange lets people who don't want them hide them.

Arrange is native because Home is a native screen. Over-the-air pages only exist under a single desktop and can only write storage keys the app already knows, so there was no OTA-only way to build it.

Linked Issue

Fixes #37642

Visual Proof

All screenshots are from an iOS simulator running this branch, paired to headless desktops built from it. Main's Home is the version without the arrange button, the times, tiles, stats or usage.

Home Home, bottom Arrange Home Home with stats hidden
Host ⋯ menu Edit host Automations After switching tabs (no popup)

Testing

  • I manually tested these changes locally

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

  • I went through every screen above on the iOS simulator (iOS 27) against two paired headless desktops built from the branch: Arrange (hide, reorder, Reset), Account usage with real Claude and Codex accounts, the host menu, Edit host, Automations, and tab switching.

  • Locally: pnpm tc, mobile typecheck and typecheck:tests, build:mobile-web (181 assets, under budget), the changed-code quality gate, and oxlint and anti-slop on changed files.

  • New tests:

  • Not run: the Windows machine probe hasn't run on a Windows machine. Its parser is covered by tests.

  • Known failures, also failing on main: mobile-e2ee-v2-client-session.test.ts and tests/e2e/helpers/persisted-profile-state.unit.test.ts.

Risk

Level: Medium

  • Riskiest parts:
    • Home: it now renders from a saved layout, and it subscribes to account usage on each connected desktop.
    • Desktop machine probe: it spawns system_profiler on macOS and PowerShell on Windows once per process. That spawn runs alongside the existing machine-name wait, with the same 750 ms limit, and leaves the field out on timeout. The PowerShell command uses no -ExecutionPolicy Bypass and no -EncodedCommand.
  • Older desktops don't send hostMachine, so the row shows only the OS.
  • Older apps: the new ⋯ items open routes that older apps already have (/h/<id>/edit, /connection-log).
  • Backing out: a plain revert. The saved orca:homeLayout key is ignored by older builds.

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)

Reverts 852391d (#36395). The card popped up on every tab switch.
Tapping a tab switches tabs again, and the session title card goes back
to its own owner from #30389. Keeps later changes to these files: tab
press feedback, the compact top bar's + button, and #36866's keyboard
keep-focus for title taps.
The phone's workspace row always printed the branch or folder path, so the
Branch name / Branch / folder path toggle under Card display did nothing.
The shared card details now carry that rule, and the row reads it.
Content-sized sheets ride the keyboard by translation, but their height cap ignored that lift, so a tall sheet pushed its top off screen with no way to scroll back to it. The cap now gives back the keyboard lift. Sheets that scroll their own list can now shrink to the cap instead of clipping it, and the GitHub Pages picker no longer nests its list inside the drawer's ScrollView.
The desktop now reports whether it is a laptop, desktop or server, and its
model, on status.get. The phone stores it with the other last-known host
fields and turns it into a line like "MacBook Pro · macOS".
The host screen's menu gains Edit host and Network diagnostics. Edit host moves
onto the standard bar and gains Remove host. Automations uses the standard bar
with its switcher pinned under it, as Source Control does.
Home drops the Jump back in times, names the repo on every Jump back in row
(#37642), shows each desktop's machine kind, and adds stats and account usage
at the bottom. A new Arrange button reorders and hides sections, saved on the
phone.
…on the host screen

The edit route gets a web stub so its native-only removal flow stays out of
the page's chunks, and Automations keeps its own segment style. The host
screen header shows the machine line like Home does.
Every terminal tab, shell or agent, gets the dock from before #36166:
the scrolling key row (desktop width, Paste, the built-in keys, custom
keys, add) above one live field that types straight into the terminal,
with the attach and mic buttons beside it. The field keeps today's 3:1
outline and focus ring, and the keys use today's chips and press styles.

The Keys/Message toggle, the Message composer, the arrow pad, the ⋯
sheet on the row and the per-terminal mode preference go. A stored mode
from an older build is never read. Sticky ctrl/alt/shift and the More
keys sheet stay only behind the iPhone Duo rail, which shipped shells
still draw; the page reports no composer, so shipped shells grey their
input-mode key and newer shells hide it.
With one live input there is no way to write a terminal line first and
send it, so the per-terminal drafts and their storage, the Send path,
command-field dictation, draft restoration and the terminal setting for
autocomplete and autocorrect (which only applied to that line) go.
Dictation in a terminal always types into it live. Drafts and the setting
saved by older builds are never read.
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The pull request adds configurable Home sections, account-usage rows, and aggregate host statistics. It removes buffered terminal drafts and per-terminal live-input preferences, and changes terminal accessory controls, dictation, session tabs, and title-card behavior. Host status and stored profiles gain machine kind and model metadata. Host editing adds removal confirmation, and automation screens adopt shared navigation and host selection. Shared components and localizations are updated.

Pre-merge checks: Passed 3 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Out of Scope Changes check Warning The only active directly linked coding target is [#37642]. The pull request also changes Home layout arrangement, stats, account usage, machine probing, host editing, Automations navigation, sheet siz… Split the unrelated changes into separate pull requests, or link active coding issues that define their requirements and scope.
Docstring Coverage Inconclusive Docstring coverage is 37.93% 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. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title names the main change: an arrangeable Home screen with stats, account usage and machine types. It also names the mobile feedback fixes. The PR's objectives and changeset match. It is long, a…
Description check Passed The description follows the template. It has the ELI5, What Changed, Why, Linked Issue (Fixes #37642), Visual Proof, Testing, Risk (Level: Medium, with back-out steps), Notes, and Checklist sections. …
Linked Issues check Passed Issue [#37642] requires each mobile Home “Jump back in” row to identify its project or repository. MobileHomeJumpBackIn uses the repository in the row location text when it differs from the title, a…
Full details: Title check

Explanation

The title names the main change: an arrangeable Home screen with stats, account usage and machine types. It also names the mobile feedback fixes. The PR's objectives and changeset match. It is long, at 94 characters, but it is specific and related to the change.

Full details: Description check

Explanation

The description follows the template. It has the ELI5, What Changed, Why, Linked Issue (Fixes #37642), Visual Proof, Testing, Risk (Level: Medium, with back-out steps), Notes, and Checklist sections. The Visual Proof section has before/after images, and the Testing section lists manual testing and automated tests. Some template items are empty or unchecked: the AI Disclosure section is blank, the Review section is empty, and the lint/typecheck/test/build checklist item is unchecked. The Visual Proof section does not clearly show a before state for every change. These gaps are minor, so the description is mostly complete.

Full details: Linked Issues check

Explanation

Issue [#37642] requires each mobile Home “Jump back in” row to identify its project or repository. MobileHomeJumpBackIn uses the repository in the row location text when it differs from the title, and includes that text in the visible subtitle and accessibility label. It also includes the desktop name when needed. The tests cover repeated branch names across repositories and desktops, plus the single-desktop case in mobile/src/home/MobileHomeJumpBackIn.test.tsx.

Full details: Out of Scope Changes check

Explanation

The only active directly linked coding target is [#37642]. The pull request also changes Home layout arrangement, stats, account usage, machine probing, host editing, Automations navigation, sheet sizing, session tabs, and terminal input. These changes do not implement repository identification in “Jump back in” rows. The current PR description states that they are intended, but it does not establish linked issue scope for them.

Resolution

Split the unrelated changes into separate pull requests, or link active coding issues that define their requirements and scope.

Full details: Docstring Coverage

Explanation

Docstring coverage is 37.93% 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 29 functions across 50 files. (106 skipped: 34 unsupported, 72 over the file limit.)

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

Warning

Review coverage is incomplete: 1 file could not be fully reviewed. Findings from completed review steps are included; see review info for details.

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: 5

Additional comments: 1
mobile/src/home/use-home-layout.ts: 1

22-26: Trivial · Data Integrity & Integration · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Gate the in-memory layout on a successful write, or roll back on failure.

saveLayout calls setLayout(next) before saveHomeLayout(next) settles. The .catch(() => {}) then discards any write failure. If AsyncStorage.setItem fails, the arrangement shows correctly for this session. It silently reverts on the next launch.

The repository learning says to update state only after the persistence write succeeds. If you keep the optimistic update for responsiveness, restore the previous layout in the catch handler. Alternatively, report the failure to the user.

Proposed fix (optimistic update with rollback)
-  const saveLayout = useCallback((next: HomeLayout) => {
-    setLayout(next)
-    // A failed write leaves this session arranged; the next launch shows the last saved layout.
-    void saveHomeLayout(next).catch(() => {})
-  }, [])
+  const saveLayout = useCallback((next: HomeLayout) => {
+    let previous: HomeLayout | null = null
+    setLayout((current) => {
+      previous = current
+      return next
+    })
+    void saveHomeLayout(next).catch(() => {
+      // Keep memory and storage in agreement when the write fails.
+      setLayout((current) => (current === next ? previous : current))
+    })
+  }, [])

Based on learnings: "only update in-memory React state after the persistence write succeeds" for hooks that synchronize state with a persistent store.

Source: Learnings

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: 0f91fd99-98ac-44a3-ab4c-369d0a51abeb
Commits

Reviewing files that changed from the base of the PR and between 3052dd7 and 108f92e.

Files selected for processing: 217
  • config/scripts/mobile-web-app/mobile-web-app-held-press-render.test.mjs
  • config/scripts/mobile-web-app/mobile-web-app-session-render.test.mjs
  • config/scripts/mobile-web-app/mobile-web-app-terminal-live-input-render.test.mjs
  • config/scripts/mobile-web-app/preview/mobile-web-app-held-press-probe-routes.mjs
  • config/scripts/mobile-web-app/preview/mobile-web-app-live-input-probe-route.mjs
  • mobile/app/h/[hostId]/edit.tsx
  • mobile/app/h/[hostId]/edit.web.tsx
  • mobile/app/terminal-settings.tsx
  • mobile/mobile-terminal-direct-input-default.md
  • mobile/rpc-foundation/goldens/matrix-session.create-terminal-session.tabs.createterminal-1.json
  • mobile/rpc-foundation/goldens/matrix-session.create-terminal-terminal.send-1.json
  • mobile/rpc-foundation/goldens/matrix-session.startup-worktree.activate-1.json
  • mobile/rpc-foundation/goldens/matrix-session.startup-worktree.activate-2.json
  • mobile/rpc-foundation/goldens/matrix-session.tab-close-session-session.tabs.close-1.json
  • mobile/rpc-foundation/goldens/matrix-session.tab-close-terminal.close-1.json
  • mobile/rpc-foundation/goldens/matrix-session.terminal-input-send-terminal.send-1.json
  • mobile/rpc-foundation/goldens/matrix-session.terminal-inventory-terminal.list-1.json
  • mobile/rpc-foundation/goldens/session-create-terminal-ignores-a-second-create-in-flight.json
  • mobile/rpc-foundation/goldens/session-create-terminal-launches-an-agent-quick-command.json
  • mobile/rpc-foundation/goldens/session-create-terminal-replaces-active.json
  • mobile/rpc-foundation/goldens/session-create-terminal-runs-a-quick-command.json
  • mobile/rpc-foundation/goldens/session-create-terminal-with-prompt.json
  • mobile/rpc-foundation/goldens/session-create-terminal-without-active-tab.json
  • mobile/rpc-foundation/goldens/session-startup-both-activation-sites.json
  • mobile/rpc-foundation/goldens/session-startup-floating-route-skips-activation.json
  • mobile/rpc-foundation/goldens/session-startup-keeps-terminals-visible-on-reconnect.json
  • mobile/rpc-foundation/goldens/session-startup-refused-tab-load-still-loads-terminals.json
  • mobile/rpc-foundation/goldens/session-tab-close-session-tab.json
  • mobile/rpc-foundation/goldens/session-tab-close-terminal.json
  • mobile/rpc-foundation/goldens/session-tab-closed.json
  • mobile/rpc-foundation/goldens/session-terminal-list-dedupes-handles.json
  • mobile/rpc-foundation/goldens/session-terminal-list-merged.json
  • mobile/rpc-foundation/goldens/terminal-input-send-accepted.json
  • mobile/rpc-foundation/goldens/terminal-input-send-refused.json
  • mobile/rpc-foundation/goldens/terminal-live-input-accepted.json
  • mobile/rpc-foundation/pilot-scenarios.json
  • mobile/src/accounts/MobileAccountsScreen.tsx
  • mobile/src/accounts/accounts-snapshot-stream.ts
  • mobile/src/accounts/use-open-mobile-accounts.ts
  • mobile/src/automations/AutomationControls.tsx
  • mobile/src/automations/AutomationManager.tsx
  • mobile/src/automations/MobileAutomationsScreen.tsx
  • mobile/src/automations/automation-styles.ts
  • mobile/src/components/AccountUsage.tsx
  • mobile/src/components/WorktreeListRow.test.ts
  • mobile/src/components/WorktreeListRow.tsx
  • mobile/src/components/bottom-drawer/bottom-drawer-styles.ts
  • mobile/src/components/bottom-drawer/mounted-bottom-drawer-keyboard-seam.test.tsx
  • mobile/src/components/bottom-drawer/mounted-bottom-drawer.tsx
  • mobile/src/components/composer-input/MessageBox.tsx
  • mobile/src/components/composer-input/TextField.tsx
  • mobile/src/components/composer-input/composer-input-styles.ts
  • mobile/src/components/use-anchored-detail-card.ts
  • mobile/src/components/use-detail-card-scope.web.test.tsx
  • mobile/src/components/use-detail-card-scope.web.ts
  • mobile/src/home/MobileHomeAccountUsage.tsx
  • mobile/src/home/MobileHomeArrangeSheet.tsx
  • mobile/src/home/MobileHomeDesktopRow.test.tsx
  • mobile/src/home/MobileHomeDesktopRow.tsx
  • mobile/src/home/MobileHomeHostList.tsx
  • mobile/src/home/MobileHomeJumpBackIn.test.tsx
  • mobile/src/home/MobileHomeJumpBackIn.tsx
  • mobile/src/home/MobileHomeScreen.tsx
  • mobile/src/home/MobileHomeSectionHeading.tsx
  • mobile/src/home/MobileHomeStats.tsx
  • mobile/src/home/MobileHomeTasksAndAutomations.test.tsx
  • mobile/src/home/MobileHomeTasksAndAutomations.tsx
  • mobile/src/home/MobileHomeTopBar.tsx
  • mobile/src/home/home-account-usage-rows.ts
  • mobile/src/home/home-layout.test.ts
  • mobile/src/home/home-layout.ts
  • mobile/src/home/home-list-styles.ts
  • mobile/src/home/use-home-layout.ts
  • mobile/src/home/use-mobile-home-data.ts
  • mobile/src/home/use-mobile-home-host-connections.ts
  • mobile/src/host-edit-route-accessibility.test.ts
  • mobile/src/host-edit-save-flow.test.ts
  • mobile/src/host-list-action-sheet-actions.ts
  • mobile/src/host-screen/host-screen-header-reconnect.test.tsx
  • mobile/src/host-screen/host-screen-header.tsx
  • mobile/src/host-screen/host-stored-identity.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/host-area-in-page-cleanup.test.tsx
  • mobile/src/mobile-web-shell/terminal-key-rail.test.tsx
  • mobile/src/mobile-web-shell/terminal-key-rail.tsx
  • mobile/src/platform/keyboard-persisting-taps.test.ts
  • mobile/src/session/MobileDictationMeter.tsx
  • mobile/src/session/MobileSessionAccessoryKeys.tsx
  • mobile/src/session/MobileSessionCommandDock.test.tsx
  • mobile/src/session/MobileSessionCommandDock.tsx
  • mobile/src/session/MobileSessionHeader.test.tsx
  • mobile/src/session/MobileSessionHeader.tsx
  • mobile/src/session/MobileSessionSurface.tsx
  • mobile/src/session/MobileSessionTab.tsx
  • mobile/src/session/MobileSessionTabCardFooter.tsx
  • mobile/src/session/MobileSessionTabStrip.test.tsx
  • mobile/src/session/MobileSessionTabStrip.tsx
  • mobile/src/session/MobileSessionTitleBlock.test.tsx
  • mobile/src/session/MobileSessionTitleBlock.tsx
  • mobile/src/session/MobileTerminalCommandDictationPreview.tsx
  • mobile/src/session/MobileTerminalInputActions.tsx
  • mobile/src/session/TerminalArrowPad.tsx
  • mobile/src/session/mobile-closed-tab-queued-edit-lifetime.test.tsx
  • mobile/src/session/mobile-closed-tab-send-cleanup-lifetime.test.tsx
  • mobile/src/session/mobile-dictation-agent-chat-start.test.tsx
  • mobile/src/session/mobile-dictation-mode-refresh.test.tsx
  • mobile/src/session/mobile-dictation-session-outcomes.test.tsx
  • mobile/src/session/mobile-file-preview-lifecycle.test.ts
  • mobile/src/session/mobile-image-live-input-order.test.tsx
  • mobile/src/session/mobile-markdown-document-lifetime.test.ts
  • mobile/src/session/mobile-session-accessory-repeat-lifecycle.test.tsx
  • mobile/src/session/mobile-session-diff-notes-new-agent-send.test.ts
  • mobile/src/session/mobile-session-header-overflow.test.tsx
  • mobile/src/session/mobile-session-preference-startup.test.ts
  • mobile/src/session/mobile-session-tab-card-content.test.ts
  • mobile/src/session/mobile-session-tab-card-content.ts
  • mobile/src/session/mobile-session-toast-owner-cleanup.test.tsx
  • mobile/src/session/mobile-terminal-layout-choice.test.tsx
  • mobile/src/session/mobile-terminal-prune-decision.test.ts
  • mobile/src/session/mobile-terminal-prune-decision.ts
  • mobile/src/session/mobile-terminal-split-gestures.test.tsx
  • mobile/src/session/mobile-terminal-split-input.test.tsx
  • mobile/src/session/mobile-terminal-tab-agent.ts
  • mobile/src/session/terminal-dock-styles.ts
  • mobile/src/session/terminal-field-submit-binding-send.test.tsx
  • mobile/src/session/terminal-tap-click-delivery.test.ts
  • mobile/src/session/use-mobile-agent-message-navigation.test.ts
  • mobile/src/session/use-mobile-dictation-destination.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-native-chat-dictation.ts
  • mobile/src/session/use-mobile-session-preference-focus.ts
  • mobile/src/session/use-mobile-session-screen-state.ts
  • mobile/src/session/use-mobile-session-startup.ts
  • mobile/src/session/use-mobile-session-tab-application-launch.test.ts
  • mobile/src/session/use-mobile-session-tab-application.ts
  • mobile/src/session/use-mobile-session-tab-switching.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.test.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.ts
  • mobile/src/session/use-mobile-session-terminal-create-agent-launch.test.ts
  • mobile/src/session/use-mobile-session-terminal-input.test.ts
  • mobile/src/session/use-mobile-session-terminal-input.ts
  • mobile/src/session/use-mobile-session-terminal-list-cache-retention.test.tsx
  • mobile/src/session/use-mobile-session-terminal-list.ts
  • mobile/src/session/use-mobile-session-terminal-runtime.ts
  • mobile/src/session/use-mobile-session-terminal-send-actions.ts
  • mobile/src/session/use-session-terminal-key-rail.ts
  • mobile/src/session/use-session-title-card.ts
  • mobile/src/session/use-terminal-dock-keys.ts
  • mobile/src/session/use-terminal-live-input-mode-preference.test.ts
  • mobile/src/session/use-terminal-live-input-mode-preference.ts
  • mobile/src/stats/home-stats-summary-read.ts
  • mobile/src/stats/home-stats-total.test.ts
  • mobile/src/stats/home-stats-total.ts
  • mobile/src/storage/preferences.test.ts
  • mobile/src/storage/preferences.ts
  • mobile/src/tasks/mobile-tasks-provider-pickers.tsx
  • mobile/src/terminal/buffered-terminal-draft-restoration.test.ts
  • mobile/src/terminal/buffered-terminal-draft-restoration.ts
  • mobile/src/terminal/terminal-input-connection-gate.ts
  • mobile/src/terminal/terminal-keyboard-dismiss.test.ts
  • mobile/src/terminal/terminal-keyboard-dismiss.ts
  • mobile/src/terminal/terminal-keyboard-type.ts
  • mobile/src/terminal/terminal-live-dictation-routing.ts
  • mobile/src/terminal/terminal-live-input.test.ts
  • mobile/src/terminal/terminal-live-input.ts
  • mobile/src/terminal/use-buffered-terminal-drafts-storage.test.tsx
  • mobile/src/terminal/use-buffered-terminal-drafts.test.tsx
  • mobile/src/terminal/use-buffered-terminal-drafts.ts
  • mobile/src/terminal/use-stored-buffered-terminal-drafts.ts
  • mobile/src/terminal/use-terminal-live-accessory-input-commit.test.ts
  • mobile/src/terminal/use-terminal-live-accessory-input-commit.ts
  • mobile/src/terminal/use-terminal-live-input-click.test.ts
  • mobile/src/terminal/use-terminal-live-input-commit.test.ts
  • mobile/src/terminal/use-terminal-live-input-commit.ts
  • mobile/src/terminal/use-terminal-live-input-focus.test.ts
  • mobile/src/terminal/use-terminal-live-input-focus.ts
  • mobile/src/terminal/use-terminal-live-pending-input-flush.ts
  • mobile/src/terminal/use-terminal-text-field-submit-binding.test.tsx
  • mobile/src/test-support/bridged-parity/divergence-classes.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-read-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-tab-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-startup-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-create-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-gesture-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-input-mount-adapters.ts
  • mobile/src/transport/host-descriptor-persistence.ts
  • mobile/src/transport/host-descriptor-recorder.test.ts
  • mobile/src/transport/host-descriptor-recorder.ts
  • mobile/src/transport/host-descriptor-store.ts
  • mobile/src/transport/host-metadata-store.ts
  • mobile/src/transport/host-name-identity.ts
  • mobile/src/transport/host-status-reply-schema.ts
  • mobile/src/transport/host-store.web.ts
  • mobile/src/transport/types.ts
  • mobile/src/transport/use-host-display.test.ts
  • mobile/src/transport/use-host-display.ts
  • src/main/runtime/host-machine-probe-parsing.test.ts
  • src/main/runtime/host-machine-probe-parsing.ts
  • src/main/runtime/rpc/methods/status-machine-name-publish-budget.test.ts
  • src/main/runtime/rpc/methods/status.test.ts
  • src/main/runtime/rpc/methods/status.ts
  • src/main/runtime/runtime-host-machine.ts
  • src/shared/host-display-resolution.test.ts
  • src/shared/host-display-resolution.ts
  • src/shared/host-machine-line.ts
  • src/shared/worktree/card-properties.ts
Files with no reviewable changes: 57
  • mobile/src/session/MobileSessionHeader.tsx
  • mobile/src/session/mobile-file-preview-lifecycle.test.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-tab-mount-adapters.ts
  • mobile/src/session/mobile-markdown-document-lifetime.test.ts
  • mobile/src/session/mobile-closed-tab-queued-edit-lifetime.test.tsx
  • mobile/src/session/mobile-closed-tab-send-cleanup-lifetime.test.tsx
  • mobile/mobile-terminal-direct-input-default.md
  • mobile/src/terminal/buffered-terminal-draft-restoration.test.ts
  • mobile/src/session/use-mobile-session-terminal-input.test.ts
  • mobile/rpc-foundation/goldens/terminal-input-send-accepted.json
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-create-mount-adapters.ts
  • mobile/src/session/MobileDictationMeter.tsx
  • mobile/src/session/MobileTerminalCommandDictationPreview.tsx
  • mobile/src/session/use-terminal-live-input-mode-preference.test.ts
  • mobile/src/terminal/terminal-keyboard-type.ts
  • mobile/src/session/use-mobile-agent-message-navigation.test.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.test.ts
  • mobile/src/session/mobile-terminal-prune-decision.ts
  • mobile/src/session/mobile-session-diff-notes-new-agent-send.test.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.ts
  • mobile/src/session/mobile-session-tab-card-content.ts
  • mobile/src/session/use-mobile-session-close-actions.test.tsx
  • mobile/rpc-foundation/goldens/terminal-input-send-refused.json
  • mobile/src/session/MobileSessionCommandDock.test.tsx
  • mobile/src/session/mobile-session-accessory-repeat-lifecycle.test.tsx
  • mobile/src/session/use-mobile-session-tab-switching.ts
  • mobile/src/session/mobile-dictation-mode-refresh.test.tsx
  • mobile/src/session/mobile-session-tab-card-content.test.ts
  • mobile/src/session/TerminalArrowPad.tsx
  • mobile/src/session/mobile-terminal-layout-choice.test.tsx
  • mobile/src/terminal/terminal-keyboard-dismiss.ts
  • mobile/src/session/use-terminal-live-input-mode-preference.ts
  • mobile/src/session/mobile-image-live-input-order.test.tsx
  • mobile/src/terminal/terminal-live-input.test.ts
  • mobile/src/terminal/use-buffered-terminal-drafts-storage.test.tsx
  • mobile/src/session/use-mobile-session-tab-application-launch.test.ts
  • mobile/src/session/mobile-terminal-split-input.test.tsx
  • mobile/rpc-foundation/pilot-scenarios.json
  • mobile/src/components/use-anchored-detail-card.ts
  • mobile/src/session/mobile-terminal-tab-agent.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-gesture-mount-adapters.ts
  • mobile/src/terminal/use-terminal-live-input-focus.test.ts
  • mobile/src/terminal/use-terminal-live-input-commit.test.ts
  • mobile/src/session/use-mobile-session-close-actions.ts
  • mobile/src/terminal/terminal-live-dictation-routing.ts
  • mobile/src/session/use-mobile-session-startup.ts
  • mobile/src/terminal/use-terminal-live-input-click.test.ts
  • mobile/src/storage/preferences.test.ts
  • mobile/src/test-support/rpc-recording/adapters/session-startup-mount-adapters.ts
  • mobile/src/session/MobileSessionTab.tsx
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-input-mount-adapters.ts
  • mobile/src/session/use-mobile-session-terminal-send-actions.ts
  • mobile/src/session/use-mobile-session-terminal-create-agent-launch.test.ts
  • mobile/src/session/MobileSessionTabCardFooter.tsx
  • mobile/src/terminal/terminal-live-input.ts
  • mobile/src/terminal/buffered-terminal-draft-restoration.ts
  • mobile/src/session/mobile-session-preference-startup.test.ts
Files not fully reviewed because their changes were unavailable: 1
  • mobile/rpc-foundation/goldens/matrix-session.startup-worktree.activate-1.json

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

Comment on lines +35 to +40
const { activeAccountId } = snapshot[provider]
const accounts: readonly { id: string; email: string }[] = snapshot[provider].accounts
rows.push({
host,
provider,
email: accounts.find((account) => account.id === activeAccountId)?.email ?? 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

Supported by static analysis

Script executed:

#!/bin/bash
rg -nP 'getActiveCodexAccountIdForRateLimitTarget' mobile/src -C3

Repository: stablyai/orca

Length of output: 6670


Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- changed selector ---'
nl -ba mobile/src/home/home-account-usage-rows.ts | sed -n '1,180p'
printf '%s\n' '--- resolved helper ---'
nl -ba mobile/src/components/codex-reset-credit.ts | sed -n '160,215p'
printf '%s\n' '--- shared usage binding ---'
nl -ba mobile/src/accounts/MobileAccountsScreen.tsx | sed -n '180,210p'
printf '%s\n' '--- selector references/tests ---'
rg -n -F --glob 'mobile/src/**' -e 'selectHomeAccountUsageRows' -e 'HomeAccountUsageRow' -e 'activeAccountIdsByRuntime' mobile/src/home mobile/src/components mobile/src/accounts || test "$?" -eq 1
printf '%s\n' '--- PR diff for selector ---'
git diff b10e0bde3b795916b377531df7e6e74aa94a03a0 108f92e374782cb28362922d2f3d43742aeae432 -- mobile/src/home/home-account-usage-rows.ts mobile/src/components/codex-reset-credit.ts mobile/src/accounts/MobileAccountsScreen.tsx

Repository: stablyai/orca

Length of output: 11912


Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- account usage state definitions ---'
rg -n -F --glob 'mobile/src/components/account-usage-state.ts' -e 'export function getActiveProviderRateLimits' -e 'function getActiveProviderRateLimits' -e 'codexTarget' -e 'hasRenderableUsage' mobile/src/components/account-usage-state.ts
nl -ba mobile/src/components/account-usage-state.ts | sed -n '1,180p'
printf '%s\n' '--- home imports and related tests ---'
rg -n -F --glob 'mobile/src/home/**' -e 'codex-reset-credit' -e 'activeAccountId' -e 'selectHomeAccountUsageRows' mobile/src/home || test "$?" -eq 1

Repository: stablyai/orca

Length of output: 5018


Use the rate-limit-target account ID for Codex when runtime selections exist.

When snapshot.codex.activeAccountIdsByRuntime is set, resolve the email with getActiveCodexAccountIdForRateLimitTarget(snapshot). Otherwise, keep using snapshot[provider].activeAccountId.

Suggested fix
+import { getActiveCodexAccountIdForRateLimitTarget } from '../components/codex-reset-credit'
+
...
-      const { activeAccountId } = snapshot[provider]
+      const activeAccountId =
+        provider === 'codex' && snapshot.codex.activeAccountIdsByRuntime
+          ? getActiveCodexAccountIdForRateLimitTarget(snapshot)
+          : snapshot[provider].activeAccountId

]
// Unlike the screens above, these work on the saved host, so they stay offered while disconnected.
const hostGroup: ActionSheetAction[] = [
hostEditAction(() => actions.navigateFromHostList(`${hostPath}/edit`)),

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

Do not offer Edit host where the edit form is unavailable.

On mobile web, this action navigates to /h/{hostId}/edit, but edit.web.tsx exports a catch-all route instead of the edit form. Users who select Edit host cannot edit the host. Hide this action on web, or provide a working web edit route. (raw.githubusercontent.com)

Comment on lines +186 to +187
// A web <button> clicks on Enter keydown as well, which would send a held key twice.
accessibilityRole={key.repeatable ? undefined : 'button'}

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 button role on native platforms for repeatable keys.

The comment explains a web-only problem. A web <button> fires click on Enter keydown, which would send a held key twice. The code removes accessibilityRole for every platform, so on iOS and Android screen readers no longer announce Arrow Up, Arrow Down, and the other repeatable keys as buttons. Remove the role only on web.

This change needs Platform added to the existing react-native import on Line 2.

♿ Proposed fix
-            accessibilityRole={key.repeatable ? undefined : 'button'}
+            accessibilityRole={key.repeatable && Platform.OS === 'web' ? undefined : 'button'}
-import { View, Text, ScrollView, Pressable } from 'react-native'
+import { View, Text, ScrollView, Pressable, Platform } from 'react-native'

Comment on lines +20 to +22
const [, hostMachine] = await Promise.all([
runtime.machineNameReady(),
readHostMachineWithin(MACHINE_NAME_PUBLISH_WAIT_MS)

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

Supported by static analysis

Script executed:

#!/bin/bash
# Inspect full-status requests, probe-only requests, and descriptor recording.
rg -n -C 5 'recordHostDescriptorFromStatus\s*\(|status\.get|probe:\s*true' mobile/src --glob '*.{ts,tsx}'

Repository: stablyai/orca

Length of output: 45667


Script executed:

set -o pipefail
printf '%s\n' '--- status handler ---'
nl -ba src/main/runtime/rpc/methods/status.ts | sed -n '1,140p'
printf '%s\n' '--- runtime status probe implementation ---'
rg -n -F --glob '*.ts' -e 'function startRuntimeStatusProbe' -e 'const startRuntimeStatusProbe' -e 'startRuntimeStatusProbe' mobile/src
probe_file="$(rg -l -F --glob '*.ts' 'startRuntimeStatusProbe' mobile/src | head -n 1)"
if [ -n "$probe_file" ]; then
  printf '%s\n' "--- $probe_file ---"
  nl -ba "$probe_file" | sed -n '1,260p'
fi
printf '%s\n' '--- status probe tests ---'
nl -ba mobile/src/transport/runtime-status-probe.test.ts | sed -n '1,190p'
printf '%s\n' '--- descriptor recorder and status-gate caller ---'
rg -n -C 8 -F --glob '*.ts' -e 'recordHostDescriptorFromStatus' -e 'startRuntimeStatusProbe(' mobile/src/transport mobile/src | head -n 260

Repository: stablyai/orca

Length of output: 43102


Script executed:

printf '%s\n' '--- runtime-status-probe.ts ---'
nl -ba mobile/src/transport/runtime-status-probe.ts | sed -n '1,220p'
printf '%s\n' '--- host-entry-opener lifecycle ---'
nl -ba mobile/src/transport/host-entry-opener.ts | sed -n '108,150p'
printf '%s\n' '--- status schema ---'
nl -ba mobile/src/transport/host-status-reply-schema.ts | sed -n '1,160p'

Repository: stablyai/orca

Length of output: 6219


Script executed:

printf '%s\n' '--- host status probe operation ---'
nl -ba mobile/src/transport/host-status-probe-operations.ts | sed -n '1,180p'
printf '%s\n' '--- probe result reader ---'
rg -n -C 10 -F --glob '*.ts' -e 'function readProbedHostStatus' -e 'readProbedHostStatus' mobile/src/transport

Repository: stablyai/orca

Length of output: 13584


Script executed:

nl -ba mobile/src/transport/rpc-operation.ts | sed -n '1,240p'
rg -n -C 8 -F --glob '*.ts' -e 'function bindDeferredRpcOperation' -e 'bindDeferredRpcOperation' mobile/src/transport/rpc-operation.ts mobile/src/transport

Repository: stablyai/orca

Length of output: 37274


Script executed:

printf '%s\n' '--- host-status-gates lifecycle ---'
nl -ba mobile/src/transport/host-status-gates.ts | sed -n '80,180p'
printf '%s\n' '--- host-status-gates callers ---'
rg -n -C 5 -F --glob '*.{ts,tsx}' -e 'useHostStatusGates(' mobile/src | head -n 260

Repository: stablyai/orca

Length of output: 17956


Refresh the full status after an incomplete machine lookup.

A slow readHostMachineWithin call can produce a successful full status.get response without hostMachine. The mobile probe accepts that response and stops, so machine type and model can remain absent until another full request or reconnect. Schedule a later full status.get after this omission, not a { probe: true } request, while preserving cancellation and legacy-host handling.

if (process.platform === 'darwin') {
const stdout = await runProbe(MAC_SYSTEM_PROFILER, ['SPHardwareDataType', '-json'])
const machine = stdout === null ? null : parseMacHardwareProfile(stdout)
return { machine: machine ?? MAC_FALLBACK_MACHINE, final: machine !== 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

Do not report a desktop when the hardware probe fails.

If system_profiler or PowerShell fails, these fallbacks report kind: 'desktop' even when the host is a laptop. Full status then sends that classification, and mobile can retain it as last-known machine data. Return an unknown machine on probe failure and retain the existing retry behavior. (raw.githubusercontent.com)

Proposed change
-    return { machine: machine ?? MAC_FALLBACK_MACHINE, final: machine !== null }
+    return { machine, final: machine !== null }
...
-    return { machine: machine ?? WINDOWS_FALLBACK_MACHINE, final: machine !== null }
+    return { machine, final: machine !== null }

Also applies to: 67-67

A bare re-export of the catch-all route compiled to the same asset as
[...page], so the page manifest listed it twice and the desktop template's
inventory check refused the build.

@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: 5

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: 31969040-6c26-4ce8-b6b2-d98610dbe789
Commits

Reviewing files that changed from the base of the PR and between 3052dd7 and 4795339.

Files selected for processing: 217
  • config/scripts/mobile-web-app/mobile-web-app-held-press-render.test.mjs
  • config/scripts/mobile-web-app/mobile-web-app-session-render.test.mjs
  • config/scripts/mobile-web-app/mobile-web-app-terminal-live-input-render.test.mjs
  • config/scripts/mobile-web-app/preview/mobile-web-app-held-press-probe-routes.mjs
  • config/scripts/mobile-web-app/preview/mobile-web-app-live-input-probe-route.mjs
  • mobile/app/h/[hostId]/edit.tsx
  • mobile/app/h/[hostId]/edit.web.tsx
  • mobile/app/terminal-settings.tsx
  • mobile/mobile-terminal-direct-input-default.md
  • mobile/rpc-foundation/goldens/matrix-session.create-terminal-session.tabs.createterminal-1.json
  • mobile/rpc-foundation/goldens/matrix-session.create-terminal-terminal.send-1.json
  • mobile/rpc-foundation/goldens/matrix-session.startup-worktree.activate-1.json
  • mobile/rpc-foundation/goldens/matrix-session.startup-worktree.activate-2.json
  • mobile/rpc-foundation/goldens/matrix-session.tab-close-session-session.tabs.close-1.json
  • mobile/rpc-foundation/goldens/matrix-session.tab-close-terminal.close-1.json
  • mobile/rpc-foundation/goldens/matrix-session.terminal-input-send-terminal.send-1.json
  • mobile/rpc-foundation/goldens/matrix-session.terminal-inventory-terminal.list-1.json
  • mobile/rpc-foundation/goldens/session-create-terminal-ignores-a-second-create-in-flight.json
  • mobile/rpc-foundation/goldens/session-create-terminal-launches-an-agent-quick-command.json
  • mobile/rpc-foundation/goldens/session-create-terminal-replaces-active.json
  • mobile/rpc-foundation/goldens/session-create-terminal-runs-a-quick-command.json
  • mobile/rpc-foundation/goldens/session-create-terminal-with-prompt.json
  • mobile/rpc-foundation/goldens/session-create-terminal-without-active-tab.json
  • mobile/rpc-foundation/goldens/session-startup-both-activation-sites.json
  • mobile/rpc-foundation/goldens/session-startup-floating-route-skips-activation.json
  • mobile/rpc-foundation/goldens/session-startup-keeps-terminals-visible-on-reconnect.json
  • mobile/rpc-foundation/goldens/session-startup-refused-tab-load-still-loads-terminals.json
  • mobile/rpc-foundation/goldens/session-tab-close-session-tab.json
  • mobile/rpc-foundation/goldens/session-tab-close-terminal.json
  • mobile/rpc-foundation/goldens/session-tab-closed.json
  • mobile/rpc-foundation/goldens/session-terminal-list-dedupes-handles.json
  • mobile/rpc-foundation/goldens/session-terminal-list-merged.json
  • mobile/rpc-foundation/goldens/terminal-input-send-accepted.json
  • mobile/rpc-foundation/goldens/terminal-input-send-refused.json
  • mobile/rpc-foundation/goldens/terminal-live-input-accepted.json
  • mobile/rpc-foundation/pilot-scenarios.json
  • mobile/src/accounts/MobileAccountsScreen.tsx
  • mobile/src/accounts/accounts-snapshot-stream.ts
  • mobile/src/accounts/use-open-mobile-accounts.ts
  • mobile/src/automations/AutomationControls.tsx
  • mobile/src/automations/AutomationManager.tsx
  • mobile/src/automations/MobileAutomationsScreen.tsx
  • mobile/src/automations/automation-styles.ts
  • mobile/src/components/AccountUsage.tsx
  • mobile/src/components/WorktreeListRow.test.ts
  • mobile/src/components/WorktreeListRow.tsx
  • mobile/src/components/bottom-drawer/bottom-drawer-styles.ts
  • mobile/src/components/bottom-drawer/mounted-bottom-drawer-keyboard-seam.test.tsx
  • mobile/src/components/bottom-drawer/mounted-bottom-drawer.tsx
  • mobile/src/components/composer-input/MessageBox.tsx
  • mobile/src/components/composer-input/TextField.tsx
  • mobile/src/components/composer-input/composer-input-styles.ts
  • mobile/src/components/use-anchored-detail-card.ts
  • mobile/src/components/use-detail-card-scope.web.test.tsx
  • mobile/src/components/use-detail-card-scope.web.ts
  • mobile/src/home/MobileHomeAccountUsage.tsx
  • mobile/src/home/MobileHomeArrangeSheet.tsx
  • mobile/src/home/MobileHomeDesktopRow.test.tsx
  • mobile/src/home/MobileHomeDesktopRow.tsx
  • mobile/src/home/MobileHomeHostList.tsx
  • mobile/src/home/MobileHomeJumpBackIn.test.tsx
  • mobile/src/home/MobileHomeJumpBackIn.tsx
  • mobile/src/home/MobileHomeScreen.tsx
  • mobile/src/home/MobileHomeSectionHeading.tsx
  • mobile/src/home/MobileHomeStats.tsx
  • mobile/src/home/MobileHomeTasksAndAutomations.test.tsx
  • mobile/src/home/MobileHomeTasksAndAutomations.tsx
  • mobile/src/home/MobileHomeTopBar.tsx
  • mobile/src/home/home-account-usage-rows.ts
  • mobile/src/home/home-layout.test.ts
  • mobile/src/home/home-layout.ts
  • mobile/src/home/home-list-styles.ts
  • mobile/src/home/use-home-layout.ts
  • mobile/src/home/use-mobile-home-data.ts
  • mobile/src/home/use-mobile-home-host-connections.ts
  • mobile/src/host-edit-route-accessibility.test.ts
  • mobile/src/host-edit-save-flow.test.ts
  • mobile/src/host-list-action-sheet-actions.ts
  • mobile/src/host-screen/host-screen-header-reconnect.test.tsx
  • mobile/src/host-screen/host-screen-header.tsx
  • mobile/src/host-screen/host-stored-identity.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/host-area-in-page-cleanup.test.tsx
  • mobile/src/mobile-web-shell/terminal-key-rail.test.tsx
  • mobile/src/mobile-web-shell/terminal-key-rail.tsx
  • mobile/src/platform/keyboard-persisting-taps.test.ts
  • mobile/src/session/MobileDictationMeter.tsx
  • mobile/src/session/MobileSessionAccessoryKeys.tsx
  • mobile/src/session/MobileSessionCommandDock.test.tsx
  • mobile/src/session/MobileSessionCommandDock.tsx
  • mobile/src/session/MobileSessionHeader.test.tsx
  • mobile/src/session/MobileSessionHeader.tsx
  • mobile/src/session/MobileSessionSurface.tsx
  • mobile/src/session/MobileSessionTab.tsx
  • mobile/src/session/MobileSessionTabCardFooter.tsx
  • mobile/src/session/MobileSessionTabStrip.test.tsx
  • mobile/src/session/MobileSessionTabStrip.tsx
  • mobile/src/session/MobileSessionTitleBlock.test.tsx
  • mobile/src/session/MobileSessionTitleBlock.tsx
  • mobile/src/session/MobileTerminalCommandDictationPreview.tsx
  • mobile/src/session/MobileTerminalInputActions.tsx
  • mobile/src/session/TerminalArrowPad.tsx
  • mobile/src/session/mobile-closed-tab-queued-edit-lifetime.test.tsx
  • mobile/src/session/mobile-closed-tab-send-cleanup-lifetime.test.tsx
  • mobile/src/session/mobile-dictation-agent-chat-start.test.tsx
  • mobile/src/session/mobile-dictation-mode-refresh.test.tsx
  • mobile/src/session/mobile-dictation-session-outcomes.test.tsx
  • mobile/src/session/mobile-file-preview-lifecycle.test.ts
  • mobile/src/session/mobile-image-live-input-order.test.tsx
  • mobile/src/session/mobile-markdown-document-lifetime.test.ts
  • mobile/src/session/mobile-session-accessory-repeat-lifecycle.test.tsx
  • mobile/src/session/mobile-session-diff-notes-new-agent-send.test.ts
  • mobile/src/session/mobile-session-header-overflow.test.tsx
  • mobile/src/session/mobile-session-preference-startup.test.ts
  • mobile/src/session/mobile-session-tab-card-content.test.ts
  • mobile/src/session/mobile-session-tab-card-content.ts
  • mobile/src/session/mobile-session-toast-owner-cleanup.test.tsx
  • mobile/src/session/mobile-terminal-layout-choice.test.tsx
  • mobile/src/session/mobile-terminal-prune-decision.test.ts
  • mobile/src/session/mobile-terminal-prune-decision.ts
  • mobile/src/session/mobile-terminal-split-gestures.test.tsx
  • mobile/src/session/mobile-terminal-split-input.test.tsx
  • mobile/src/session/mobile-terminal-tab-agent.ts
  • mobile/src/session/terminal-dock-styles.ts
  • mobile/src/session/terminal-field-submit-binding-send.test.tsx
  • mobile/src/session/terminal-tap-click-delivery.test.ts
  • mobile/src/session/use-mobile-agent-message-navigation.test.ts
  • mobile/src/session/use-mobile-dictation-destination.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-native-chat-dictation.ts
  • mobile/src/session/use-mobile-session-preference-focus.ts
  • mobile/src/session/use-mobile-session-screen-state.ts
  • mobile/src/session/use-mobile-session-startup.ts
  • mobile/src/session/use-mobile-session-tab-application-launch.test.ts
  • mobile/src/session/use-mobile-session-tab-application.ts
  • mobile/src/session/use-mobile-session-tab-switching.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.test.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.ts
  • mobile/src/session/use-mobile-session-terminal-create-agent-launch.test.ts
  • mobile/src/session/use-mobile-session-terminal-input.test.ts
  • mobile/src/session/use-mobile-session-terminal-input.ts
  • mobile/src/session/use-mobile-session-terminal-list-cache-retention.test.tsx
  • mobile/src/session/use-mobile-session-terminal-list.ts
  • mobile/src/session/use-mobile-session-terminal-runtime.ts
  • mobile/src/session/use-mobile-session-terminal-send-actions.ts
  • mobile/src/session/use-session-terminal-key-rail.ts
  • mobile/src/session/use-session-title-card.ts
  • mobile/src/session/use-terminal-dock-keys.ts
  • mobile/src/session/use-terminal-live-input-mode-preference.test.ts
  • mobile/src/session/use-terminal-live-input-mode-preference.ts
  • mobile/src/stats/home-stats-summary-read.ts
  • mobile/src/stats/home-stats-total.test.ts
  • mobile/src/stats/home-stats-total.ts
  • mobile/src/storage/preferences.test.ts
  • mobile/src/storage/preferences.ts
  • mobile/src/tasks/mobile-tasks-provider-pickers.tsx
  • mobile/src/terminal/buffered-terminal-draft-restoration.test.ts
  • mobile/src/terminal/buffered-terminal-draft-restoration.ts
  • mobile/src/terminal/terminal-input-connection-gate.ts
  • mobile/src/terminal/terminal-keyboard-dismiss.test.ts
  • mobile/src/terminal/terminal-keyboard-dismiss.ts
  • mobile/src/terminal/terminal-keyboard-type.ts
  • mobile/src/terminal/terminal-live-dictation-routing.ts
  • mobile/src/terminal/terminal-live-input.test.ts
  • mobile/src/terminal/terminal-live-input.ts
  • mobile/src/terminal/use-buffered-terminal-drafts-storage.test.tsx
  • mobile/src/terminal/use-buffered-terminal-drafts.test.tsx
  • mobile/src/terminal/use-buffered-terminal-drafts.ts
  • mobile/src/terminal/use-stored-buffered-terminal-drafts.ts
  • mobile/src/terminal/use-terminal-live-accessory-input-commit.test.ts
  • mobile/src/terminal/use-terminal-live-accessory-input-commit.ts
  • mobile/src/terminal/use-terminal-live-input-click.test.ts
  • mobile/src/terminal/use-terminal-live-input-commit.test.ts
  • mobile/src/terminal/use-terminal-live-input-commit.ts
  • mobile/src/terminal/use-terminal-live-input-focus.test.ts
  • mobile/src/terminal/use-terminal-live-input-focus.ts
  • mobile/src/terminal/use-terminal-live-pending-input-flush.ts
  • mobile/src/terminal/use-terminal-text-field-submit-binding.test.tsx
  • mobile/src/test-support/bridged-parity/divergence-classes.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-read-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-tab-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-startup-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-create-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-gesture-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-input-mount-adapters.ts
  • mobile/src/transport/host-descriptor-persistence.ts
  • mobile/src/transport/host-descriptor-recorder.test.ts
  • mobile/src/transport/host-descriptor-recorder.ts
  • mobile/src/transport/host-descriptor-store.ts
  • mobile/src/transport/host-metadata-store.ts
  • mobile/src/transport/host-name-identity.ts
  • mobile/src/transport/host-status-reply-schema.ts
  • mobile/src/transport/host-store.web.ts
  • mobile/src/transport/types.ts
  • mobile/src/transport/use-host-display.test.ts
  • mobile/src/transport/use-host-display.ts
  • src/main/runtime/host-machine-probe-parsing.test.ts
  • src/main/runtime/host-machine-probe-parsing.ts
  • src/main/runtime/rpc/methods/status-machine-name-publish-budget.test.ts
  • src/main/runtime/rpc/methods/status.test.ts
  • src/main/runtime/rpc/methods/status.ts
  • src/main/runtime/runtime-host-machine.ts
  • src/shared/host-display-resolution.test.ts
  • src/shared/host-display-resolution.ts
  • src/shared/host-machine-line.ts
  • src/shared/worktree/card-properties.ts
Files with no reviewable changes: 57
  • mobile/src/session/mobile-session-diff-notes-new-agent-send.test.ts
  • mobile/src/session/use-mobile-session-close-actions.test.tsx
  • mobile/mobile-terminal-direct-input-default.md
  • mobile/src/session/mobile-terminal-layout-choice.test.tsx
  • mobile/src/session/mobile-markdown-document-lifetime.test.ts
  • mobile/src/session/MobileDictationMeter.tsx
  • mobile/src/session/use-mobile-session-terminal-create-agent-launch.test.ts
  • mobile/src/session/use-mobile-session-tab-application-launch.test.ts
  • mobile/src/session/mobile-file-preview-lifecycle.test.ts
  • mobile/src/session/use-mobile-agent-message-navigation.test.ts
  • mobile/src/session/mobile-session-accessory-repeat-lifecycle.test.tsx
  • mobile/rpc-foundation/goldens/terminal-input-send-refused.json
  • mobile/src/session/MobileSessionHeader.tsx
  • mobile/src/session/mobile-terminal-prune-decision.ts
  • mobile/rpc-foundation/goldens/terminal-input-send-accepted.json
  • mobile/src/session/mobile-image-live-input-order.test.tsx
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-gesture-mount-adapters.ts
  • mobile/src/session/mobile-terminal-split-input.test.tsx
  • mobile/src/terminal/buffered-terminal-draft-restoration.test.ts
  • mobile/src/session/mobile-closed-tab-send-cleanup-lifetime.test.tsx
  • mobile/src/session/MobileSessionCommandDock.test.tsx
  • mobile/src/session/use-mobile-session-terminal-create-actions.ts
  • mobile/src/session/use-mobile-session-startup.ts
  • mobile/src/terminal/use-terminal-live-input-click.test.ts
  • mobile/src/terminal/terminal-keyboard-type.ts
  • mobile/src/session/mobile-terminal-tab-agent.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-tab-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-create-mount-adapters.ts
  • mobile/src/session/use-terminal-live-input-mode-preference.test.ts
  • mobile/src/terminal/use-terminal-live-input-focus.test.ts
  • mobile/src/terminal/use-terminal-live-input-commit.test.ts
  • mobile/src/session/MobileSessionTab.tsx
  • mobile/src/test-support/rpc-recording/adapters/session-startup-mount-adapters.ts
  • mobile/src/session/use-mobile-session-close-actions.ts
  • mobile/src/terminal/use-buffered-terminal-drafts-storage.test.tsx
  • mobile/src/session/mobile-dictation-mode-refresh.test.tsx
  • mobile/src/terminal/terminal-live-dictation-routing.ts
  • mobile/src/terminal/terminal-keyboard-dismiss.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.test.ts
  • mobile/src/session/MobileTerminalCommandDictationPreview.tsx
  • mobile/rpc-foundation/pilot-scenarios.json
  • mobile/src/session/mobile-closed-tab-queued-edit-lifetime.test.tsx
  • mobile/src/session/use-mobile-session-tab-switching.ts
  • mobile/src/session/use-mobile-session-terminal-send-actions.ts
  • mobile/src/storage/preferences.test.ts
  • mobile/src/session/MobileSessionTabCardFooter.tsx
  • mobile/src/components/use-anchored-detail-card.ts
  • mobile/src/session/use-mobile-session-terminal-input.test.ts
  • mobile/src/session/mobile-session-tab-card-content.test.ts
  • mobile/src/terminal/terminal-live-input.test.ts
  • mobile/src/session/TerminalArrowPad.tsx
  • mobile/src/session/mobile-session-tab-card-content.ts
  • mobile/src/session/mobile-session-preference-startup.test.ts
  • mobile/src/session/use-terminal-live-input-mode-preference.ts
  • mobile/src/terminal/terminal-live-input.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-input-mount-adapters.ts
  • mobile/src/terminal/buffered-terminal-draft-restoration.ts
Files not fully reviewed because their changes were unavailable: 1
  • mobile/rpc-foundation/goldens/matrix-session.startup-worktree.activate-1.json

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

Comment on lines +187 to +192
async function handleRemove() {
if (!host) {
return
}
try {
await removeHostAndCloseClient(host.id, forgetHostClient)

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 · Stability & Availability · Quick win

Block a second removal while the first is pending.

ConfirmModal closes as soon as confirmation calls handleRemove. The removal row then becomes available again because it is disabled only by saving. A user can confirm the same host twice while removeHostAndCloseClient is pending. Add a synchronous in-flight guard and disable the row until removal settles. Based on learnings, repeated asynchronous UI actions need a pending guard when they can start duplicate effects. (raw.githubusercontent.com)

Source: Learnings

Comment on lines +201 to +202
routeRevision.current += 1
leaveHostRoute(router)

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

Do not exit a route that the user has already left.

If the user presses Back while removal is pending, leave() advances routeRevision, but handleRemove still calls leaveHostRoute(router) when removal finishes. That completion can redirect the user from a later screen to Home. Capture the revision before the await and check it before navigation or failure UI, as handleSave does. (raw.githubusercontent.com)

Comment on lines +93 to +113
// One stream per connection: each subscribe makes the desktop check usage, so focus must not resubscribe.
unsubscribeAccounts ??= subscribeAccountsSnapshots(entry.client, {
onSnapshot: (snapshot) =>
setAccounts((previous) => ({ ...previous, [entry.hostId]: snapshot })),
onInvalidSnapshot: () => setAccounts((previous) => withoutHost(previous, entry.hostId)),
onStreamError: () => {}
})
if (reconnected) {
refreshWorktrees()
fetchHomeHostStats(entry.client, entry.hostId, setStats, () => false)
}
return
}
unsubscribeNotifications?.()
unsubscribeNotifications = null
unsubscribeClientEvents?.()
unsubscribeClientEvents = null
unsubscribeAccounts?.()
unsubscribeAccounts = null
// Usage is live; a disconnected desktop's last numbers would read as current.
setAccounts((previous) => withoutHost(previous, entry.hostId))

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

Supported by static analysis

Script executed:

sed -n '68,134p' mobile/src/home/use-mobile-home-host-connections.ts
sed -n '135,166p' mobile/src/accounts/MobileAccountsScreen.tsx
sed -n '1,70p' mobile/src/accounts/accounts-snapshot-stream.ts

Repository: stablyai/orca

Length of output: 4751


Script executed:

set -o pipefail
printf '%s\n' '--- Home hook and callers ---'
rg -n -F --glob '*.ts' --glob '*.tsx' -e 'useMobileHomeHostConnections' -e 'isHomeFocused' -e 'MobileAccountsScreen' mobile/src mobile/tests || test "$?" -eq 1
sed -n '1,240p' mobile/src/home/use-mobile-home-host-connections.ts
printf '%s\n' '--- subscription implementation and account stream producers ---'
rg -n -F --glob '*.ts' --glob '*.tsx' -e "subscribe(method" -e "subscribe(" -e "'accounts.subscribe'" -e '"accounts.subscribe"' src mobile | head -240
rg -n -F --glob '*.ts' --glob '*.tsx' -e "'accounts.subscribe'" -e '"accounts.subscribe"' src mobile
printf '%s\n' '--- account stream tests and recovery comparisons ---'
rg -n -F --glob '*.{test,spec}.{ts,tsx}' -e 'subscribeAccountsSnapshots' -e 'onStreamError' -e 'type:.*error' mobile src || test "$?" -eq 1

Repository: stablyai/orca

Length of output: 39121


Script executed:

set -o pipefail
printf '%s\n' '--- RpcClient.subscribe ---'
sed -n '220,310p' mobile/src/mobile-web-shell/bridge/bridge-rpc-client.ts
printf '%s\n' '--- stream registry and server-subscription policy ---'
sed -n '1,180p' mobile/src/transport/rpc-client-server-subscription.ts
rg -n -F --glob '*.ts' -e 'type: .error.' -e 'error:' mobile/src/transport mobile/src/mobile-web-shell/bridge | head -120
printf '%s\n' '--- paired desktop accounts.subscribe producer ---'
sed -n '210,285p' src/main/runtime/rpc/methods/accounts.ts
sed -n '1,90p' mobile/src/home/use-mobile-home-data.ts
printf '%s\n' '--- producer tests around accounts.subscribe ---'
sed -n '300,370p' src/main/runtime/rpc/methods/accounts.test.ts

Repository: stablyai/orca

Length of output: 27891


Script executed:

set -o pipefail
printf '%s\n' '--- explicit stream error emission ---'
rg -n -F --glob '*.ts' -e "emit({ type: 'error'" -e 'emit({ type: "error"' -e "'type': 'error'" -e '"type": "error"' src/main mobile/src shared || test "$?" -eq 1
printf '%s\n' '--- mobile subscription registry ---'
rg -n -F --glob '*.ts' -e 'class Stream' -e 'function create.*Subscription' -e 'subscriptions.open' -e 'stream-failed' mobile/src/mobile-web-shell/bridge
sed -n '1,260p' mobile/src/mobile-web-shell/bridge/bridge-client-subscriptions.ts
printf '%s\n' '--- streaming dispatch error path ---'
rg -n -F --glob '*.ts' -e 'dispatchStreaming' -e 'StreamingMethod' src/main/runtime src/main | head -100

Repository: stablyai/orca

Length of output: 19282


Script executed:

set -o pipefail
printf '%s\n' '--- bridge stream termination handling ---'
sed -n '1,75p' mobile/src/mobile-web-shell/bridge/bridge-client-inbound-frames.ts
printf '%s\n' '--- streaming dispatcher implementation ---'
sed -n '96,170p' src/main/runtime/rpc/dispatcher.ts
printf '%s\n' '--- stream termination tests ---'
sed -n '120,165p' mobile/src/mobile-web-shell/bridge/bridge-rpc-client.test.ts
rg -n -F --glob '*.test.ts' -e 'bridgeStreamError' -e 'dispatchStreaming' src/main/runtime/rpc/dispatcher* mobile/src/mobile-web-shell/bridge | head -80

Repository: stablyai/orca

Length of output: 8133


Recover Home account usage after an accounts.subscribe error.

The account screen refreshes its snapshot when the stream reports an error, but Home ignores the same callback. The bridge retires the failed stream without changing the host connection state. Home therefore keeps the last valid usage snapshot and does not resubscribe or refresh it. Handle this callback with the account screen's one-shot refresh fallback and recreate the stream after the failed subscription is retired.

"messageAgentPlaceholder": "Mensaje para {{agent}}",
"writeCommandPlaceholder": "Escribe un comando y luego envíalo",
"theAgent": "el agente"
"liveInputLabel": "Entrada al terminal en tiempo real"

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 missing Spanish tapToShowKeyboard translation.

MobileSessionCommandDock reads session.commandDock.tapToShowKeyboard for the live-input placeholder. The Spanish commandDock section does not define this key, so Spanish users see the English fallback Tap to show keyboard. Add a Spanish translation such as Toca para mostrar el teclado. (raw.githubusercontent.com)

@@ -6,7 +6,8 @@ import type { HostStatusReply } from './host-status-reply-schema'
export function recordHostDescriptorFromStatus(hostId: string, status: HostStatusReply): void {
const descriptor = {
machineName: status.machineName?.trim() || null,
platform: status.hostPlatform ?? null
platform: status.hostPlatform ?? null,
machine: status.hostMachine ?? 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 · Data Integrity & Integration · Quick win

Preserve machine metadata while the probe is pending.

If the bounded hardware lookup is still running, status.get omits hostMachine. This line converts that omission to null. When the response also contains a machine name or platform, updateHostDescriptor can then clear lastKnownHostMachine from storage. Distinguish a pending probe from an older host that does not report machine metadata before clearing the stored value. (raw.githubusercontent.com)

@AmoabaKelvin

Copy link
Copy Markdown
Collaborator Author

Folded into #38206, which carries these commits rebased onto main together with the Home tabs.

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.

[Bug]: Mobile "Jump back in" shows only branch names, making recent workspaces indistinguishable

1 participant