Repository navigation
iOS Computers: add "Add Computer" row at end of list - #6802
Conversation
Mirror the top-left toolbar add button as an end-of-list row so users who scroll past their Macs can add another without scrolling back up. Both entrypoints share one addComputer() action path. Reuses the existing localized mobile.computers.add string (en + ja). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 3 seconds. Learn how PR review limits work. To continue reviewing without waiting, enable usage-based billing in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDeviceTreeView and the Mac picker now add conditional Add Computer entry points. The add-device screens and localization resources also switch fallback text and copied labels from “device” to “Computer”. ChangesAdd computer entry points
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (24 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryAdds an "Add Computer" end-of-list row to
Confidence Score: 5/5Safe to merge — all changes are UI affordances and copy; the pairing flow itself is untouched. The diff is scoped entirely to SwiftUI view layout, a shared action extracted from existing code, and defaultValue string updates. The showAddDevice nil-guard is correctly applied at every new call site, the xcstrings catalog covers both supported locales (en + ja) for every modified key, and no actor isolation, blocking primitive, or state-mutation issues were introduced. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opens Computers screen] --> B{showAddDevice set?}
B -- Yes --> C[Toolbar plus button visible]
B -- Yes --> D{computers empty?}
D -- No --> E[Mac list rows rendered]
E --> F[addComputerRow at bottom]
D -- Yes --> G[emptySection shown only]
C -- tap --> H[addComputer action]
F -- tap --> H
H --> I[showAddDevice called]
H --> J[dismiss called]
K[User opens Mac picker menu] --> L{showAddDevice set?}
L -- Yes --> M[All Macs and per-Mac picker items]
M --> N[Divider plus Add Computer button]
N -- tap --> O[showAddDevice called - no dismiss]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[User opens Computers screen] --> B{showAddDevice set?}
B -- Yes --> C[Toolbar plus button visible]
B -- Yes --> D{computers empty?}
D -- No --> E[Mac list rows rendered]
E --> F[addComputerRow at bottom]
D -- Yes --> G[emptySection shown only]
C -- tap --> H[addComputer action]
F -- tap --> H
H --> I[showAddDevice called]
H --> J[dismiss called]
K[User opens Mac picker menu] --> L{showAddDevice set?}
L -- Yes --> M[All Macs and per-Mac picker items]
M --> N[Divider plus Add Computer button]
N -- tap --> O[showAddDevice called - no dismiss]
Reviews (4): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
This comment has been minimized.
This comment has been minimized.
The workspace title "Choose Mac" menu now has an "Add Computer" action below the Mac list (after a divider), invoking the same showAddDevice pairing flow. Shown only when the add affordance is available. Reuses the existing localized mobile.computers.add string. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pairing sheet title/nav title, form accessibility label, the disconnected + connection-status add buttons, and the LAN setup-help body now read "Add Computer" for consistency with the new entrypoints. Updated both Swift defaultValues and the xcstrings catalog (en + ja). Localization keys and code symbols are unchanged (not user-facing). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
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/SetupHelpView.swift`:
- Around line 153-156: The help text in SetupHelpView uses a CTA label that may
not match what users actually see on the disconnected recovery screen. Update
the lanBody copy in SetupHelpView to use neutral wording, or make it accept a
caller-provided label so DisconnectedWorkspaceShellView can pass its actual CTA
text (“Add another Mac”) and keep the message consistent with the visible
control.
🪄 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
Run ID: e4435efe-435c-432c-8a1d-2710a5ce734b
📒 Files selected for processing (5)
Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/DisconnectedWorkspaceShellView.swiftPackages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobileMacConnectionStatusRow.swiftPackages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/PairingView.swiftPackages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/SetupHelpView.swiftios/cmux/Resources/Localizable.xcstrings
| Text(L10n.string( | ||
| "mobile.setupHelp.lanBody", | ||
| defaultValue: "No Tailscale? On the same Wi-Fi you can still connect by typing the Mac's local address and port by hand in Add device. That link is unencrypted, so only use it on a network you trust." | ||
| defaultValue: "No Tailscale? On the same Wi-Fi you can still connect by typing the Mac's local address and port by hand in Add Computer. That link is unencrypted, so only use it on a network you trust." | ||
| )) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Reference the control label users actually see.
Line 155 now tells users to enter the address in “Add Computer”, but the disconnected recovery screen still shows “Add another Mac” when paired Macs already exist (Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/DisconnectedWorkspaceShellView.swift Lines 91-95). In that path the help text points to a button name that is not on screen. Use neutral copy here, or pass in the caller-specific CTA label.
🤖 Prompt for 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.
In `@Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/SetupHelpView.swift`
around lines 153 - 156, The help text in SetupHelpView uses a CTA label that may
not match what users actually see on the disconnected recovery screen. Update
the lanBody copy in SetupHelpView to use neutral wording, or make it accept a
caller-provided label so DisconnectedWorkspaceShellView can pass its actual CTA
text (“Add another Mac”) and keep the message consistent with the visible
control.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a4a441a93
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| } | ||
| .navigationTitle(L10n.string("mobile.addDevice.title", defaultValue: "Add device")) | ||
| .navigationTitle(L10n.string("mobile.addDevice.title", defaultValue: "Add Computer")) |
There was a problem hiding this comment.
Update Mac pairing instructions to match the renamed action
This rename makes the iOS pairing entry point read “Add Computer”, but the Mac-side QR pairing instructions still tell users to “Tap Add device” (Sources/Mobile/Pairing/MobilePairingView.swift:351, backed by Resources/Localizable.xcstrings). Users pairing from the Mac window now see instructions that name a control that no longer exists on the phone, so update that Mac string and its Japanese localization as part of the same terminology change.
Useful? React with 👍 / 👎.
Adds an "Add Computer" row at the end of the Computers list (iOS), matching the existing top-left toolbar add button. Users who scroll past their Macs can add another without scrolling back up.
Both entrypoints call one shared
addComputer()action (present pairing flow, then dismiss). The row reuses the existing localizedmobile.computers.addstring (en + ja), so no new strings. Only shows when the add affordance is enabled (showAddDevice != nil).🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
UI-only affordances and string updates; no changes to pairing logic, auth, or data handling.
Overview
Improves discoverability of pairing on iOS by adding Add Computer in two places when
showAddDeviceis set: an end-of-list row on the Computers screen (same behavior as the toolbar +) and an item in the workspace Choose Mac menu after a divider (opens pairing without dismissing the list).The Computers toolbar and list row now share a single
addComputer()path (invokeshowAddDevice, then dismiss). New accessibility IDs:MobileComputersAddRowandMobileWorkspaceMacPickerAdd.Copy is standardized from "Add device" to Add Computer across pairing, disconnected shell, connection status, setup help, and
Localizable.xcstrings(English and Japanese); localization keys are unchanged.Reviewed by Cursor Bugbot for commit 7a4a441. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Adds an "Add Computer" row at the end of the iOS Computers list and an "Add Computer" option in the "Choose Mac" menu, mirroring the toolbar add button. Standardizes the UI copy to "Add Computer" across pairing and help.
New Features
addComputer()(callsshowAddDevice, then dismiss).showAddDevice()(no dismiss).showAddDevice != nil.mobile.computers.add(en, ja); addsMobileComputersAddRowandMobileWorkspaceMacPickerAddaccessibility IDs.Bug Fixes
Localizable.xcstrings(en, ja). Localization keys unchanged.Written for commit 7a4a441. Summary will update on new commits.
Summary by CodeRabbit