Conversation
…tually work Its on_click called cx.dispatch_action(&OpenConfigFolder), which App:: dispatch_action routes through gpui's *active* window and silently drops (.log_err()) when that handle can't be resolved. This frame is reached only when config.toml fails to load, which falls back to Config::ephemeral() -- update_prompt_seen is then false, so the update- consent window opens alongside this one on every launch. With two windows in play, active-window resolution can fail on Windows and the click does nothing. Calls the action's own handler logic directly instead (config_dir() + file_url() + cx.open_url()), matching what the working "Config folder" panel button and Settings -> About -> "Show in file manager" already do -- and sidesteps gpui's window-routed dispatch entirely rather than trying to fix which window it resolves to. Fixes AprilNEA#941
|
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.
Summary
on_clickcalledcx.dispatch_action(&OpenConfigFolder), and gpui'sApp::dispatch_actionroutes through the active window, silently swallowing the dispatch (.log_err()) when that window handle can't be resolved.config.tomlfails to load, which falls back toConfig::ephemeral(). That meansupdate_prompt_seenisfalse, so the update-consent window also opens alongside the error frame on every launch — the one place two windows are reliably in play together, which is exactly when Windows' active-window resolution can fail.Changes
crates/openlogi-desktop/src/app/status.rs: the button'son_clicknow calls theOpenConfigFolderaction's own handler logic directly (openlogi_core::paths::config_dir()+file_url()+cx.open_url()) instead of dispatching through gpui's window-routed action system — matching what the already-working "Config folder" panel button and Settings → About → "Show in file manager" do, and sidestepping the window-resolution failure entirely rather than trying to fix which window it resolves to.Testing
cargo check -p openlogi-desktopcargo fmt --all -- --checkRUSTFLAGS="-D warnings" cargo clippy -p openlogi-desktop --all-targets -- -D warnings(affected-package tier: leaf binary crate, no reverse dependents, no workspace-wide input changed)cargo test -p openlogi-desktop(219 tests)Fixes #941