fix: share reliable virtual key delivery across Linux rigs
Rust checks / windows-cross-check (push) Successful in 1m6s
Rust checks / linux (push) Failing after 5m44s

This commit is contained in:
2026-10-08 19:38:35 +02:00
parent dd016f7727
commit 178c400eeb
4 changed files with 54 additions and 15 deletions
+31
View File
@@ -466,3 +466,34 @@ The headless e2e restores keyboard focus after virtual-pointer commands and
holds virtual keys briefly: instantaneous virtual input can disappear before
GPUI/Wayland dispatch. Keyboard actions update the editor entity directly,
avoiding a nested window borrow during event dispatch.
After merging clips and playback at `dd016f7`, the clips rig intermittently
reported “desktop did not honour Quit”. A fresh-window probe on 2026-10-08
missed 3 of 8 instantaneous `wtype` Ctrl+Q presses; two missed presses occurred
while Clipbin was focused. Temporary action/GUI-exit/worker-join markers showed
that the missed presses never reached the Quit handler. All 8 held-key attempts
reached the handler and completed shutdown. The temporary markers were removed;
no application shutdown change was needed.
Both scripts now source `scripts/rig/keys.sh`: it restores keyboard focus after
virtual-pointer input, gives the virtual keymap 200 ms to settle, and holds each
key for 100 ms. Modified keys also give the modifier 100 ms to settle. Delivery
has a 10-second timeout; each script still requires the actual desktop process
to exit successfully. Serial reruns passed with
`env PATH=/usr/bin:/bin:$HOME/.cargo/bin`:
- `scripts/validate/linux-clips.sh /tmp/clipbin-clips-quit-fixed`: H.264 retained,
360 CFR frames over a six-second aligned clip, continuous audio, zero decode
errors, original press range, bookmark protection, tiny-budget cleanup,
bookmark re-export after adjacent removal, and both Quit exits.
- `scripts/validate/linux-playback.sh /tmp/clipbin-playback-quit-fixed`: moving
preview (4.1% changed pixels), device audio RMS 0.08045, thumbnails, active
capture, seek/gap/boundary behaviour, volume/mute, frame stepping and both Quit
exits. Decode median/p95 were 2.578/4.073 ms; GPUI upload median/p95 were
0.241/0.408 ms.
Logs are `/tmp/clipbin-clips-quit-fixed.log` and
`/tmp/clipbin-playback-quit-fixed.log`; screenshots are in their corresponding
output directories. `bash -n`, `git diff --check` and `cargo fmt --check` also
passed. This follow-up changes only the Linux rig scripts and documentation;
Windows runtime and real Hyprland validation limits above remain unchanged.