Skip to content

Land #563: KDE autocomplete overlay pill, onto the comment-free master - #571

Merged
stevyhacker merged 2 commits into
masterfrom
claude/project-thread-5t5vjd
Nov 21, 2026
Merged

stevyhacker merged 2 commits into
masterfrom
claude/project-thread-5t5vjd

Conversation

@stevyhacker

Copy link
Copy Markdown
Owner

Requested by Stevan · project thread

Summary

#563 (by @SamLeatherdale) conflicts with #559, which removed every code comment. This PR merges Sam's commit de44ed4 exactly as it is and resolves the conflicts in a merge commit, so #563 will show as merged once this lands. The resolved code is #563's code with its comments removed. The one decision worth keeping is now in ADR 0002, under "On KDE Plasma the ghost is an overlay pill, never preedit".

To check the resolution: I removed comments from the pre-#559 versions of the seven conflicted files with comment-ratchet.py --delete and ran rustfmt. The output matched master byte for byte, so #559 only removed comments in these files. The same steps, run on #563's versions, produced this merge.

Validation

From LinuxWindows/, in a Linux container:

cargo fmt --all -- --check                                          # exit 0
cargo clippy -p lokalbot-platform --all-targets --locked -- -D warnings   # no warnings
cargo test -p lokalbot-platform --locked --lib autocomplete          # 107 passed, 0 failed
python3 ../Scripts/ci/comment-ratchet.py --check                     # Comment lines: 0 (baseline 0)

#563's own CI run (before the conflict) passed on Linux, Windows and macOS. Its live KWin client matrix is in #563.

Changed test expectations

Same as #563: live_input_method::kwin_input_method_shows_accepts_and_stays_out_of_passwords now asserts that no non-empty preedit reaches the field. Previously it expected preedit ' up on it'. The old expectation was wrong because browsers commit zwp_text_input_v3 preedit into the field on blur.

Linked issues

Fixes #562

Risk / rollout notes

  • kwin_wire::VERSION goes from 1 to 2. After updating, Settings asks the user to log out and back in once.
  • Only the KDE route changes. Sway, Hyprland and GNOME are handled in a follow-up PR.

Generated by Claude Code

SamLeatherdale and others added 2 commits November 21, 2026 13:54
…ad of preedit

Putting an unaccepted suggestion into `zwp_input_method_context_v1.preedit_string`
made `zwp_text_input_v3` clients such as Chromium, Electron, Firefox, and
Thunderbird commit the suggestion into the document whenever the field lost
focus on click or blur, because KWin bridges `preedit_string` without its
reset-commit string and those toolkits finalize active IME compositions locally
before notifying the compositor.

- Draw KDE Plasma suggestions on a click-through `zwp_input_panel_v1`
  (`set_overlay_panel`) surface (`overlay_pill.rs`) anchored by KWin to the
  focused field's `cursor_rectangle`, rendered via `cosmic-text` into an
  anonymous `memfd` buffer with `wp_fractional_scale_v1` + `wp_viewporter`
  HiDPI scaling and light/dark theme tokens.
- Bump `kwin_wire::VERSION` to 2, replacing `Request::Preedit` with
  `Request::Ghost` and an empty-preedit `Request::Nudge` for quiet fields, and
  keep suggestions out of `Core`'s `preedit` expectation via
  `Core::with_overlay_ghost()`.
- Update `live_input_method` to assert zero non-empty preedit on the KWin route
  and add a focus-loss regression check (`commit_on_blur`), plus update
  `LinuxWindows/README.md`.

Co-authored-by: Cursor <cursoragent@cursor.com>
Merges Sam Leatherdale's fix for #562 unchanged and resolves its conflicts
with #559: the code keeps #563's behaviour with its comments removed, and
the decision is recorded in ADR 0002 ("On KDE Plasma the ghost is an
overlay pill, never preedit").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QD3UkuaVf6PEtW1ptFCMB1
@stevyhacker stevyhacker self-assigned this Nov 21, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
lokalbot ef0da2a Commit Preview URL

Branch Preview URL
Nov 21 2026, 09:38 PM

@stevyhacker
stevyhacker merged commit d92e140 into master Nov 21, 2026
23 checks passed
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.

[Bug] Autocomplete suggestions on KDE Plasma (Wayland) are committed into text fields on focus loss

3 participants