fix(ui): recover hardware after daemon ownership loss (v0.3.10)#94
Conversation
Supervise the app-owned daemon so updater, login, and relaunch overlap cannot leave a surviving menu bar UI permanently offline. Stop recovery during shutdown and preserve restored legacy-service ownership.
Align app, daemon, protocol client, and package versions for the daemon recovery release. Keep clean macOS Tauri release builds deterministic by skipping the redundant debuginfo strip pass that corrupts proc-macro dylibs under the current toolchain.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (8)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR improves Microbridge UI resilience by supervising the app-owned bundled daemon and restarting it when a surviving UI process loses ownership of an overlapping process’s daemon, while avoiding interference with reachable standalone/headless daemons and aligning the repository for the v0.3.10 release.
Changes:
- Add a bundled-daemon supervisor loop in the Tauri UI to recover from daemon ownership loss and suppress recovery during shutdown.
- Align Rust/Tauri/Node adapter versions to v0.3.10 and add v0.3.10 release notes.
- Adjust the Tauri Rust release profile to make clean macOS builds deterministic under the current toolchain.
Reviewed changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/releases/v0.3.10.md | Adds v0.3.10 release notes documenting daemon recovery and hardware status behavior. |
| Cargo.toml | Bumps workspace version to 0.3.10. |
| Cargo.lock | Updates workspace crate versions to 0.3.10. |
| apps/microbridge-ui/src-tauri/tauri.conf.json | Bumps Tauri app version to 0.3.10. |
| apps/microbridge-ui/src-tauri/src/lib.rs | Implements daemon supervision/recovery logic and shutdown suppression. |
| apps/microbridge-ui/src-tauri/Cargo.toml | Bumps UI crate version and disables release stripping for deterministic macOS builds. |
| apps/microbridge-ui/src-tauri/Cargo.lock | Updates UI workspace lockfile versions to 0.3.10. |
| apps/microbridge-ui/package.json | Bumps UI npm package version to 0.3.10. |
| apps/microbridge-ui/package-lock.json | Updates lockfile version fields to 0.3.10. |
| adapters/sdk/package.json | Bumps adapter SDK version to 0.3.10. |
| adapters/claude/hooks/microbridge-permission.mjs | Bumps reported adapter_version to 0.3.10. |
Files not reviewed (1)
- apps/microbridge-ui/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let Some(state) = app.try_state::<AppState>() else { | ||
| return; | ||
| }; | ||
| if state.shutting_down.load(Ordering::Acquire) { | ||
| return; | ||
| } | ||
| if daemon_is_reachable() { | ||
| continue; | ||
| } |
| let Ok(mut child_slot) = state.bundled_daemon.lock() else { | ||
| continue; | ||
| }; |
| .run(|app, event| { | ||
| if matches!(event, tauri::RunEvent::Exit) { | ||
| if let Some(state) = app.try_state::<AppState>() { | ||
| state.shutting_down.store(true, Ordering::Release); | ||
| if let Ok(mut guard) = state.bundled_daemon.lock() { |
Summary
Why
During login, update, or direct relaunch overlap, a newer UI process can attach to the older UI process daemon. When the older UI exits it correctly terminates its child, but the surviving UI previously reconnected forever without starting a replacement. That made a macOS-visible Codex Micro appear not detected and removed Claim/Retry from the menu.
How to validate
npm test -- --run(35 passed)npm run buildcargo test --workspace --all-targets(88 passed)cargo clippy --workspace --all-targets -- -D warningscargo test --manifest-path apps/microbridge-ui/src-tauri/Cargo.toml --all-targets(12 passed)cargo clippy --manifest-path apps/microbridge-ui/src-tauri/Cargo.toml --all-targets -- -D warningscargo fmt --all -- --check.appwith the bundled v0.3.10 daemoncodex-micro-usbcodex-micro-usb,device_connected: true, and hardware control enabledScreenshots / GIF
No visual change; this restores the existing Detected / Claim / Retry / Release surfaces after daemon loss.
Risk / rollout notes