Skip to content

fix(gui): make the config-error screen's Open Config Folder button actually work - #1458

Open
4ni1ak wants to merge 1 commit into
AprilNEA:masterfrom
4ni1ak:fix/config-error-open-folder-windows
Open

4ni1ak wants to merge 1 commit into
AprilNEA:masterfrom
4ni1ak:fix/config-error-open-folder-windows

Conversation

@4ni1ak

@4ni1ak 4ni1ak commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The fail-closed configuration-error frame's Open Configuration Folder button did nothing on Windows: no Explorer window, no error surfaced.
  • Root cause (found by the issue reporter with an exact citation): its on_click called cx.dispatch_action(&OpenConfigFolder), and gpui's App::dispatch_action routes through the active window, silently swallowing the dispatch (.log_err()) when that window handle can't be resolved.
  • This specific frame is reached only when config.toml fails to load, which falls back to Config::ephemeral(). That means update_prompt_seen is false, 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's on_click now calls the OpenConfigFolder action'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-desktop
  • cargo fmt --all -- --check
  • RUSTFLAGS="-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)
  • Not runtime-tested on Windows (this box is Linux) or visually verified — no safe display available in this environment. The fix removes the exact failure path the reporter identified (window-routed dispatch dropping silently) and replaces it with the same direct call the two already-working buttons use, so it should behave identically to those on every platform, but a maintainer with Windows hardware should confirm the click now opens Explorer on the config-error screen specifically (with the update-consent window also open, per the repro steps).

Fixes #941

…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
@4ni1ak
4ni1ak requested a review from AprilNEA as a code owner September 17, 2026 05:50
@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with no actionable regressions identified.

Summary

The PR fixes the configuration-error screen’s inert “Open Configuration Folder” button by bypassing active-window action dispatch and directly opening the configuration directory.

  • Reuses the same config_dir and file_url flow as existing working configuration-folder controls.
  • Avoids dependence on GPUI active-window resolution when multiple windows are open.

Reviews (1) · Last reviewed commit: "fix(gui): make the config-error screen's..."

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.

[Bug]: "Open Configuration Folder" on the config-error screen does nothing on Windows

1 participant