Repository navigation
fix(mobile): show setup settings from the computer you just selected - #31693
AmoabaKelvin merged 3 commits into
Conversation
94b1cb1 to
00aa327
Compare
|
No actionable comments were generated in the recent review.
|
Changing hosts can expose the previous desktop runtime settings and setup approvals. Own published data and setters by host and client.
…hen the host is picked again Ownership compared client and host id, so A -> B -> A made the first A's Save callbacks match again. Each selection now gets its own owner object.
…ject Any server's relay change rebuilds every scoped client, which wiped the same host's settings and approvals.
00aa327 to
c087105
Compare
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThe workspace form now keeps defaults, setup-script approvals, and task providers tied to the selected desktop and server.
No actionable issues found. Source and regression tests were inspected; tests and visual checks were not run during this review.
|
ELI5
Start creating a workspace on one computer, then switch to another. The form can still show the first computer's defaults and its approval to run setup scripts. This fix clears those old values and only uses settings returned by the computer currently selected.
What Changed
RpcClientobject. A relay change on any other server rebuilds every scoped client, which would otherwise wipe the same computer's settings and approvals mid-form.Why
Approving a setup script on one computer should not make it look approved on another.
Linked Issue
Maintainer-discovered regression. Bounded GitHub symptom and exact-file searches found no exact duplicate. Execution-target detection from #31351 was excluded from this work.
Visual Proof
Captured with the visual-proof skill. Before uses base
15246eb4a45; after uses this PR's standalone commit63d7dc9a02a. The scenario passed asserted capture runs 3 times per version before representative screenshots were selected. The captures were visually inspected.Evidence scope: Explicitly labeled production-hook diagnostic browser harness, exact commits/dependencies. Pending host switch and retired publisher. Not native New Workspace UI, no real network.
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
After rebasing onto current main (head
c0871058a1a), run serially on macOS:use-new-workspace-runtime-context.test.ts: 11 passed. The new tests cover the case where the new computer hasn't answered yet (fails on main), the same computer's client being rebuilt (failed on the earlier client-keyed version), and A → B → A callback retirement (fails on main and on the earlier commit).NewWorktreeModal.test.tsx: passed.mobile/src/test-support/rpc-recording: 23 files, 1695 passed.Earlier evidence from Neil's combined checkout, kept for reference:
The combined review checkout
aa6fe5dae109contains this PR at94b1cb122314and the other mobile PRs reviewed together. Validation ran withORCA_BACKGROUND_LAUNCH=1on macOS.An earlier attempt using the shared checkout’s newer Vitest crashed. The reported full run and recording recheck used the mobile package’s pinned Vitest 4.1.12 with four workers. These are combined-checkout results; separate CI must validate each PR against current main. Native-device coverage remains limited as described in Visual Proof and Review.
AI Disclosure
Review
Merge risk: Medium. This controls whether setup scripts are trusted, so approval behavior deserves extra care.
Previously reviewed by a separate agent team; this pass traced the production paths again and added failing-before regressions for the three newly reproduced defects.
Risk-reduction checks. Second pass: Traced settings reads and script-approval resets when switching desktops; old replies and old Save callbacks cannot affect the newly selected desktop.
Neil's reviewed head:
94b1cb122314. Combined review head:aa6fe5dae109.Review-loop on the rebased branch: two rounds with Codex and Claude. Round 1 found the client-identity reset (fixed). Round 2 came back clean from both.
Agent skill upstream boundary
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