Skip to content

iOS: remove redundant Switch Computer settings screen - #9490

Merged
azooz2003-bit merged 1 commit into
mainfrom
feat-remove-switch-computer
Aug 4, 2026
Merged

azooz2003-bit merged 1 commit into
mainfrom
feat-remove-switch-computer

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Aug 3, 2026 •

Copy link
Copy Markdown
Collaborator

Settings > Switch Computer (MobileHostPickerView) duplicated three surfaces that already exist: the workspace list's computer picker switches Macs, the Connection Method section and onboarding handle pairing, and the Hidden Computers list handles hiding. This removes the sheet, its Settings row, and the 15 mobile.hostPicker.* / mobile.settings.switchMac localization keys (en+ja) only it used.

The Settings Connection section now renders only when it has a live connection row (hasConnectionRows), since the Switch Computer button was previously the only guaranteed row; without this the header would sit empty. The Set Up Computer / View Introduction Again entries keep their existing visibility gate.

The pairingVersionWarning alert this view attached is also handled at root level in CMUXMobileRootView, so QR-pairing version warnings still surface.

No tests referenced the removed identifiers (MobileSettingsSwitchMac, MobileHostPicker*).

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Removed the redundant Switch Computer screen from iOS Settings and cleaned up related code and strings. The Connection section now shows only when there’s a live connection to avoid an empty header.

  • Refactors
    • Removed the Switch Computer settings row and MobileHostPickerView.
    • Deleted 15 unused localization keys for mobile.hostPicker.* and mobile.settings.switchMac (en + ja).
    • Gated the Connection section on hasConnectionRows; switching Macs remains in the workspace list’s computer picker.
    • Kept QR pairing version warnings via CMUXMobileRootView; no tests referenced removed identifiers.

Written for commit a3cf901. Summary will update on new commits.

Review in cubic

The workspace list's computer picker already switches Macs, pairing
lives in the Connection Method section and onboarding, and hiding a
computer lives in the Hidden Computers list. Settings > Switch Computer
duplicated all three, so drop MobileHostPickerView, its Settings entry,
and the 15 mobile.hostPicker.*/switchMac localization keys (en+ja) it
alone used. The Connection section now renders only when it has a live
connection row, so its header never sits empty.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Aug 3, 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.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

MobileHostPickerView was deleted. MobileSettingsView now shows live connection rows and onboarding actions separately, without host switching. Obsolete host-picker and connection-gating localization entries were removed.

Changes

Mobile settings cleanup

