fix(gui): use the GPUI executor timer, not tokio::time::interval, for camera scans - #686
Merged
AprilNEA merged 1 commit intoAug 20, 2026
Conversation
… camera scans tokio::time::interval() panics immediately with "there is no reactor running" when called outside a Tokio runtime context. The GUI's main task runs on GPUI's own executor — the only Tokio runtime in the process lives on the dedicated openlogi-ipc-client thread — so this call aborted the process on every launch, before any window opened. Every other timing site in openlogi-desktop already schedules through cx.background_executor().timer(...) (see platform/permissions.rs, features/camera/preview.rs, windows/settings.rs, windows/settings/ about.rs, windows/settings/assets.rs). Switch the camera-scan interval to the same primitive, re-arming it after each fire to preserve the original interval's MissedTickBehavior::Delay semantics. Introduced in 2d117e7 (refactor(ipc): let the agent say when its state changed).
Greptile SummaryReplaces the Tokio camera-scan interval with a GPUI background-executor timer to prevent startup panics outside a Tokio runtime.
Confidence Score: 5/5The PR appears safe to merge, with the camera scan moved to the appropriate GPUI timer without an identified blocking or non-blocking defect. The replacement timer is compatible with the GPUI-driven task, is re-armed after completion, and avoids constructing a Tokio timer where no Tokio reactor is running.
|
| Filename | Overview |
|---|---|
| crates/openlogi-desktop/src/main.rs | The camera-scan loop now uses the executor that drives the GUI task, avoiding the reported missing-Tokio-reactor panic without introducing an actionable regression. |
Reviews (1): Last reviewed commit: "fix(gui): use the GPUI executor timer, n..." | Re-trigger Greptile
|
I'm getting the same error and trace on NixOS x86, with repository module flake installation method. Otherwise my installation is 26.05, but following unstable for openlogi. |
AprilNEA
approved these changes
Aug 20, 2026
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.
This app crashes on every launch on macOS: the GUI opens the agent/overlay then aborts before a window ever appears.
Root cause
tokio::time::interval()inmain.rs's camera-scan loop panics immediately —"there is no reactor running, must be called from the context of a Tokio 1.x runtime"— because the GUI's main task runs on GPUI's own executor. The only Tokio runtime in the process lives on the dedicatedopenlogi-ipc-clientthread (services/ipc.rs). Since this happens on the main thread, the panic aborts the whole process (SIGABRT).Introduced in 2d117e7 (refactor(ipc): let the agent say when its state changed).
Crash trace (macOS 26.5.2, Apple M4 Pro)
Fix
Every other timing site in
openlogi-desktopalready schedules throughcx.background_executor().timer(...)— seeplatform/permissions.rs,features/camera/preview.rs,windows/settings.rs,windows/settings/about.rs,windows/settings/assets.rs. This swaps the camera-scan interval to the same primitive, re-arming it after each fire to preserve the originalMissedTickBehavior::Delaysemantics (a late tick just runs late instead of catching up, and a busy IPC arm in the sameselect!can't starve it since the timer isn't recreated per-iteration).Testing
cargo build --release -p openlogi-desktop— cleanopen OpenLogi.app: agent, overlay, and desktop process all start and stay running past the point where they previously aborted; menu-bar item and input hook install successfully.