fix(ios): Add Computer sheets never appeared on Iroh setups - #11022
Conversation
Reproduces the report that Add Computer sheets never appear on iOS: on an Iroh/Auto-Connect setup, tapping Add Computer (Computers sheet + or row, disconnected-shell toolbar +) dismissed the covering sheet and presented nothing. Updates the two tests that still encoded the pre-#10437 policy (Add Computer hidden outside Tailscale) to the current policy from #10437 (always available; only the Tailscale scanner keeps a method gate), and extends them to tap the affordance and require the manual pairing form to actually appear. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR #9957 gated Add Computer to Tailscale twice: at render time (addComputerAction returned nil) and as a runtime re-check inside showAddDevice(). PR #10437 deliberately removed the render gate — Add Computer is always available, only the Tailscale pairing-code scanner keeps a method gate — but left the runtime re-check behind. On Iroh setups (tailscaleSetupStatus == .notSelected) every Add Computer entrypoint therefore rendered but silently no-opped: the Computers sheet dismissed itself and the pairing form never presented. Remove the re-check from showAddDevice() only; the scanner entrypoints keep theirs. The root presentation state machine already sequences the sheet handoff (dismissingChild -> pendingPairing) once the request is allowed through. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe manual Add Computer entrypoint now presents the pairing form without the manual-pairing gate. Scanner entrypoints retain the gate. UI tests cover toolbar and Computers sheet access. ChangesManual pairing availability
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR makes manual Add Computer present correctly on non-Tailscale setups while retaining the scanner restriction. No actionable merge-blocking risk remains, and the change is ready after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
Full details: Description checkExplanation The description provides detailed problem, cause, fix, and testing information. It is mostly complete, although it does not use the repository template headings and omits the demo video and checklist sections. Full details: Cmux Swift Actor IsolationExplanation PASS. The production diff only removes the pre-existing Full details: Cmux Swift Blocking RuntimeExplanation PASS: The only production Swift change adds a comment and removes the Full details: Cmux Browser Automation Off-MainExplanation PASS. The pull request changes only iOS UI code and iOS UI tests. Full details: Cmux Expensive Synchronous LoadExplanation PASS: The production diff only removes the Full details: Cmux Cache Substitution CorrectnessExplanation PASS: The production diff only removes the Full details: Cmux No Hacky SleepsExplanation PASS. The pull request changes only Swift files: Full details: Cmux Algorithmic ComplexityExplanation PASS: The production diff changes only Full details: Cmux Swift ConcurrencyExplanation PASS. The PR diff changes Full details: Cmux Swift `@Concurrent`Explanation PASS. The PR changes Full details: Cmux Swift Package BoundariesExplanation PASS: The only production change removes one guard from Full details: Cmux Swiftpm LockfilesExplanation PASS: The PR changes only Full details: Cmux Swift LoggingExplanation PASS — The cumulative diff changes only Full details: Cmux User-Facing Error PrivacyExplanation PASS: The PR changes only pairing presentation logic in production and a developer comment. It adds no user-facing error, alert, command output, API error body, or recovery copy. The added “Iroh” and “Tailscale” references are in comments and tests, which the rule explicitly allows. The existing pairing error plumbing is unchanged. Full details: Cmux Full InternationalizationExplanation PASS: The PR changes one production Swift function by removing a gate and adding a developer-only comment. It does not add or modify user-facing text, localization keys, catalogs, web messages, or locale data. The other changed file is an XCTest file; its comments and assertion messages are explicitly allowed test/developer text. The full diff from the PR base contains only these two files, and Full details: Cmux Swiftui State LayoutExplanation PASS: The production diff only removes the Full details: Cmux Architecture RethinkExplanation PASS. The production diff removes one stale guard from Full details: Cmux Swift Auxiliary Window Close ShortcutsExplanation PASS — The Swift diff changes Full details: Cmux Source ArtifactsExplanation PASS: The PR changes only Full details: Cmux No Test Or Debug Seam In Production SourceExplanation PASS. The PR changes one production Swift file, Full details: Cmux No Ambient Global StateExplanation PASS: The production Swift diff only adds a comment and removes a guard from ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
…ction The empty-description recheck after cancelling the pairing form depends on post-cancel shell state and flaked in CI; assert the copy first (as the test originally did), then exercise the Add Computer regression tap. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The inherited empty-state copy and Settings-scanner assertions predate the current mock-data shell and fail on main's broken mock lane for reasons unrelated to this fix; keep the test on its regression contract (tap Add Computer -> manual form presents -> cancel dismisses). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
8910e63 cmux-tui: index cached surface exits (manaflow-ai#11000) ed19cfa ios: reserve unread badge overflow before the group header chevron (manaflow-ai#11018) c1e7f09 Fix premature Codex completion notifications (manaflow-ai#10838) 2c6fd70 fix(ios): Add Computer sheets never appeared on Iroh setups (manaflow-ai#11022) 8d71d72 fix(cmux-tui): surface remote transport loss instead of impersonating an empty session (manaflow-ai#11045)
Problem
On an Iroh/Auto-Connect setup, tapping Add Computer anywhere on iOS (the Computers sheet's toolbar
+, its end-of-list row, the disconnected shell's+) dismissed the covering sheet and presented nothing. Screen recording from dogfood (08-27): the Computers sheet just closes, no pairing form.Cause
#9957 gated Add Computer to Tailscale twice: at render time (
addComputerActionreturnednil) and as a runtime re-check insideshowAddDevice(). #10437 deliberately removed the render gate — Add Computer is always available, only the Tailscale pairing-code scanner keeps a method gate — but left the runtime re-check behind. So ontailscaleSetupStatus == .notSelectedthe affordance rendered, the tap silently returned, andDeviceTreeView.addComputer()still dismissed the Computers sheet.Fix
Remove the stale
currentlyAllowsManualPairingguard fromshowAddDevice()only. The scanner entrypoints keep their gate. The root presentation state machine already sequences the sheet handoff (.dismissingChild(child, pendingPairing:)→ present pairing onchildDidDismiss) once the request is allowed through, matching the HIG Sheets guidance to close the first sheet before displaying the one it triggers (https://developer.apple.com/design/human-interface-guidelines/sheets, "Display only one sheet at a time"; page consulted for this change). No new UI, no string changes (localization audit: none needed).Tests
Two-commit regression pattern: commit 1 updates
cmuxUITests.testAutomaticConnectionMethodPresentsAddComputer(renamed from...HidesAddComputer, which still encoded the pre-#10437 hidden policy) and extendstestAutomaticAttachVersionApprovalDoesNotExposeManualPairingto tap Add Computer inside the Computers sheet and require the manual form to appear — red without the fix. Commit 2 is the fix.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes Add Computer on iOS never presenting its pairing form on Iroh/Auto-Connect setups — the tap dismissed the covering sheet and silently did nothing.
showAddDevice(); the Tailscale scanner entrypoints keep their method gate.cmuxUITeststo tap Add Computer under Auto-Connect and from the Computers sheet, asserting the manual pairing form presents and cancels.Written for commit eaf542c. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Tests