Skip to content

fix(mobile): load the right agent history when you switch computers - #31695

Merged
nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/mobile-monkey-history-host-owner
Oct 22, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/mobile-monkey-history-host-owner

Conversation

@nwparker

@nwparker nwparker commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

“History” means the list of previous Claude/Codex conversations you can reopen. On mobile, open a supported workspace's ⋯ menu → Agent History. The page is titled Agent Session History; each row is a previous conversation, and the triangle resumes it.

Where to find Agent History and what its conversation list looks like

The bug: after switching from your MacBook to your Work PC, this list can still show your MacBook's conversations while the Work PC's folders are loading. It can also try to search a MacBook folder on the Work PC.

The fix: clear the old computer's list immediately, then load the selected computer's conversations. In this example, “Fix the login page” belongs to the MacBook; “Set up the database” belongs to the Work PC. Your saved conversations stay on their original computers. Reconnecting to the same computer keeps the current list.

Before and after switching from MacBook to Work PC

These explanatory screenshots render actual production mobile components with example conversations in a headless browser. Transport, surrounding context, and drawer placement are controlled; these are not native phone captures. The before/after panel sources are the same exact commits documented below. Assertions check the stale row before the fix, its immediate removal after the fix, the correct Work PC result, and the menu action.

What Changed

  • Start a fresh history view when you select a different computer.
  • Wait for that computer's project folders before searching its history.
  • Keep the existing list when reconnecting to the same computer.

Why

The sessions and project folders shown in history must come from the computer you are currently using.

Linked Issue

Maintainer-discovered regression. Bounded GitHub symptom and exact-file searches found no exact duplicate. Related #24772 and #28933 concern scan notices and transcript tails; this fixes cross-desktop catalog ownership.

Visual Proof

Captured with the visual-proof skill. Before uses base 15246eb4a45; after uses this PR's standalone commit 1832bd781e5. The scenario passed asserted capture runs 3 times per version before representative screenshots were selected. The captures were visually inspected.

Evidence scope: Actual production history panel/hook/list on React Native Web with controlled transport. Host B catalog pending must not show A session/search; same-host reconnect control. No native simulator claim.

01-02-host-b-catalog-pending.png 02-02-host-b-catalog-pending.png
01-02-host-b-catalog-pending.png 02-02-host-b-catalog-pending.png

The hook/transport boundary harnesses are labeled in the captures. These are browser evidence where stated; they do not establish native keyboard, gesture, permission dialog, safe-area or real-network behavior. Full code regressions cover additional cases described above.

Testing

  • Regression tests added or updated.
  • Full native device verification for every race.
ORCA_BACKGROUND_LAUNCH=1 pnpm --dir mobile test src/agent-history/agent-history-retry.test.tsx

The combined mobile change set passed 410 suites / 3,626 tests, production typecheck, the tests-typecheck ratchet, formatting, the changed-code quality gate, and the mobile-web build/asset verifier on macOS. These aggregate results are not a claim that the entire suite was rerun on this isolated branch. PR CI validates the branch against current main.

Review

Merge risk: Low. A small change that resets the history view only when the selected computer changes; tests also check that reconnecting to the same computer keeps the list.

Previously reviewed by a separate agent team; reported issues were fixed and checked again.

Agent skill upstream boundary

  • Not applicable; this change copies no upstream skill-installer implementation.

Notes

Existing RPC methods and wire compatibility are retained. Review considered desktop host changes, remote execution authority, folder workspaces, and native/web consumers. Native simulator follow-up was limited after the three owned simulators became stuck shutting down; no unrelated simulator/process was reset.

Checklist

  • Focused change with a root-cause explanation.
  • Automated regression coverage and independent review.
  • Before/after proof attached with exact evidence scope.
  • Cross-platform and remote compatibility considered.
  • Required PR CI checks have passed.

Switching desktops retains another host history and can scan its filesystem path on the new host. Reset content by host while preserving same-host reconnect identity.
@nwparker
nwparker marked this pull request as ready for review October 21, 2026 23:34
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ad98ba80-fd5f-4dc4-9468-f762816ad403
📥 Commits

Reviewing files that changed from the base of the PR and between 10d4104 and 1832bd7.

📒 Files selected for processing: 2
  • mobile/src/agent-history/MobileAgentSessionHistoryPanel.tsx
  • mobile/src/agent-history/agent-history-retry.test.tsx
  • 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

Comment @coderabbitai help to get the list of available commands.

@nwparker nwparker changed the title fix(mobile): reset agent history when switching desktops fix(mobile): load the right agent history when you switch computers Oct 22, 2026
@nwparker
nwparker merged commit 0834610 into stablyai:main Oct 22, 2026
43 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