fix: settings window close button (and programmatic resize) silently failing - #38
Merged
Finesssee merged 1 commit intoApr 24, 2026
Conversation
The default capability only scopes permissions to the `main` window, so the settings window's close-button `getCurrentWindow().close()` call and the `applySettingsWindowSize` resize call are silently rejected by the IPC permission layer. Alt+F4 works because Windows dispatches WM_CLOSE at the OS level, bypassing Tauri's permission check — which is the fingerprint of a missing capability scope. Add `settings` to the capability's `windows` list so core:default (close, show, focus, minimize) and core:window:allow-set-size apply to it too.
Collaborator
|
Hey thanks for the PR, I will check on it and Merge |
Collaborator
|
Thanks for the PR, this was exactly the right fix. The missing |
This was referenced Aug 15, 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.
Summary
The custom close button (✕) in the top-right of the detached Settings window does nothing on Windows. Alt+F4 works.
The same silent failure also affects
applySettingsWindowSize— the frontend callsgetCurrentWindow().setSize(...)when switching tabs (e.g., widening the window for the Providers tab), and those calls are rejected too.Root cause
apps/desktop-tauri/src-tauri/capabilities/default.jsononly scopes its permissions to themainwindow:The detached Settings window is created with label
"settings"(seeshell/settings_window.rs::SETTINGS_LABEL), so it falls outside the capability's scope. Tauri's IPC permission layer rejectscore:window:*calls from it without surfacing an error to JS.Alt+F4 bypasses this entirely — Windows dispatches
WM_CLOSEat the OS level, so the native close path works while the in-app button doesn't. That's the smoking gun for a missing capability scope.Fix
Add
"settings"to the capability'swindowsarray so the existingcore:default(which grants close/show/focus/minimize) andcore:window:allow-set-sizeapply to the settings window as well.No code changes needed —
Settings.tsxalready callsgetCurrentWindow().close()on the ✕ button; it just wasn't permitted.Test plan
npm run tauri:devortauri:build) — capability files are compiled into the binary, not runtime-loaded.