Shell 3: Spike — Wayland global shortcuts through the portal (#795) #840

Closed
charles wants to merge 0 commits from shell-3-spike-wayland-global-shortcuts into shell
Owner

What this is

Spike for Desktop shell Task 3: system-wide shortcuts on Wayland through the XDG portal's GlobalShortcuts interface, with ashpd 0.14 over the zbus 6 we already have. Nothing new in the library. The client code is in the example (spike module), and the private-bus test runs that same module, so the tests cover exactly what the example runs on a real desktop.

  • Cargo.toml: ashpd = { version = "0.14", default-features = false, features = ["async-io", "global_shortcuts"] }. async-io is zbus's own runtime, not tokio. The tracing feature is off because it logs whole signal bodies, and ShortcutsChanged carries the triggers (spec §12). fluxer-platform depends on it on Linux only. The test is also Linux-only and adds zbus with service as a dev-dependency for the fake's #[interface]. cargo deny is green.
  • examples/portal_shortcuts.rs registers flaxative, opens a session, lists what is assigned and binds voice_toggle_mute ("Toggle mute", preferred CTRL+SHIFT+m) and voice_push_to_talk ("Push to talk", no default as in the original; --ptt-trigger takes an XDG trigger). --configure opens ConfigureShortcuts on v2. It then prints press <id> / release <id> with timestamps. It prints ids only, never keys or triggers.
  • tests/portal_shortcuts_bus.rs is a fake org.freedesktop.portal.Desktop on a private dbus-daemon (it activates nothing). It serves GlobalShortcuts v1/v2, Request.Response, session objects and host.portal.Registry. This is the harness Task 28 extends.
  • The README section "Global shortcuts portal on Wayland" records the findings.

What was proven

Tests (in cargo xtask ci):

  • registers_before_first_call
  • register_without_desktop_entry_is_refused_and_the_session_still_opens
  • register_errors_are_classified
  • register_on_a_bus_without_portal_reports_no_portal
  • bind_then_activated_and_deactivated (another session's signals are ignored)
  • bind_without_trigger_for_push_to_talk_sends_none
  • empty_bind_answer_is_denied
  • empty_bind_answer_with_stored_shortcuts_is_bound
  • cancelled_bind_is_cancelled
  • shortcuts_changed_reported (Debug never shows a trigger)
  • configure_only_on_v2 (ashpd refuses on v1 without calling)
  • portal_restart_detected (NameOwnerChanged lost/appeared; the session does not survive; the same connection can register and open a new session)

Measured on this machine, without touching the live desktop session (KDE Plasma 6.8.2 Wayland, xdg-desktop-portal 1.22.1, -kde 6.8.2):

  • The live portal's GlobalShortcuts.version is 2. This was a single property read.
  • I ran the real /usr/lib/xdg-desktop-portal on a private bus, with private XDG data dirs and no backends activatable. Its answers to Register:
    • With a flaxative.desktop present, Register("flaxative") succeeds. A one-element id is accepted.
    • Without one, it fails with org.freedesktop.portal.Error.Failed "Could not register app ID: App info not found for 'flaxative'".
    • After a successful Register, or after any portal method call on that connection, it fails with the same error name and "Connection already associated with an application ID". Property reads do not count.
    • An unregistered host app gets its systemd scope's id (from Konsole: org.kde.konsole).
    • The fake reproduces all of this.

Findings for Task 28 (deviations from the plan's Interfaces)

  • ashpd::AppID rejects flaxative. It requires reverse-DNS with at least two elements. The spike therefore calls Registry.Register directly on the connection instead of ashpd::register_host_app.
  • No fixed session handle token. ashpd 0.14's CreateSessionOptions has no setters, so every session gets a random token. The plan's "session with a fixed handle token" needs CreateSession written by hand, or accepting a random token.
  • Session path and receive_closed. ashpd keeps the session path private, so spike::session_path reads it from the serialised form. Session::receive_closed borrows the session, so the spike watches Closed with a zbus::Proxy of its own.
  • Register first after a restart. The client must register again before asking the new portal anything. The simplest way is a new connection per (re)open, as the original does.
  • No timeout on the bind. BindShortcuts waits for its Response without a time limit, which the user's dialog needs.

Spike verdict: the ashpd/portal path works at protocol level, so Task 28 goes ahead (the Task 3 fallback is not needed). The hold behaviour below is not measured yet.

Not measured: Charles, by hand (for Task 44's list)

Run cargo run -p fluxer-platform --example portal_shortcuts -- --ptt-trigger F9 on KDE Plasma 6 Wayland, and again with --configure and with --rebind. Record:

  1. The dialog, and where the keys are changed afterwards (System Settings → Shortcuts?).
  2. Hold push-to-talk: does release arrive on key release?
  3. While holding, tap another key (KDE bug 484525): do you see release/press with a few ms between them? That gap is what sizes Task 28's 60 ms debounce.
  4. A trigger with modifiers (e.g. CTRL+ALT+t): press/release while holding.
  5. A mouse button as a trigger, if the dialog allows one.

GNOME 48+, Hyprland (hyprctl globalshortcuts), Sway and COSMIC are from documentation only (spec §4, §16).

Tests run

  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green locally, with origin/shell 9012f380 merged in.
  • I ran no FLUXER_DESKTOP_TESTS test and did not run the example on the live session, because it would show the desktop's dialog. Windows: the example compiles to a stub main, the test file is #![cfg(target_os = "linux")], and ashpd is a Linux-only dependency.

Closes #795

🤖 Generated with Claude Code

https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K

## What this is Spike for Desktop shell Task 3: system-wide shortcuts on Wayland through the XDG portal's `GlobalShortcuts` interface, with `ashpd` 0.14 over the zbus 6 we already have. Nothing new in the library. The client code is in the example (`spike` module), and the private-bus test runs that same module, so the tests cover exactly what the example runs on a real desktop. - `Cargo.toml`: `ashpd = { version = "0.14", default-features = false, features = ["async-io", "global_shortcuts"] }`. `async-io` is zbus's own runtime, not tokio. The `tracing` feature is off because it logs whole signal bodies, and `ShortcutsChanged` carries the triggers (spec §12). `fluxer-platform` depends on it on Linux only. The test is also Linux-only and adds `zbus` with `service` as a dev-dependency for the fake's `#[interface]`. `cargo deny` is green. - `examples/portal_shortcuts.rs` registers `flaxative`, opens a session, lists what is assigned and binds `voice_toggle_mute` ("Toggle mute", preferred `CTRL+SHIFT+m`) and `voice_push_to_talk` ("Push to talk", no default as in the original; `--ptt-trigger` takes an XDG trigger). `--configure` opens `ConfigureShortcuts` on v2. It then prints `press <id>` / `release <id>` with timestamps. It prints ids only, never keys or triggers. - `tests/portal_shortcuts_bus.rs` is a fake `org.freedesktop.portal.Desktop` on a private `dbus-daemon` (it activates nothing). It serves `GlobalShortcuts` v1/v2, `Request.Response`, session objects and `host.portal.Registry`. This is the harness Task 28 extends. - The README section "Global shortcuts portal on Wayland" records the findings. ## What was proven Tests (in `cargo xtask ci`): - `registers_before_first_call` - `register_without_desktop_entry_is_refused_and_the_session_still_opens` - `register_errors_are_classified` - `register_on_a_bus_without_portal_reports_no_portal` - `bind_then_activated_and_deactivated` (another session's signals are ignored) - `bind_without_trigger_for_push_to_talk_sends_none` - `empty_bind_answer_is_denied` - `empty_bind_answer_with_stored_shortcuts_is_bound` - `cancelled_bind_is_cancelled` - `shortcuts_changed_reported` (`Debug` never shows a trigger) - `configure_only_on_v2` (ashpd refuses on v1 without calling) - `portal_restart_detected` (`NameOwnerChanged` lost/appeared; the session does not survive; the same connection can register and open a new session) Measured on this machine, without touching the live desktop session (KDE Plasma 6.8.2 Wayland, xdg-desktop-portal 1.22.1, -kde 6.8.2): - The live portal's `GlobalShortcuts.version` is **2**. This was a single property read. - I ran the real `/usr/lib/xdg-desktop-portal` on a private bus, with private XDG data dirs and no backends activatable. Its answers to `Register`: - With a `flaxative.desktop` present, `Register("flaxative")` succeeds. A one-element id is accepted. - Without one, it fails with `org.freedesktop.portal.Error.Failed` "Could not register app ID: App info not found for 'flaxative'". - After a successful Register, or after any portal **method** call on that connection, it fails with the same error name and "Connection already associated with an application ID". Property reads do not count. - An unregistered host app gets its systemd scope's id (from Konsole: `org.kde.konsole`). - The fake reproduces all of this. ## Findings for Task 28 (deviations from the plan's Interfaces) - **`ashpd::AppID` rejects `flaxative`.** It requires reverse-DNS with at least two elements. The spike therefore calls `Registry.Register` directly on the connection instead of `ashpd::register_host_app`. - **No fixed session handle token.** `ashpd` 0.14's `CreateSessionOptions` has no setters, so every session gets a random token. The plan's "session with a fixed handle token" needs `CreateSession` written by hand, or accepting a random token. - **Session path and `receive_closed`.** `ashpd` keeps the session path private, so `spike::session_path` reads it from the serialised form. `Session::receive_closed` borrows the session, so the spike watches `Closed` with a `zbus::Proxy` of its own. - **Register first after a restart.** The client must register again before asking the new portal anything. The simplest way is a new connection per (re)open, as the original does. - **No timeout on the bind.** `BindShortcuts` waits for its Response without a time limit, which the user's dialog needs. Spike verdict: the ashpd/portal path works at protocol level, so Task 28 goes ahead (the Task 3 fallback is not needed). The hold behaviour below is not measured yet. ## Not measured: Charles, by hand (for Task 44's list) Run `cargo run -p fluxer-platform --example portal_shortcuts -- --ptt-trigger F9` on KDE Plasma 6 Wayland, and again with `--configure` and with `--rebind`. Record: 1. The dialog, and where the keys are changed afterwards (System Settings → Shortcuts?). 2. Hold push-to-talk: does `release` arrive on key release? 3. While holding, tap another key (KDE bug 484525): do you see `release`/`press` with a few ms between them? That gap is what sizes Task 28's 60 ms debounce. 4. A trigger with modifiers (e.g. `CTRL+ALT+t`): press/release while holding. 5. A mouse button as a trigger, if the dialog allows one. GNOME 48+, Hyprland (`hyprctl globalshortcuts`), Sway and COSMIC are from documentation only (spec §4, §16). ## Tests run - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green locally, with origin/shell 9012f380 merged in. - I ran no `FLUXER_DESKTOP_TESTS` test and did not run the example on the live session, because it would show the desktop's dialog. Windows: the example compiles to a stub `main`, the test file is `#![cfg(target_os = "linux")]`, and `ashpd` is a Linux-only dependency. Closes #795 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Step 0 of Desktop shell 3: ashpd 0.14 (Linux only, async-io, global_shortcuts) and an
example that registers flaxative, binds voice_toggle_mute and voice_push_to_talk and
prints press/release by id (never keys).

Refs #795

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Desktop shell 3: tests/portal_shortcuts_bus.rs runs the example's client code (ashpd
0.14) against a fake org.freedesktop.portal.Desktop on a private bus: registry first,
create, list, bind with ids, labels and preferred triggers, empty answer denied,
cancel, activated/deactivated as press/release, shortcuts changed, configure only
on version 2, portal restart. The fake's Registry answers are those the real
xdg-desktop-portal 1.22.1 gave on a private bus (no desktop entry: App info not
found; after a call: Connection already associated). README records the findings
for Task 28 and what still needs a person at the desktop (hold behaviour).

Refs #795

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Refs #795
Author
Owner

Independent review: Shell 3 (spike, Wayland global shortcuts through the portal)

Scope: git diff 106ff769..origin/shell-3-spike-wayland-global-shortcuts. The ci.yaml hunk comes from origin/shell 9012f380 (merged in), not from this task. The task's own diff against origin/shell is 6 files: workspace and crate Cargo.toml, Cargo.lock, README, examples/portal_shortcuts.rs and tests/portal_shortcuts_bus.rs.

Checks

  1. Plan tests: all six named tests exist and assert what the plan asks for: registers_before_first_call, bind_then_activated_and_deactivated, empty_bind_answer_is_denied, shortcuts_changed_reported, configure_only_on_v2 and portal_restart_detected. Six extra tests cover register classification, a missing desktop entry, no portal, cancel, an empty answer with stored shortcuts, and a push-to-talk bind without a trigger. The ids are voice_toggle_mute and voice_push_to_talk, the app id is flaxative (fluxer_platform::APP_ID), and the fake serves GlobalShortcuts v1 and v2 plus host.portal.Registry.
  2. Interfaces: everything the block names is proven against the fake (Register first, CreateSession, ListShortcuts, BindShortcuts with ids, labels and a preferred trigger, Activated/Deactivated, ShortcutsChanged, Configure on v2, restart). The harness Task 28 extends is in place. The deviations for Task 28 (no fixed handle token in ashpd, AppID rejects flaxative, private session path) are documented in the README and the PR.
  3. Constraints: ashpd 0.14 is Linux-only and uses default-features = false with async-io and global_shortcuts. Its tracing feature is off, and no other crate enables it. No tracing:: calls are added. Output prints ids only. Debug of Definition and Assigned prints … for triggers, and a test asserts it. The private bus activates nothing, so the live session is not touched. Windows: the example falls back to a stub main, the test file is #![cfg(target_os = "linux")] and the deps are target-gated. cargo deny is green. No secrets or paths.
  4. Parity spot-checks against the fork:
    • Labels "Toggle mute" and "Push to talk" match GlobalShortcutActions.ts:26-30.
    • is_xdg_trigger matches XDG_TRIGGER_PATTERN (GlobalShortcutsEngine.ts:116, the trigger is dropped when it does not match, :191).
    • The lower-case m in CTRL+SHIFT+m matches xdgKeysymForCombo/comboToXdgTrigger (GlobalShortcutKeys.ts:688-719).
    • An empty success followed by a list, where an empty list means denied, matches bind_step/listed_outcome (global_shortcuts.rs:251-269).
  5. Review Focus: item 1 (no key reaches a log) holds for this diff. Item 3 is Task 28's.
  6. Gate: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green in the review worktree at e26ac42b ("all steps passed"; portal_shortcuts_bus: 12 passed).

Findings

  • minor (examples/portal_shortcuts.rs:339): a bind Response code 2 (ashpd ResponseError::Other) becomes BindOutcome::Failed. The original's bind_step maps code 2 to Denied (global_shortcuts.rs:258). This is harmless in a spike, but Task 28 must map it to denied (consent declined), not to a failure.
  • minor (examples/portal_shortcuts.rs:183): classify_register_error departs from the original. The original treats Failed (other than "already associated") as Retry and unknown names as Unregistered. The spike reports NoDesktopEntry/Refused/NoRegistry instead. The finer split is useful, but Task 28 should keep the original's retry for "App info not found" (the desktop entry can appear later, Task 18).
  • minor: the plan's Step 2 asks for a report "with the measured hold behaviour". It was not measured, because measuring it needs a person at the desktop. The PR lists the manual steps for Charles (Task 44). Until then, Task 28's 60 ms KDE debounce rests on the spec, not on a measurement on this machine.
  • minor: the commits carry the session's Opus attribution lines, not the repo CLAUDE.md's Co-Authored-By: Claude Fable 5.2 line. This affects history metadata only.

Verdict: approve. There are no blocking findings, and the local gate is green.

## Independent review: Shell 3 (spike, Wayland global shortcuts through the portal) Scope: `git diff 106ff769..origin/shell-3-spike-wayland-global-shortcuts`. The `ci.yaml` hunk comes from origin/shell 9012f380 (merged in), not from this task. The task's own diff against origin/shell is 6 files: workspace and crate `Cargo.toml`, `Cargo.lock`, README, `examples/portal_shortcuts.rs` and `tests/portal_shortcuts_bus.rs`. **Checks** 1. Plan tests: all six named tests exist and assert what the plan asks for: `registers_before_first_call`, `bind_then_activated_and_deactivated`, `empty_bind_answer_is_denied`, `shortcuts_changed_reported`, `configure_only_on_v2` and `portal_restart_detected`. Six extra tests cover register classification, a missing desktop entry, no portal, cancel, an empty answer with stored shortcuts, and a push-to-talk bind without a trigger. The ids are `voice_toggle_mute` and `voice_push_to_talk`, the app id is `flaxative` (`fluxer_platform::APP_ID`), and the fake serves GlobalShortcuts v1 and v2 plus `host.portal.Registry`. 2. Interfaces: everything the block names is proven against the fake (Register first, CreateSession, ListShortcuts, BindShortcuts with ids, labels and a preferred trigger, Activated/Deactivated, ShortcutsChanged, Configure on v2, restart). The harness Task 28 extends is in place. The deviations for Task 28 (no fixed handle token in ashpd, `AppID` rejects `flaxative`, private session path) are documented in the README and the PR. 3. Constraints: `ashpd` 0.14 is Linux-only and uses `default-features = false` with `async-io` and `global_shortcuts`. Its `tracing` feature is off, and no other crate enables it. No `tracing::` calls are added. Output prints ids only. `Debug` of `Definition` and `Assigned` prints `…` for triggers, and a test asserts it. The private bus activates nothing, so the live session is not touched. Windows: the example falls back to a stub `main`, the test file is `#![cfg(target_os = "linux")]` and the deps are target-gated. `cargo deny` is green. No secrets or paths. 4. Parity spot-checks against the fork: - Labels "Toggle mute" and "Push to talk" match `GlobalShortcutActions.ts:26-30`. - `is_xdg_trigger` matches `XDG_TRIGGER_PATTERN` (`GlobalShortcutsEngine.ts:116`, the trigger is dropped when it does not match, `:191`). - The lower-case `m` in `CTRL+SHIFT+m` matches `xdgKeysymForCombo`/`comboToXdgTrigger` (`GlobalShortcutKeys.ts:688-719`). - An empty success followed by a list, where an empty list means denied, matches `bind_step`/`listed_outcome` (`global_shortcuts.rs:251-269`). 5. Review Focus: item 1 (no key reaches a log) holds for this diff. Item 3 is Task 28's. 6. Gate: `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is **green** in the review worktree at e26ac42b ("all steps passed"; portal_shortcuts_bus: 12 passed). **Findings** - *minor* (`examples/portal_shortcuts.rs:339`): a bind Response code 2 (ashpd `ResponseError::Other`) becomes `BindOutcome::Failed`. The original's `bind_step` maps code 2 to `Denied` (`global_shortcuts.rs:258`). This is harmless in a spike, but Task 28 must map it to denied (consent `declined`), not to a failure. - *minor* (`examples/portal_shortcuts.rs:183`): `classify_register_error` departs from the original. The original treats `Failed` (other than "already associated") as `Retry` and unknown names as `Unregistered`. The spike reports `NoDesktopEntry`/`Refused`/`NoRegistry` instead. The finer split is useful, but Task 28 should keep the original's retry for "App info not found" (the desktop entry can appear later, Task 18). - *minor*: the plan's Step 2 asks for a report "with the measured hold behaviour". It was not measured, because measuring it needs a person at the desktop. The PR lists the manual steps for Charles (Task 44). Until then, Task 28's 60 ms KDE debounce rests on the spec, not on a measurement on this machine. - *minor*: the commits carry the session's Opus attribution lines, not the repo `CLAUDE.md`'s `Co-Authored-By: Claude Fable 5.2` line. This affects history metadata only. **Verdict: approve.** There are no blocking findings, and the local gate is green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Merged into shell by hand (the merge API returns 405); the commits are in the branch.

Merged into `shell` by hand (the merge API returns 405); the commits are in the branch.
charles closed this pull request 2026-11-18 01:42:38 +00:00
Author
Owner

Independent review (second pass): Shell 3, spike, Wayland global shortcuts through the portal

Scope. The range I was given, f2e3f17d..origin/shell-3-spike-wayland-global-shortcuts, is a reverse diff: the branch tip 44a04b1b is already an ancestor of shell (the PR was merged as 900b258a). So I reviewed the task's own commits instead: 7d2735a0 (the example, ashpd dependency lines) and f157ae53 (tests/portal_shortcuts_bus.rs, README).

Checks

  1. Plan tests. All six named tests exist and assert what the plan asks for: registers_before_first_call, bind_then_activated_and_deactivated, empty_bind_answer_is_denied, shortcuts_changed_reported, configure_only_on_v2 and portal_restart_detected. There are also six extra tests: register classification, no portal, no desktop entry, cancel, an empty answer with stored shortcuts, and a push-to-talk bind with no trigger. The ids are voice_toggle_mute and voice_push_to_talk, and the preferred trigger is CTRL+SHIFT+m.
  2. Interfaces. The example binds two shortcuts and prints only press <id> / release <id>. The fake portal serves GlobalShortcuts v1/v2, the sessions and host.portal.Registry on a private dbus-daemon with no service activation. That gives Task 28 its harness.
  3. Constraints.
    • ashpd 0.14 is a Linux-only dependency with default-features = false and only async-io and global_shortcuts. tracing is off, and the reason is given.
    • The test file is #![cfg(target_os = "linux")], and the example has a non-Linux main, so the Windows build is clean.
    • No key reaches a log or Debug: Definition and Assigned redact the trigger, and a test asserts this.
    • There are no secrets or paths, and nothing touches the live desktop. The six remaining fluxer-core and fluxer-ui invariants don't apply, because the diff doesn't touch those crates.
  4. Parity, checked against /home/cdaoust/src/fluxer-soundboard:
    • The ids and labels match GLOBAL_SHORTCUT_DEFAULT_DESCRIPTIONS in fluxer_desktop/src/common/GlobalShortcutActions.ts.
    • is_xdg_trigger matches XDG_TRIGGER_PATTERN in GlobalShortcutsEngine.ts:116.
    • The default Ctrl+Shift+M matches InputKeybind.ts:683.
    • An empty success followed by ListShortcuts, where an empty list means a denial, matches bind_step / listed_outcome in linux-portals/src/global_shortcuts.rs:251-269. Two differences are listed below.
  5. Review Focus. Item 1 (no key leaves the module or reaches a log) holds for the spike code. Item 3 (the 60 ms KDE debounce) belongs to Task 28 and isn't in scope here.
  6. Gate. FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci on 44a04b1b: all steps passed, and portal_shortcuts_bus passed 12 of 12.

Findings

  • minor: Portal::bind maps response code 2 (ResponseError::Other) to BindOutcome::Failed. The original's bind_step (global_shortcuts.rs:255-259) maps code 2 to Denied and only codes 3 and above to Failed. This is spike-only code, but Task 28 should follow the original here.
  • minor: classify_register_error diverges from the original (global_shortcuts.rs:350-358):
    • UnknownMethod / UnknownInterface give NoRegistry, where the original gives Unregistered.
    • Any other Error.Failed gives NoDesktopEntry or Refused, where the original retries.
      The README documents the finer split, but Task 28 must keep the original's retry and back-off.
  • minor: the hold behaviour Step 2 asks for was not measured: Deactivated on release, KDE bug 484525, modifier triggers and a mouse-button trigger. The workflow forbids key grabs on the live session, so this is correctly listed in the README as needing a person at the desktop: cargo run -p fluxer-platform --example portal_shortcuts. Charles should run it on Plasma 6.8.

Verdict: approved. There are no blocking findings, and the local gate is green.

## Independent review (second pass): Shell 3, spike, Wayland global shortcuts through the portal **Scope.** The range I was given, `f2e3f17d..origin/shell-3-spike-wayland-global-shortcuts`, is a reverse diff: the branch tip 44a04b1b is already an ancestor of `shell` (the PR was merged as 900b258a). So I reviewed the task's own commits instead: 7d2735a0 (the example, `ashpd` dependency lines) and f157ae53 (`tests/portal_shortcuts_bus.rs`, README). **Checks** 1. Plan tests. All six named tests exist and assert what the plan asks for: `registers_before_first_call`, `bind_then_activated_and_deactivated`, `empty_bind_answer_is_denied`, `shortcuts_changed_reported`, `configure_only_on_v2` and `portal_restart_detected`. There are also six extra tests: register classification, no portal, no desktop entry, cancel, an empty answer with stored shortcuts, and a push-to-talk bind with no trigger. The ids are `voice_toggle_mute` and `voice_push_to_talk`, and the preferred trigger is `CTRL+SHIFT+m`. 2. Interfaces. The example binds two shortcuts and prints only `press <id>` / `release <id>`. The fake portal serves `GlobalShortcuts` v1/v2, the sessions and `host.portal.Registry` on a private `dbus-daemon` with no service activation. That gives Task 28 its harness. 3. Constraints. - `ashpd` 0.14 is a Linux-only dependency with `default-features = false` and only `async-io` and `global_shortcuts`. `tracing` is off, and the reason is given. - The test file is `#![cfg(target_os = "linux")]`, and the example has a non-Linux `main`, so the Windows build is clean. - No key reaches a log or `Debug`: `Definition` and `Assigned` redact the trigger, and a test asserts this. - There are no secrets or paths, and nothing touches the live desktop. The six remaining fluxer-core and fluxer-ui invariants don't apply, because the diff doesn't touch those crates. 4. Parity, checked against `/home/cdaoust/src/fluxer-soundboard`: - The ids and labels match `GLOBAL_SHORTCUT_DEFAULT_DESCRIPTIONS` in `fluxer_desktop/src/common/GlobalShortcutActions.ts`. - `is_xdg_trigger` matches `XDG_TRIGGER_PATTERN` in `GlobalShortcutsEngine.ts:116`. - The default Ctrl+Shift+M matches `InputKeybind.ts:683`. - An empty success followed by `ListShortcuts`, where an empty list means a denial, matches `bind_step` / `listed_outcome` in `linux-portals/src/global_shortcuts.rs:251-269`. Two differences are listed below. 5. Review Focus. Item 1 (no key leaves the module or reaches a log) holds for the spike code. Item 3 (the 60 ms KDE debounce) belongs to Task 28 and isn't in scope here. 6. Gate. `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` on 44a04b1b: **all steps passed**, and `portal_shortcuts_bus` passed 12 of 12. **Findings** - *minor*: `Portal::bind` maps response code 2 (`ResponseError::Other`) to `BindOutcome::Failed`. The original's `bind_step` (`global_shortcuts.rs:255-259`) maps code 2 to `Denied` and only codes 3 and above to `Failed`. This is spike-only code, but Task 28 should follow the original here. - *minor*: `classify_register_error` diverges from the original (`global_shortcuts.rs:350-358`): - `UnknownMethod` / `UnknownInterface` give `NoRegistry`, where the original gives `Unregistered`. - Any other `Error.Failed` gives `NoDesktopEntry` or `Refused`, where the original retries. The README documents the finer split, but Task 28 must keep the original's retry and back-off. - *minor*: the hold behaviour Step 2 asks for was not measured: `Deactivated` on release, KDE bug 484525, modifier triggers and a mouse-button trigger. The workflow forbids key grabs on the live session, so this is correctly listed in the README as needing a person at the desktop: `cargo run -p fluxer-platform --example portal_shortcuts`. Charles should run it on Plasma 6.8. **Verdict: approved.** There are no blocking findings, and the local gate is green.
Author
Owner

Review round 1 (Task 3, #795): the one finding was minor and needed no code change. It said there was nothing to review: origin/shell-3-spike-wayland-global-shortcuts is at f2e3f17db, the same commit as the review base, and the spike already landed in shell as 900b258a7. I checked this. 900b258a7 is in origin/shell and the branch has no commits beyond shell, so I made no commit, no push and no follow-up issue.

Review round 1 (Task 3, #795): the one finding was minor and needed no code change. It said there was nothing to review: origin/shell-3-spike-wayland-global-shortcuts is at f2e3f17db, the same commit as the review base, and the spike already landed in shell as 900b258a7. I checked this. 900b258a7 is in origin/shell and the branch has no commits beyond shell, so I made no commit, no push and no follow-up issue.

Pull request closed

Sign in to join this conversation.
No description provided.