Skip to content

Complete cross-platform global shortcuts; add the commercial-parity scorecard - #233

Merged
turinglambdaai merged 1 commit into
mainfrom
feat/global-shortcuts-parity
Oct 13, 2026
Merged

turinglambdaai merged 1 commit into
mainfrom
feat/global-shortcuts-parity

Conversation

@turinglambdaai

Copy link
Copy Markdown
Owner

Why

Rivet is held to commercial standards — the Tauri 2 / Electron feature floors are the minimum. Auditing against Tauri 2's official plugin surface found three capabilities below floor: global shortcuts (Linux-only in-library; products hand-rolled macOS and Windows), clipboard, and native file dialogs. This PR closes global shortcuts across all three platforms and turns the whole audit into a maintained scorecard.

What

  • macOS RivetGlobalShortcuts — Carbon RegisterEventHotKey, main-thread event loop, the shared trigger grammar, explicit duplicate-id and duplicate-live-trigger refusal (RegisterHotKey provides that on Windows; Carbon does not, so the adapter enforces parity itself). parse(_:) is public for tests and trigger rendering; ANSI virtual-key codes map through their Carbon constants because the codes follow the physical QWERTY layout, not the alphabet (kVK_ANSI_T is 0x11 while T is the 20th letter — an arithmetic mapping silently produces wrong keys).
  • Windows rivet::system::GlobalShortcuts — RegisterHotKey on a message-only window with WM_HOTKEY dispatch; ParseTrigger implements the same grammar; register/unregister on the message-pumping thread. Compile-gated by the WinUI host build that CI builds on every PR; runtime verification rides the first product adoption.
  • Shared contract (docs/system-services.md): one activation-callback shape — shortcut id, millisecond timestamp, activation token (portal-only, empty elsewhere) — so hosts share one dispatch path. Linux deliberately keeps the compositor-owned portal model; direct-registration platforms share the grammar.
  • docs/commercial-parity.md — the honest above/at/below/roadmap scorecard versus Tauri 2 and Electron, with rules of engagement (a product hand-rolling the same capability twice is a library gap; below-floor rows outrank new surface area). The docs suite keeps the scorecard and its below-floor rows — clipboard, native file dialogs, mobile hosts — from silently disappearing.

Testing

macOS: 3 new Swift suites-tests (parse table including the QWERTY-code trap cases, malformed-trigger rejection with omittingEmptySubsequences: false, real registration lifecycle with duplicate refusal — using F20-class combos that cannot shadow user shortcuts). Full swift test green. Windows: compile-gated in CI; docs suite 565 green with the new parity guards.

…corecard

Hold Rivet to the Tauri 2 / Electron feature floor. The audit found three
capabilities below it: global shortcuts existed only on Linux (products
hand-rolled macOS and Windows), clipboard, and native file dialogs. This
change closes the first; the other two become visible, guarded rows on the
new scorecard instead of tribal knowledge.

- macOS RivetGlobalShortcuts: Carbon RegisterEventHotKey on the main-thread
  event loop, shared trigger grammar, explicit duplicate-id and
  duplicate-live-trigger refusal (RegisterHotKey gives Windows this for
  free; Carbon does not), parse(_:) public for tests and trigger
  rendering. ANSI virtual-key codes map through their Carbon constants —
  the codes follow the physical QWERTY layout, not the alphabet.
- Windows rivet::system::GlobalShortcuts: RegisterHotKey on a message-only
  window with WM_HOTKEY dispatch, same callback shape (shortcut id,
  millisecond timestamp, portal-only activation token kept empty for
  signature parity). Compile-gated by the WinUI host build in CI.
- docs/system-services.md documents all three adapters and the shared
  contract; docs/commercial-parity.md is the honest above/at/below/roadmap
  scorecard with rules of engagement, and the docs suite keeps it and its
  below-floor rows from silently disappearing.
@turinglambdaai
turinglambdaai merged commit 0c5891c into main Oct 13, 2026
23 checks passed
@turinglambdaai
turinglambdaai deleted the feat/global-shortcuts-parity branch October 13, 2026 05:52
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.

1 participant