Harden production iOS pairing recovery - #4731
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the iOS phone-pairing recovery path when Tailscale is offline by adding a fixed-input native Tailscale launcher in the packaged desktop app and reusing shared recovery UI controls across pairing entry points, with bounded retry/backoff and supporting tests/docs.
Changes:
- Add shared pairing recovery helpers (failure classification + bounded retry) and a reusable
TailscaleRecoveryActionsUI component. - Register a fixed-argument native
open_tailscale_appTauri command for macOS/Windows (with Linux returning a manual-action error). - Extend coverage and docs: TS unit tests + Rust source-guard test + wiring into the test suite list + updated mobile Tailscale doc.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/tailscale-recovery.ts | Adds recovery attempt parsing, failure-kind classification, native launch wrapper, and bounded retry helper. |
| src/lib/tailscale-recovery.test.ts | Unit tests for native launch invocation and bounded retry behavior. |
| src/components/tailscale-recovery-actions.tsx | New shared UI actions (Open/Install/Retry) with announcer feedback and inline launch error display. |
| src/components/settings-phone.tsx | Replaces local Retry buttons with TailscaleRecoveryActions; adjusts reconcile return type to pass structured attempt results through. |
| src/components/mobile-handoff-modal.tsx | Makes start() consistently return a response object and adds TailscaleRecoveryActions to the error state. |
| src/components/mobile-handoff.test.ts | Asserts that both pairing entry points include recovery actions and that recovery uses the fixed native command + bounded delays. |
| src-tauri/src/shell_open_commands.rs | Implements open_tailscale_app with fixed native launch behavior per platform. |
| src-tauri/src/shell_open_tests.rs | Adds source-level guard assertions for fixed/parameterless Tailscale launcher wiring. |
| src-tauri/src/lib.rs | Imports open_tailscale_app for command registration on desktop builds. |
| src-tauri/src/tauri_setup.rs | Registers open_tailscale_app in the Tauri invoke handler list. |
| scripts/run-tests.mjs | Wires the new TS test file into the suite list (keeps check:tests-wired happy). |
| docs/mobile-tailscale.md | Documents the production recovery flow and UX behavior (hide unusable QR; bounded retries). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Val Alexander <val@opencoven.ai>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Val Alexander <val@opencoven.ai>
…sertion Co-authored-by: BunsDev <68980965+BunsDev@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
pnpm typecheckpnpm lintpnpm test:apppnpm test:apipnpm check:tests-wiredpnpm test:mobilecd src-tauri && cargo check --libBead:
cave-9vcfw