fix(gui): open the config folder from the fail-closed config screen - #942
Open
yuzi-co wants to merge 1 commit into
Open
fix(gui): open the config folder from the fail-closed config screen#942yuzi-co wants to merge 1 commit into
yuzi-co wants to merge 1 commit into
Conversation
Greptile SummaryThe PR fixes the configuration-error screen’s folder button by bypassing active-window action dispatch and consolidates all configuration-folder reveal behavior behind one helper.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| crates/openlogi-desktop/src/app/menu.rs | Introduces the shared configuration-folder helper and preserves the menu action’s existing behavior. |
| crates/openlogi-desktop/src/app/status.rs | Fixes the failing configuration-error button by invoking the folder-opening helper directly. |
| crates/openlogi-desktop/src/app/detail.rs | Replaces equivalent inline folder-opening logic with the shared helper. |
| crates/openlogi-desktop/src/windows/settings/about.rs | Reuses the shared helper while preserving the displayed config-file path and revealed directory. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Config error button] --> B[open_config_folder]
C[Device details button] --> B
D[About settings button] --> B
E[Application menu action] --> B
B --> F[Resolve config_dir]
F --> G[Convert to file URL]
G --> H[App open_url]
Reviews (2): Last reviewed commit: "fix(gui): open the config folder from th..." | Re-trigger Greptile
The "Open Configuration Folder" button on the configuration-error frame
did nothing on Windows. It was the only `cx.dispatch_action` call site in
the GUI, and `App::dispatch_action` routes through the *active* window
rather than dispatching globally, swallowing the failure when that window
cannot be resolved:
if let Some(active_window) = self.active_window() {
active_window.update(self, ...).log_err(); // "window not found"
} else {
self.dispatch_global_action(action);
}
On this frame `active_window()` yields a handle `update()` cannot resolve,
so the `OpenConfigFolder` handler never ran — the click reached `on_click`
and the action was dropped with only a swallowed log line to show for it.
This is also the one screen where a second window is always in play: an
unreadable config falls back to `Config::ephemeral()`, leaving
`update_prompt_seen` false so the update-consent window opens alongside it
on every launch.
Give the three in-window buttons one `open_config_folder` helper and have
them call it directly; only the menu bar, which has no view to call from,
still goes through the action. That also collapses three near-duplicate
implementations of the same reveal — `about.rs` had its own inline
`Url::from_file_path` copy — and lets `file_url` go private.
Fixes AprilNEA#941
yuzi-co
force-pushed
the
fix/windows-open-config-folder
branch
from
August 25, 2026 08:59
ee2c7c9 to
7d3d61d
Compare
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
The Open Configuration Folder button on the fail-closed configuration-error
screen did nothing on Windows — no Explorer window, no error, no feedback.
It was the only
cx.dispatch_actioncall site in the GUI.App::dispatch_actionroutes through the active window instead of dispatching globally, and swallows
the failure when that window cannot be resolved:
On that frame
active_window()yields a handleupdate()cannot resolve, so theOpenConfigFolderhandler never ran. Instrumented capture of a real click:The click reaches
on_click; the handler is never entered.This is also the one screen where a second window is always in play — an
unreadable config falls back to
Config::ephemeral(), soupdate_prompt_seenstays false and
runtime.rs:113opens the update-consent window alongside theerror frame on every launch. That is the likely trigger for the unresolvable
handle; the dropped dispatch is what was directly observed.
The other two buttons that reveal the same folder (right panel → Config
folder, Settings → About → Show in file manager) call
cx.open_urldirectly and were unaffected. Verified during diagnosis that the path and URL
themselves are fine on Windows:
config_dir()resolves to a mixed-separatorC:\Users\…\.config/openlogi(etcetera's".config/"default), whichUrl::from_file_pathnormalizes to an identical, workingfile:///C:/Users/…/.config/openlogi. That separator wart is real but cosmeticand is left for a separate change.
Changes
crates/openlogi-desktopapp/menu.rs: addopen_config_folder, the single reveal helper; theOpenConfigFolderaction now delegates to it, andfile_urlbecomes private.app/status.rs: the config-error button calls the helper directly instead ofdispatching the action. This is the fix.
app/detail.rs,windows/settings/about.rs: call the same helper, replacingtwo near-duplicate inline implementations (
about.rshad its own copy ofUrl::from_file_path).Only the menu bar, which has no view to call from, still goes through the action.
Testing
Runtime-verified on Windows 11 Pro (10.0.26200) against a deterministic
reproduction —
schema_version = 99inconfig.tomlto force the error frame,then clicking the button:
ERROR gpui::app: window not found, no Explorer window.file:///C:/Users/…/.config/openlogi, no error.Not exercised on macOS or Linux; the changed code is not cfg-gated.
Commands run on the final tree (Windows host):
Two gate steps fail on this Windows host before this change — both reproduced
on an untouched branch, neither touched by this diff:
xtask::commands::ci::jobs::tests::ci_yml_runs_what_this_runner_runs— assertsci.ymlruns the rustdoc command, butcore.autocrlf=truechecksci.ymloutwith CRLF, so the
\-continuation join does not match. Windows-checkout only.cargo doccannot documentopenlogi-permissions— its module docs link[`PermissionStatus::Unknown`]and[`open_pane`], both#[cfg(any(target_os = "macos", target_os = "linux"))], so the links cannotresolve on Windows on any branch. CI runs this job on Linux, where it passes.
Every other workspace test target passed. CI jobs not reproducible on this host
(Linux clippy, MSRV, cargo-deny, shell lint) were not run.
Fixes #941