You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Tab bar: revert title-bar to 27 px, push tab-bar 3 px down via padding-top so the active tab's colored top sits flush below the title-bar at every scale (no negative margin tricks needed).
- Settings window dimensions split into fixed chrome (220 px sidebar + 32 px padding) and scaled content area (`settingsMinWidth(scale)` / `settingsMaxWidth(scale)`). Right edge of content always snaps to right edge of window — no empty zone at large scales, no clipping at small ones. Removed the now-redundant `max-width` on `.settings-content`.
- Slider min-width 120 → 60 so the unit label stays visible in narrow rows.
- Capabilities: add `core:window:allow-set-min-size` and `allow-set-max-size` to `settings.json` so the live `setMinSize` / `setMaxSize` calls actually apply.
- Surface Tauri capability failures as warn logs (`await` + `try`/`catch` instead of `void` fire-and-forget) so missing perms don't fail silently.
- Document the recurring "Tauri feature needs a perm" gotcha in `AGENTS.md` § Critical rules and strengthen the existing note in `capabilities/CLAUDE.md`.
Copy file name to clipboardExpand all lines: apps/desktop/src-tauri/capabilities/CLAUDE.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,21 @@ for available permission identifiers.
28
28
## Gotchas
29
29
30
30
**Gotcha**: Missing permissions fail silently at runtime.
31
-
**Why**: Tauri doesn't crash or warn visibly when a webview calls an API it lacks permission for. The call just returns a generic "not allowed" error. If a new Tauri API call (e.g., `setFocus`, `setTitle`) is added to a window's frontend code, the corresponding permission must be added here or it will silently fail. Check the browser console for "not allowed" errors.
31
+
**Why**: Tauri doesn't crash or warn visibly when a webview calls an API it lacks permission for. The call just rejects its promise with a generic
32
+
`window.set_X not allowed. Permissions associated with this command: core:window:allow-set-X` error.
33
+
If a new Tauri API call (e.g., `setFocus`, `setTitle`, `setMinSize`, `setMaxSize`, plugin commands) is added to a window's frontend code, the matching permission must be added to that window's capability file (`default.json` for the main window, `settings.json` for settings, `viewer.json` for viewer windows). Without it the call rejects with no UI feedback — the feature just looks broken.
34
+
35
+
**Mitigation pattern**: any Tauri call that affects the UI shape should be `await`-ed inside `try/catch` with a `log.warn` on failure, never `void`-ed. The instant failure log is what catches missing permissions during development before the user does. Pattern:
This same pattern caught the missing `core:window:allow-set-min-size` / `allow-set-max-size` permissions when `routes/settings/+page.svelte` started using them for live text-size resizing — see `AGENTS.md` § Critical rules for the higher-level callout.
32
46
33
47
**Gotcha**: `opener:allow-open-path` needs explicit glob patterns for hidden files.
34
48
**Why**: The default `opener:allow-open-path` permission doesn't match dotfiles. The `"**/*"` glob excludes files starting with `.`, so a separate `"**/.*"` pattern is required. Without it, opening hidden files from the file manager would silently fail.
0 commit comments