Layer / File(s) Summary
Host-picker removal and settings connection flow
Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobileHostPickerView.swift, Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobileSettingsView.swift
The host picker and switch-computer flow were removed. Settings now renders connection rows only for live connections or a connected host, while setup and introduction actions use a separate condition.
Obsolete localization removal
ios/cmux/Resources/Localizable.xcstrings
Removed connection-gating, host-picker, pairing, visibility, and switch-computer localization entries.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: austinywang

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the implementation and rationale but omits the required Testing, Demo Video, review trigger, and checklist sections. Add the required Testing, Demo Video, Review Trigger, and Checklist sections, including test results and a UI demonstration link or attachment.
✅ Passed checks (24 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the removal of the redundant iOS Settings Switch Computer screen.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 Swift Actor Isolation ✅ Passed The Swift diff only removes a SwiftUI view and adjusts MobileSettingsView; its new helper runs in the UI view, while MobileShellComposite is already @MainActor. No new isolation-sensitive declarati...
Cmux Swift Blocking Runtime ✅ Passed The Swift diff only adds conditional view logic and a Boolean computed property; no semaphore, wait, sleep, delayed dispatch, sync, polling, or lock APIs were added.
Cmux Browser Automation Off-Main ✅ Passed The PR changes only iOS settings/localization files; it does not modify browser automation commands, TerminalController.swift, or socket-worker policy/router code.
Cmux Expensive Synchronous Load ✅ Passed The Swift diff only removes the host-picker load/actions and gates existing rows; it adds no RestorableAgentSessionIndex, file-read, JSON, transcript, or broad-scan load on an interactive path.
Cmux Cache Substitution Correctness ✅ Passed The diff only removes the host-picker and changes transient Settings rendering; liveMacConnections is a live registry projection, with no persistence, history, undo, or snapshot cache substitution.
Cmux No Hacky Sleeps ✅ Passed The patch changes only two Swift files and one .xcstrings resource; it introduces no TypeScript, JavaScript, shell, or build/runtime-script sleeps or timers.
Cmux Algorithmic Complexity ✅ Passed The PR adds only an O(1) emptiness check on the cached live connection snapshot; existing linear row rendering is unchanged. Deleted UI and localization code add no complexity.
Cmux Swift Concurrency ✅ Passed The diff adds no Dispatch, Combine, completion-handler, or Task concurrency patterns; it removes MobileHostPickerView async work and changes only synchronous SwiftUI conditions.
Cmux Swift @Concurrent ✅ Passed The Swift diff only deletes the host-picker async call sites and adjusts synchronous settings conditions; it adds no @concurrent/nonisolated async work or heavy UI-isolated helper.
Cmux Swift Package Boundaries ✅ Passed The Swift diff only removes and adjusts SwiftUI views under the existing CmuxMobileShellUI SwiftPM target; it introduces no app-target domain logic or new reusable feature logic.
Cmux Swiftpm Lockfiles ✅ Passed The PR changes only two Swift UI files and Localizable.xcstrings; no Package.swift, Package.resolved, .gitignore, workflow, or Xcode project changes exist.
Cmux Swift Logging ✅ Passed The commit only removes the host picker and updates connection-section state; the changed Swift adds no print, debugPrint, dump, NSLog, file logging, or Logger declarations.
Cmux User-Facing Error Privacy ✅ Passed The commit adds no user-facing error or alert text; it deletes the picker and strings, changes only visibility logic, and leaves root PairingView warning handling unchanged.
Cmux Full Internationalization ✅ Passed The diff adds no user-facing text or locale keys; it removes 15 obsolete keys, each previously translated for both supported locales (en and ja).
Cmux Swiftui State Layout ✅ Passed The diff removes host-picker state, sheet, and view. Its only SwiftUI addition is the pure hasConnectionRows condition; no new legacy observation, GeometryReader, store-backed rows, or render-tim...
Cmux Architecture Rethink ✅ Passed The diff removes duplicate picker wiring; added Swift only derives hasConnectionRows, adds no forbidden timing, locks, observers, or side channels, and leaves root warning ownership unchanged.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed The commit only removes/edits iOS SwiftUI views; the picker used a sheet, and no standalone NSWindow, NSPanel, WindowGroup, or desktop window code changed.
Cmux Source Artifacts ✅ Passed The diff changes only Swift source and a localization catalog; it adds no files, artifact directories, logs, caches, build output, or binary artifacts. The host-picker source is removed intentionally.
Cmux No Test Or Debug Seam In Production Source ✅ Passed The only changed production Swift files delete MobileHostPickerView and remove settings UI; added lines contain no test/debug seam, and existing DEBUG demo code is unchanged.
Cmux No Ambient Global State ✅ Passed The Swift diff only adds private var hasConnectionRows inside MobileSettingsView; it adds no file-scope function, mutable global, static namespace, or singleton.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-remove-switch-computer

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobileSettingsView.swift`:
- Around line 92-96: Update the hasConnectionRows computation used by
MobileSettingsView so visibility depends solely on store?.liveMacConnections
containing live connection rows. Remove the connectedHostName-only fallback and
ensure the Connection section and any fallback row remain hidden when live
connection data is unavailable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d66c9bd7-b910-4a7a-adf0-a1fa057e80f2

📥 Commits

Reviewing files that changed from the base of the PR and between d35187e and a3cf901.

📒 Files selected for processing (3)
  • Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobileHostPickerView.swift
  • Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobileSettingsView.swift
  • ios/cmux/Resources/Localizable.xcstrings
💤 Files with no reviewable changes (2)
  • Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobileHostPickerView.swift
  • ios/cmux/Resources/Localizable.xcstrings

@azooz2003-bit
azooz2003-bit merged commit 87edd70 into main Aug 4, 2026
12 checks passed
@azooz2003-bit
azooz2003-bit deleted the feat-remove-switch-computer branch August 4, 2026 03:52
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