Skip to content

fix: detect Tailscale for App Store CLI path and hung status checks#406

Open
Dimillian wants to merge 2 commits intomainfrom
codex/github-mention-detect-tailscale-fails-when-tailscale-alre
Open

fix: detect Tailscale for App Store CLI path and hung status checks#406
Dimillian wants to merge 2 commits intomainfrom
codex/github-mention-detect-tailscale-fails-when-tailscale-alre

Conversation

@Dimillian
Copy link
Owner

Motivation

  • Tailscale detection fails for the macOS App Store build because the CLI executable lives at a lowercase .../MacOS/tailscale path and the code referenced the wrong-cased path.
  • Long-running or stalled calls to the tailscale CLI could leave the frontend request hanging and the “Checking…” button disabled indefinitely.

Description

  • Updated macOS binary candidate to include /Applications/Tailscale.app/Contents/MacOS/tailscale and adjusted the missing-binary message to reference the corrected path in src-tauri/src/tailscale/mod.rs.
  • Added a shared timeout constant TAILSCALE_COMMAND_TIMEOUT (12s) and applied it to tailscale version (binary resolution) and tailscale status --json calls so slow or hung CLI calls return with an explicit timeout error.
  • Propagated clear timeout and execution errors into the existing failure reporting so the caller/UI receives a useful error instead of hanging.
  • Updated the macOS unit test expectation to assert the corrected lowercase App Store CLI path.

Testing

  • Ran npm run typecheck which completed successfully.
  • Ran cd src-tauri && cargo fmt to format changes locally.
  • Attempted cd src-tauri && cargo check which failed in this container due to missing system glib-2.0 / pkg-config setup unrelated to the change, so full Rust build verification could not complete here.

Codex Task

@Dimillian
Copy link
Owner Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 143715e4f8

ℹ️ 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".

Comment on lines +96 to +100
let output = timeout(TAILSCALE_COMMAND_TIMEOUT, async {
tailscale_command(binary.as_os_str())
.arg("version")
.output()
.await

Choose a reason for hiding this comment

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

P1 Badge Terminate tailscale child process when timeout elapses

resolve_tailscale_binary now wraps Command::output() in tokio::time::timeout, but when the deadline fires the future is dropped without killing/reaping the spawned process (Tokio Command defaults to kill_on_drop(false)), so a hung tailscale/launchctl invocation continues in the background even though this call returns; repeated checks can accumulate stray processes and eventually exhaust process slots. The same timeout pattern is also used in tailscale_status, so both call paths should explicitly kill/reap on timeout (or enable kill_on_drop(true)).

Useful? React with 👍 / 👎.

@Dimillian Dimillian changed the title Fix Detect Tailscale for App Store CLI path and hung status checks fix: detect Tailscale for App Store CLI path and hung status checks Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant