Skip to content

spec: add Wayland global hotkey toggle plan#10487

Open
oz-for-oss[bot] wants to merge 1 commit intomasterfrom
oz-agent/spec-issue-4800
Open

spec: add Wayland global hotkey toggle plan#10487
oz-for-oss[bot] wants to merge 1 commit intomasterfrom
oz-agent/spec-issue-4800

Conversation

@oz-for-oss
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot commented May 8, 2026

Summary

  • Adds a product spec for a Wayland-compatible Warp toggle command that users can bind through compositor/system shortcut settings.
  • Adds a tech spec grounded in current Linux global hotkey, DBus single-instance, root-view window toggle, and packaging code paths.
  • Documents the non-goal of native Wayland global key capture and avoids wmctrl, X11-only tooling, or DE-specific integrations as the supported path.

Validation

  • Ran git diff --check for the new spec files.
  • Reviewed the spec-only diff for scope and repository references.

Related issue: #4800

Co-Authored-By: L0GYKAL.eth <32228897+L0GYKAL@users.noreply.github.com>

Co-Authored-By: Oz <oz-agent@warp.dev>
@oz-for-oss
Copy link
Copy Markdown
Contributor Author

oz-for-oss Bot commented May 8, 2026

@oz-for-oss[bot]

I'm starting a first review of this spec-only pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor Author

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

The product and tech specs define a coherent Wayland-compatible toggle path via compositor-owned shortcuts, channel-specific launcher helpers, single-instance DBus forwarding, and guarded Wayland fallback behavior.

Concerns

  • The CLI conflict policy for --toggle with URL arguments should choose one behavior so implementation and tests do not diverge.

Security

  • Activation platform_data introduces a transient token path; the spec should state that these values are not logged, persisted, or emitted in telemetry.

Verdict

Found: 0 critical, 0 important, 2 suggestions

Approve with nits

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread specs/GH4800/tech.md
2. Forward the toggle action through the existing Linux DBus service.
- In `app/src/app_services/linux/mod.rs`, update `pass_startup_args_to_existing_instance` so `args.toggle_visibility` calls `ExistingApplicationProxy::activate_action` instead of `open`.
- Use a stable action name such as `toggle-visibility`. Keep it channel-scoped by relying on `DBusServiceHost::well_known_name()` and `ChannelState::app_id()`, as the current `Open` path already does.
- Continue to pass normal URLs to `Open`; `--toggle` and URL opening should be mutually exclusive at the clap layer or resolved deterministically by prioritizing explicit URLs and returning a clear CLI error for invalid combinations.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 [SUGGESTION] Choose one policy for --toggle combined with URL args (reject, ignore toggle, or prioritize URLs) and make validation/tests assert that exact behavior.

Comment thread specs/GH4800/tech.md
- In `app/src/app_services/linux/mod.rs`, update `pass_startup_args_to_existing_instance` so `args.toggle_visibility` calls `ExistingApplicationProxy::activate_action` instead of `open`.
- Use a stable action name such as `toggle-visibility`. Keep it channel-scoped by relying on `DBusServiceHost::well_known_name()` and `ChannelState::app_id()`, as the current `Open` path already does.
- Continue to pass normal URLs to `Open`; `--toggle` and URL opening should be mutually exclusive at the clap layer or resolved deterministically by prioritizing explicit URLs and returning a clear CLI error for invalid combinations.
- Capture and forward freedesktop `platform_data` if the launching environment provides activation metadata such as an activation token. Initially this can be a small helper that reads known environment variables into the DBus platform-data map; if winit cannot consume the token yet, retain it in the action event type for a follow-up rather than discarding it at the DBus boundary.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 [SUGGESTION] [SECURITY] Treat activation platform_data as transient untrusted input: document that tokens are forwarded only to platform activation code and are not logged, persisted, or emitted in telemetry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant