Skip to content

Fix macOS updater cleanup dispatch - #565

Merged
enaboapps merged 1 commit into
mainfrom
codex/fix-macos-updater-cleanup
Aug 10, 2026
Merged

Fix macOS updater cleanup dispatch#565
enaboapps merged 1 commit into
mainfrom
codex/fix-macos-updater-cleanup

Conversation

@enaboapps

Copy link
Copy Markdown
Contributor

Closes #564

Root cause

The async updater command called macOS disconnect cleanup from a Tauri worker thread, but the CoreBluetooth runtime is thread-local to the main thread. Installation therefore stopped before applying a downloaded update with The macOS runtime is not initialized.

Changes

  • dispatch worker-thread Disconnect and updater cleanup through the awaited main-thread helper
  • keep tray cleanup on its existing synchronous main-thread path
  • finish overlays, shared session state, activity, and event cleanup only after platform cleanup succeeds
  • preserve downloaded bytes and Install retry behavior on cleanup or installer failure

Validation

  • Node.js 24.13.0; Rust 1.97.1
  • npm run lint
  • npm test (55 frontend tests and 5 feed tests)
  • npm run build
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path src-tauri/Cargo.toml (129 unit tests and 2 configuration tests)
  • npm run macos:run Disconnect smoke test pending on the physical Mac before release

@enaboapps
enaboapps marked this pull request as ready for review August 10, 2026 16:37
@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown

Greptile Summary

This change runs platform-specific disconnection on Tauri’s main thread before completing shared application cleanup, and retains downloaded updater data when cleanup or installation fails.

The reported session-cleanup issue was disproved by exercising the claimed subscribe-between-cleanup ordering. On macOS, the subscription callback changes only the Bluetooth connection state and does not set connected_device_name; therefore the subsequent cleanup cannot erase a newly connected device name. The tray intentionally renders this state as “Device connected” and keeps Disconnect available.

Confidence Score: 5/5

Merge-safe based on the verified disconnect-state behavior; no actionable defects remain.

There are no final findings. Focused checks covered the claimed interleaving and confirmed that the macOS subscription path cannot produce the stated name-clearing failure.

Files Needing Attention: No files require follow-up.

Reviews (1): Last reviewed commit: "Fix macOS updater cleanup dispatch" | Re-trigger Greptile

@enaboapps
enaboapps merged commit add327d into main Aug 10, 2026
4 checks passed
@enaboapps
enaboapps deleted the codex/fix-macos-updater-cleanup branch August 10, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run macOS disconnect cleanup on the main thread

2 participants