Skip to content

fix: dependency tidy#180

Merged
goodroot merged 2 commits into
mainfrom
goodroot/dep-fixes
May 24, 2026
Merged

fix: dependency tidy#180
goodroot merged 2 commits into
mainfrom
goodroot/dep-fixes

Conversation

@goodroot

Copy link
Copy Markdown
Owner

Closes #178

@github-actions

github-actions Bot commented May 24, 2026

Copy link
Copy Markdown

Continue PR Review

Automated review via Continue CLI run through opub.

Summary

The change improves error handling around text injection and adds targeted tests, but the new GNOME/Wayland direct-typing fallback has a functional regression risk for non-ASCII and layout-dependent text input, and the new tests do not cover that behavior.

Findings

  • On GNOME/Wayland, _inject_via_clipboard_and_hotkey() now prefers ydotool type before any clipboard-based paste path (lib/src/text_injector.py). This bypasses the clipboard path entirely for those sessions, but ydotool type is layout-dependent and typically unreliable for Unicode/non-ASCII text, dead keys, and IME/composed input. Users dictating accented characters, symbols, or non-Latin scripts may get corrupted output where clipboard paste previously preserved exact text. This needs either a capability check, a narrower fallback, or tests that prove correct behavior for non-ASCII input.
  • The new direct-typing path also changes semantics around “paste” vs “type” for terminal/editor targets on GNOME/Wayland. Clipboard paste preserved multiline text and exact bytes, while ydotool type replays keystrokes, which can trigger editor/terminal keybindings, auto-pairing, shell behaviors, or different handling of tabs/newlines. There are no tests covering multiline input, tabs, or special characters through the GNOME fallback, so this is a regression risk that should be covered before merge.

Suggested follow-ups

  • Add tests for GNOME/Wayland direct typing with Unicode/non-ASCII text, multiline text, tabs, and punctuation-heavy input.
  • Consider restricting the ydotool type fallback to plain ASCII/single-line text, and keep clipboard-based behavior for anything else.
  • Add an integration-style test or documented compatibility matrix for common GNOME targets (GTK text fields, terminals, browsers, Electron apps).

@goodroot

Copy link
Copy Markdown
Owner Author

The above has some nuance which makes me happy with the implementation as is. Merging.

@goodroot goodroot merged commit 4291711 into main May 24, 2026
2 checks passed
@goodroot goodroot deleted the goodroot/dep-fixes branch May 24, 2026 22:14
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.

Text injection broken on GNOME Wayland — ydotool key chords swallowed by Mutter

1 participant