Skip to content

Remember the iOS computer picker selection across launches - #13772

Merged
azooz2003-bit merged 13 commits into
mainfrom
feat-ios-remember-computer
Sep 23, 2026
Merged

azooz2003-bit merged 13 commits into
mainfrom
feat-ios-remember-computer

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The iOS computer picker reset to All Computers on every launch. Persist the selection through AppStorage so a chosen computer, including its exact app-instance identity, or All Computers survives relaunching. Both picker entrypoints and Show All use the same saved binding.

The selection type and persisted format live in CmuxMobileShellModel; the SwiftUI binding remains in CmuxMobileShellUI. This addresses the review bot's package-boundary finding. A temporarily missing computer displays All Computers without overwriting the saved choice, allowing discovery to restore it. Missing or invalid preferences default to All Computers.

Validation

Verified source: 9ca754715282c5422b334c3c8461aeeef9776100.

  • Simulator relaunch test passed on iPhone 17, iOS 26.4.1. Both MacBook Pro and All Computers retain their title and matching workspace rows after full app termination and relaunch. Four screenshots and the recording were inspected.
  • Preference tests passed: 4 tests, 10 parameter cases. Covers restoration, replacing a computer with All Computers, invalid preferences, and delayed discovery.
  • Model format tests passed: 2 tests, 7 parameter cases, including exact tagged-computer identity.
  • Original-behavior control failed as expected: expected MacBook Pro after relaunch, got All Computers.
  • git diff --check passes.

The UI test mounts the production WorkspaceShellView with two fixed, disconnected computer snapshots, selects through the real picker, and never seeds the selection preference. Authentication and live Mac connectivity are outside this focused check; physical iPhone verification is incomplete. No user-facing strings or layout changed.

The manual workflow's optional conventions check reports the same four pre-existing failures on main, in unchanged TaskComposerAttachmentStager.swift, MobileNetworkOutcomeReporter.swift, and PushTabNavigationPreviewView.swift. The feature's focused test jobs above pass.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: fe33d8e5-16ea-4b26-b618-d6c9d841c68e

📥 Commits

Reviewing files that changed from the base of the PR and between b16ad36 and 9ca7547.

📒 Files selected for processing (10)
  • Packages/iOS/CmuxMobileShellModel/Sources/CmuxMobileShellModel/WorkspaceMacSelection.swift
  • Packages/iOS/CmuxMobileShellModel/Tests/CmuxMobileShellModelTests/WorkspaceMacSelectionTests.swift
  • Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/Debug/ComputerPickerPersistencePreviewView.swift
  • Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceListView+MacSelection.swift
  • Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceMacTitlePickerActions.swift
  • Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceMacTitlePickerValue.swift
  • Packages/iOS/CmuxMobileShellUI/Tests/CmuxMobileShellUITests/WorkspaceMacSelectionPairedMacStore.swift
  • Packages/iOS/CmuxMobileShellUI/Tests/CmuxMobileShellUITests/WorkspaceMacSelectionPersistenceTests.swift
  • ios/cmuxPackage/Sources/cmuxFeature/CMUXMobileRootScene.swift
  • ios/cmuxUITests/cmuxUITests.swift
💤 Files with no reviewable changes (1)
  • Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceListView+MacSelection.swift

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The workspace Mac selection now uses a raw-value representation and AppStorage. Unit and UI tests cover stored selections, invalid or absent values, machine discovery changes, and selection restoration after app relaunch.

Changes

Mac selection persistence

Layer / File(s) Summary
Selection representation and storage
Packages/iOS/CmuxMobileShellModel/Sources/CmuxMobileShellModel/WorkspaceMacSelection.swift, Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceListView+MacSelection.swift, Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceShellView.swift, Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceMacTitlePickerActions.swift, Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceMacTitlePickerValue.swift
WorkspaceMacSelection defines raw values for automatic, all, and machine selections. WorkspaceShellView stores the selection with AppStorage, and picker files import the model that defines the enum.
Selection persistence tests
Packages/iOS/CmuxMobileShellModel/Tests/CmuxMobileShellModelTests/WorkspaceMacSelectionTests.swift, Packages/iOS/CmuxMobileShellUI/Tests/CmuxMobileShellUITests/WorkspaceMacSelectionPersistenceTests.swift, Packages/iOS/CmuxMobileShellUI/Tests/CmuxMobileShellUITests/WorkspaceMacSelectionPairedMacStore.swift
Tests cover raw-value round-tripping, invalid stored values, persistence defaults, replacement with all scope, and retaining a machine selection while no Mac is foregrounded.
Picker relaunch validation
Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/Debug/ComputerPickerPersistencePreviewView.swift, ios/cmuxPackage/Sources/cmuxFeature/CMUXMobileRootScene.swift, ios/cmuxUITests/cmuxUITests.swift
A DEBUG-only preview supplies fixed Mac snapshots to the production shell. A root-scene environment flag selects the preview, and a UI test checks the selected computer and workspace rows after relaunch.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 9ca75

