From 23a61365da235810d32dfaa54757ac6b37773e6b Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 1 Sep 2026 18:13:31 -0400 Subject: [PATCH] capture: the suggested shortcut is a UI affordance, so it lives in the UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `-D warnings` failed the Linux lane on `constant SUGGESTED is never used`, and it was right — the suggestion is implemented in `bridge.ts` as SUGGESTED_CAPTURE_SHORTCUT, and nothing in Rust ever read the copy here. Deleted rather than exposed through a command. This side accepts any combination the OS will take; picking one to put in front of someone as a starting point is a UI decision, and a constant here would only be a second copy of a string one layer reads and the other does not. Worth noting what this run DID prove, since the previous one proved nothing: the lockfile gate passed and the Windows job built the NSIS installer end to end. So `tauri-plugin-global-shortcut`'s handler signature — the thing I could not verify without a toolchain — is correct, and the feature compiles. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01K3MMqUtzX1TJgA1oypvm1c --- desktop/src-tauri/src/capture.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/desktop/src-tauri/src/capture.rs b/desktop/src-tauri/src/capture.rs index 933ec96..3ffc5dd 100644 --- a/desktop/src-tauri/src/capture.rs +++ b/desktop/src-tauri/src/capture.rs @@ -11,8 +11,12 @@ //! it knows nothing about. Whatever default is picked is a key combination taken //! away from something on somebody's machine, silently, at install time. So there //! is no default: the feature is off until someone chooses a combination, and -//! choosing one is how it turns on. [`SUGGESTED`] is offered by the UI as a -//! starting point, not applied on its behalf. +//! choosing one is how it turns on. +//! +//! The suggestion the settings screen offers (`CommandOrControl+Shift+N`) lives in +//! the frontend, not here. It is a UI affordance — a starting point put in front of +//! someone — and this side accepts any combination the OS will take, so a constant +//! here would be a second copy of a string only the UI ever reads. //! //! ## Failure has to be visible //! @@ -34,13 +38,6 @@ const SHORTCUT_PREF: &str = "capture_shortcut"; /// The window the hotkey opens. Also the label the capability file grants to. pub const CAPTURE_WINDOW: &str = "capture"; -/// What the UI offers as a starting point. NOT applied automatically — see above. -/// -/// `CommandOrControl+Shift+N`: the Command/Control split is Tauri's own portable -/// spelling, and Shift+N is rare enough to be free on most desktops while still -/// meaning "new" to the person pressing it. -pub const SUGGESTED: &str = "CommandOrControl+Shift+N"; - /// Emitted to the main window after a capture is saved, so the board reloads. /// /// The two windows hold separate copies of the frontend and therefore separate