fix(window): grant the capability the header drag has always needed - #59
Open
RichardHightower wants to merge 2 commits into
Open
fix(window): grant the capability the header drag has always needed#59RichardHightower wants to merge 2 commits into
RichardHightower wants to merge 2 commits into
Conversation
…01M1QN6CE0P31CYJZFG7K9D3K7) Three releases shipped a frontend drag fix that could not work. The frontend was right; the Rust capability file was the block. Tauri 2 gates startDragging() behind core:window:allow-start-dragging. The capability granted only core:default, which expands to core:window:default, and that set is 26 read-only queries plus allow-internal-toggle-maximize. Neither allow-start-dragging nor allow-toggle-maximize is in it. Every drag call, from Tauri's own injected drag.js and from our own handler alike, was rejected by the access control list. Nothing was logged, because windowDrag.ts swallowed the rejection in an empty catch. That is why 0.6.2, 0.6.3 and 0.6.4 each looked correct in review and each failed on a Mac. The OS used to draw a title bar that dragged for free. It went away in 8fe4093 when titleBarStyle became Overlay, and no code replaced what the OS had done. - grant core:window:allow-start-dragging and core:window:allow-toggle-maximize - replace both empty catches with a one-time console.warn naming the capability file (Tauri-only path, so the E2E console gate is unaffected) - unit-test both grants; verified the test fails when the grant is removed typecheck, guard:client, and 276 unit tests pass. Mac dogfood confirmed: the window drags from the header. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0124JAyd2i7nNWnbadwDqm67
…01M1QN6CE0P31CYJZFG7K9D3K7) worklog ia-inventory and ia-render, so the inventory, graph, publish manifest, traceability page, and the rendered ticket match the new work item. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0124JAyd2i7nNWnbadwDqm67
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
01M1QN6CE0P31CYJZFG7K9D3K7Versions 0.6.2, 0.6.3, and 0.6.4 each shipped a frontend drag fix that could not work. The frontend was right. The Rust capability file was the block.
Tauri 2 gates
startDragging()behindcore:window:allow-start-dragging. The capability file granted onlycore:default, which expands tocore:window:default, and that set is 26 read-only queries plusallow-internal-toggle-maximize. Neitherallow-start-draggingnorallow-toggle-maximizeis in it.Every drag call was rejected by the access control list, from Tauri's own injected
drag.jsand from our handler alike. Nothing was logged, becausewindowDrag.tsswallowed the rejection in an emptycatch. That is why each attempt passed review and failed on a Mac.The OS used to draw a title bar that dragged for free. It went away in
8fe4093whentitleBarStylebecameOverlay, and no code replaced what the OS had done.Changes
core:window:allow-start-draggingandcore:window:allow-toggle-maximize.console.warnnaming the capability file. The path is Tauri-only, so the end-to-end console gate is unaffected.Test plan
bun run typecheckbun run guard:client(58 modules)bun test src(276 pass).app.🤖 Generated with Claude Code
https://claude.ai/code/session_0124JAyd2i7nNWnbadwDqm67