The iOS computer picker now remembers the last selected computer, or All Computers, across launches. A saved computer that is temporarily unavailable displays as All Computers without losing the saved choice. Missing or invalid preferences safely default to All Computers. No merge-blocking issues were found.

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 10 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
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.
Cmux Cloud Persistent Session And Early Input ✅ Passed The check passes. The authoritative diff changes iOS workspace computer-selection persistence, its raw-value representation, and picker tests and preview wiring. It does not change Cloud terminal crea…
Cmux Swift Actor Isolation ✅ Passed The diff does not introduce a Swift actor-isolation mistake covered by this check. The new WorkspaceMacSelection is an immutable value enum with Sendable conformance. The model package enables Swi…
Cmux Swift Blocking Runtime ✅ Passed The pull request adds no blocking or timing-based synchronization to production Swift code. The runtime change replaces @State with @AppStorage; the new DEBUG-only preview and selection model cont…
Cmux Browser Automation Off-Main ✅ Passed The browser-automation check does not apply to this pull request. The changed-file inventory contains only iOS model, UI, and UI-test files. The policy source files and policy tests are unchanged. The…
Cmux Expensive Synchronous Load ✅ Passed The production diff adds no agent-history loader, broad file scan, or large JSON/JSONL parse. It adds a small RawRepresentable selection and replaces @State with @AppStorage for that value. The picker…
Cmux Cache Substitution Correctness ✅ Passed The diff adds persistence for the user’s picker preference; it does not replace a fresh authoritative read with a cached value. WorkspaceShellView.macSelection changes from @State to @AppStorage…
Cmux No Hacky Sleeps ✅ Passed The check is not applicable. The authoritative pull-request diff contains 11 changed files, and every changed path ends in .swift. No TypeScript, JavaScript, shell, or build/runtime script changes a…
Cmux Algorithmic Complexity ✅ Passed The changed production code adds constant-time selection encoding/decoding and replaces @State with @AppStorage; it adds no scalable collection scans, sorting, or filtering. The DEBUG picker fixtu…
Cmux Swift Concurrency ✅ Passed The diff does not introduce or materially expand any prohibited legacy async pattern. The only added async declaration is the UI test testComputerPickerSelectionSurvivesAppRelaunch, which uses XCT…
Cmux Swift @Concurrent ✅ Passed No changed code violates the Swift concurrency annotation rule. The new async UI test is explicitly @MainActor and performs UI interaction. Other changed declarations are synchronous; the async meth…
Cmux Swift Package Boundaries ✅ Passed The diff places the independently testable selection value and its persisted raw-value format in the CmuxMobileShellModel SwiftPM target. WorkspaceShellView only connects that model to SwiftUI `@A…
Cmux Swiftpm Lockfiles ✅ Passed The pull-request diff changes only Swift source and test files. It does not change a Package.swift, Package.resolved, Xcode project package reference, .gitignore, workflow, or dependency declaration. …
Cmux Swift Logging ✅ Passed The pull-request diff adds no print, debugPrint, dump, NSLog, ad hoc logging, or logger declarations. The production changes add the selection model, switch the picker state to @AppStorage, …
Cmux User-Facing Error Privacy ✅ Passed The diff introduces no user-facing error, alert, command output, API error body, or recovery copy. The production change stores the computer selection with @AppStorage; the added user-facing compute…
Cmux Full Internationalization ✅ Passed No production user-facing text was added or materially changed. The production change replaces @State with @AppStorage; the added model enum uses literal storage-format tokens. The new preview con…
Cmux Swiftui State Layout ✅ Passed The diff does not introduce any pattern prohibited by the SwiftUI state-layout rule. It replaces the existing @State selection with @AppStorage and adds a value enum. The new preview uses @State…
Cmux Architecture Rethink ✅ Passed The diff makes WorkspaceShellView's @AppStorage value the shared owner of computer selection. The list picker receives that binding, the root toolbar writes to the same selection, and Show All set…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed The diff adds no standalone window, panel, controller, Window, or WindowGroup. The new DEBUG preview is a SwiftUI View mounted through the existing iOS root content path, and the changed Swift files c…
Cmux Source Artifacts ✅ Passed No source-control artifacts were added. The 11 changed paths are Swift source or test files, including a DEBUG-only preview harness and UI tests for picker persistence. The diff contains no binary out…
Cmux No Test Or Debug Seam In Production Source ✅ Passed The production diff adds no test/debug accessor, private-state exposure, or member with a listed test/debug seam name. The persistence preview is a DEBUG-only UI fixture in `CmuxMobileShellUI/Sources/…
Title check ✅ Passed The title clearly and concisely describes the main change: persisting the iOS computer picker selection across launches.
Description check ✅ Passed The description explains the problem, behavior, package boundaries, and validation results. It uses “Validation” instead of the template’s “Testing” heading and omits the Demo Video, Review Trigger, a…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 10 files. (1 skipped: 1 too large.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@azooz2003-bit
azooz2003-bit marked this pull request as draft September 22, 2026 22:54
@azooz2003-bit

Copy link
Copy Markdown
Collaborator Author

Merged current main into this branch (no conflicts) so the next soki/sokx tagged rebuild inherits the three terminal-latency fixes that landed today (#13432, #13734, #13761). Context: the currently installed sokx/soki phone builds predate them and are producing 4-10s input_to_output anomalies in Axiom, which was confusing latency dogfood on other builds. Please rebuild your tags from this refreshed head at the next round.

@blacksmith-sh

This comment has been minimized.

@azooz2003-bit
azooz2003-bit marked this pull request as ready for review September 23, 2026 03:09
@cursor

cursor Bot commented Sep 23, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@azooz2003-bit
azooz2003-bit enabled auto-merge (squash) September 23, 2026 03:22
@azooz2003-bit
azooz2003-bit merged commit 66dd9ea into main Sep 23, 2026
63 of 67 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 23, 2026
e9154a9 Merge pull request manaflow-ai#13367 from manaflow-ai/13366-cloud-notification-layout
66dd9ea Remember the iOS computer picker selection across launches (manaflow-ai#13772)
f64ccb6 test: cover Cloud notification layout at minimum font magnification
156cce4 Merge remote-tracking branch 'origin/main' into 13366-cloud-notification-layout
70dfb47 ci: parallelize iOS test product downloads (manaflow-ai#13884)
368c1fb Merge remote-tracking branch 'origin/main' into 13366-cloud-notification-layout
0ce01ea Merge remote-tracking branch 'origin/main' into 13366-cloud-notification-layout
ac3f20c Merge remote-tracking branch 'origin/main' into 13366-cloud-notification-layout
efe16fa test: measure rendered Cloud row geometry without style heuristics
5985511 test: scope title raster workaround to ledger rows
8b71061 test: measure Cloud machine title columns robustly
ab0d82a fix: remove empty Cloud notification gutter
403a815 Merge remote-tracking branch 'origin/main' into 13366-cloud-notification-layout
d454a9c fix: import Cloud font scaling support
84303f0 fix: avoid empty Cloud attention space until unread
f5c168d Merge branch 'main' of https://github.com/manaflow-ai/cmux into 13366-cloud-notification-layout
696afe4 test: account for clipped narrow Cloud rows
20d4e69 test: align compact Cloud spacing with attention slots
15b4b5d ci: keep Cloud layout suites in the strict macOS gate
a49053c Merge origin/main into 13366-cloud-notification-layout
05ba773 fix: keep Cloud attention indicators in the leading slot
a4acf3f fix: separate Cloud unread indicators from row icons
649f602 test: catch overlapping Cloud unread indicators

# Conflicts:
#	.github/workflows/test-ios.yml
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