Skip to content

fix(updater): skip app_updater checks and installs in dev builds - #1117

Merged
Xoshbin merged 1 commit into
mainfrom
fix/disable-updater-in-dev
Nov 22, 2026
Merged

Xoshbin merged 1 commit into
mainfrom
fix/disable-updater-in-dev

Conversation

@Xoshbin

@Xoshbin Xoshbin commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

tauri-plugin-updater assumes current_exe lives inside an .app bundle on macOS; running it in tauri dev replaces target/debug/ with the downloaded bundle's Contents/, deleting target/debug/asyar and breaking macOS Accessibility/TCC permissions.

Guard check_and_maybe_download, apply_on_start, and run_idle_restart_check with cfg!(debug_assertions) so dev builds never self-update.

What changed

  • Before (issue / current behavior):
  • After (fix / new behavior):

Affected areas

  • Launcher UI / UX (visuals, interactions, keyboard shortcuts, settings)
  • SDK / Extensions (asyar-sdk, extension runtime, IPC contracts, manifest)
  • Rust Backend / Platform (Tauri commands, search, storage, OS integration)
  • Docs / Tooling / Other (docs, CI, build scripts, locales)

Manual smoke test & Validation

  • I manually smoke-tested this in the running app (pnpm dev) and visually verified the fix/feature works.

AI usage

  • AI tools helped produce this change.
  • I ran the asyar-contribution skill (.agents/skills/asyar-contribution/SKILL.md), followed it, and reviewed every generated line.

Boundaries

  • Zero-hardcoded-strings i18n policy respected (if UI strings were added/changed).
  • Third-party extension compatibility preserved (no breaking changes to published extension contracts without deprecation/boundary adapter).
  • Hot paths remain fast and unblocked (window reveal, keystroke search, and 120 FPS UI responsiveness).
  • pnpm check:ci (or the relevant inner-loop checks) passes locally.

Summary by CodeRabbit

  • Behavior Changes
    • App updates are not checked, downloaded, applied, or triggered for restart in debug builds. In other builds, existing update and restart behavior remains unchanged.

`tauri-plugin-updater` assumes `current_exe` lives inside an `.app` bundle on macOS; running it in `tauri dev` replaces `target/debug/` with the downloaded bundle's `Contents/`, deleting `target/debug/asyar` and breaking macOS Accessibility/TCC permissions.

Guard `check_and_maybe_download`, `apply_on_start`, and `run_idle_restart_check` with `cfg!(debug_assertions)` so dev builds never self-update.
@github-actions github-actions Bot added the bug Something isn't working label Nov 22, 2026
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Updater checks, startup application, and idle restart checks now return early in debug-assertion builds. Release builds retain their existing update and restart checks.

Changes

Updater debug-build guards

Layer / File(s) Summary
Guard updater operations in debug builds
asyar-launcher/src-tauri/src/app_updater/service.rs, asyar-launcher/src-tauri/src/app_updater/scheduler.rs
check_and_maybe_download emits the idle event and returns in debug builds. apply_on_start returns before accessing the update sentinel. The idle restart check returns before reading settings or checking restart conditions when debug assertions are enabled.

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

Change: Bug fix

Merge Risk: Minimal · up to 4d595

Development builds no longer run the updater, which avoids the reported deletion of the debug binary and the disruption of macOS permissions. Release behavior is unchanged, so the merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the updater checks and installs are skipped in dev builds. The raw summary confirms that check_and_maybe_download, apply_on_start, and run_idle_restart_check now retur…
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.
Full details: Title check

Explanation

The title names the main change: the updater checks and installs are skipped in dev builds. The raw summary confirms that check_and_maybe_download, apply_on_start, and run_idle_restart_check now return early under debug assertions/debug builds, which matches the PR objective of preventing self-updates in development builds. The title follows the conventional commit style and is specific, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 1d511cd and 4d59515.

Files selected for processing: 2

  • asyar-launcher/src-tauri/src/app_updater/scheduler.rs
  • asyar-launcher/src-tauri/src/app_updater/service.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@Xoshbin
Xoshbin merged commit 41f06bd into main Nov 22, 2026
14 checks passed
@Xoshbin
Xoshbin deleted the fix/disable-updater-in-dev branch November 22, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant