Skip to content

Prevent Wayland dictation text loss#437

Merged
H-Chris233 merged 2 commits into
Open-Less:betafrom
H-Chris233:issue-420-wayland-p1
May 15, 2026
Merged

Prevent Wayland dictation text loss#437
H-Chris233 merged 2 commits into
Open-Less:betafrom
H-Chris233:issue-420-wayland-p1

Conversation

@H-Chris233
Copy link
Copy Markdown
Collaborator

@H-Chris233 H-Chris233 commented May 15, 2026

User description

Summary

  • make Linux Wayland dictation output copy-only instead of trusting streaming/paste success
  • disable streaming insertion eligibility on Wayland and report explicit Wayland clipboard fallback states
  • align Settings/Linux guidance with the current CLI + single-instance Wayland trigger path

Refs #420

Validation

  • cargo fmt --manifest-path openless-all/app/src-tauri/Cargo.toml
  • cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml --lib coordinator::dictation
  • cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml --lib focus_restore_failure_uses_specific_error_code
  • git diff --check
  • cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml
  • npm run build

Notes


PR Type

Bug fix, Documentation


Description

  • Disable Wayland streaming insertion

  • Fall back to clipboard-only output

  • Update Linux hotkey guidance text

  • Add Wayland behavior tests and docs


Diagram Walkthrough

flowchart LR
  A["Wayland session detected"] -- "disable streaming insert" --> B["Clipboard-only fallback"]
  B -- "manual paste required" --> C["User keeps dictated text"]
  D["Settings and i18n hints"] -- "reflect CLI shortcut path" --> E["Wayland trigger guidance"]
  F["Tests"] -- "cover fallback and errors" --> G["Wayland-specific validation"]
Loading

File Walkthrough

Relevant files
Bug fix
2 files
coordinator.rs
Pass Wayland state into dictation errors                                 
+2/-2     
dictation.rs
Force clipboard fallback on Wayland                                           
+141/-19
Documentation
8 files
types.rs
Refresh Linux hotkey support hint                                               
+1/-1     
en.ts
Clarify Wayland streaming insert behavior                               
+1/-1     
ja.ts
Clarify Wayland streaming insert behavior                               
+1/-1     
ko.ts
Clarify Wayland streaming insert behavior                               
+1/-1     
zh-CN.ts
Clarify Wayland streaming insert behavior                               
+1/-1     
zh-TW.ts
Clarify Wayland streaming insert behavior                               
+1/-1     
AdvancedSection.tsx
Update Wayland streaming input guidance                                   
+1/-1     
issue-420-wayland-plan.md
Add Wayland support phase plan                                                     
+317/-0 

Wayland cannot prove synthetic typing or paste delivery, so Linux Wayland now bypasses streaming success semantics and keeps completed dictation text in the clipboard with explicit fallback status. The Phase 1 plan is recorded at repo root to keep follow-up work aligned with the current CLI trigger decision.

Constraint: Wayland security model does not provide X11-style global key or cross-app text injection guarantees.

Rejected: Treating enigo or simulated paste success as inserted on Wayland | It can report success while the target app receives no text.

Confidence: high

Scope-risk: narrow

Directive: Keep Wayland automatic input as an explicitly probed future enhancement; do not silently restore fake insertion success.

Tested: cargo fmt --manifest-path openless-all/app/src-tauri/Cargo.toml; cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml --lib coordinator::dictation; cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml --lib focus_restore_failure_uses_specific_error_code; git diff --check; cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml

Not-tested: Real Wayland compositor clipboard behavior and Windows TSF runtime behavior on native hosts.
Wayland now uses CLI-triggered dictation and copy-only output safety, so user-visible Linux hints should not imply that Wayland streaming insertion or global hotkeys are still attempted inside OpenLess.

Constraint: Wayland trigger support is currently delivered through desktop shortcuts invoking openless CLI flags.

Rejected: Leaving old best-effort Wayland wording in Settings | It conflicts with Phase 1 copy-only behavior and the CLI trigger path.

Confidence: high

Scope-risk: narrow

Directive: Keep future portal/libei language in research docs, not current-product Settings hints.

Tested: npm run build; cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml; git diff --check

Not-tested: Live Wayland Settings rendering on GNOME/KDE/Hyprland/sway.
@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

420 - Partially compliant

Compliant requirements:

  • Wayland dictation output now avoids trusting streaming/paste success and uses an explicit clipboard fallback path.
  • Linux/Wayland guidance text was updated to point users toward the CLI trigger path.

Non-compliant requirements:

  • A usable global recording hotkey on Debian Wayland.
  • A concrete script/launcher command package for users to bind in desktop settings.

Requires further human verification:

  • Whether the documented CLI + single-instance trigger path can actually be bound and used reliably across Wayland desktop environments.
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@H-Chris233 H-Chris233 merged commit b792caa into Open-Less:beta May 15, 2026
4 checks passed
@H-Chris233 H-Chris233 deleted the issue-420-wayland-p1 branch May 15, 2026 02:03
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