fix(desktop): prevent lag-induced key repeats and unblock video repair - #87
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A delayed key release lets X11 typematic manufacture letters that the native client never requested. The viewer now forwards intentional local OS repeats, while per-key X11 leases suppress server repeat during a genuine hold and restore the original setting after the last controller releases it. Viewer and agent require a coordinated update.
Explicit video repair also now retires obsolete media writes/receipts and forces a new independent picture through a session-local epoch. Repeated repair requests coalesce while that picture is in flight; input, heartbeats and unrelated connection services remain alive.
Validation: a disposable Xvfb regression reproduced eight keypresses from one down event with a 160 ms delayed release before the fix; afterward it observes one, preserves intentional repeats and checks shared-hold/drop cleanup. All eight native X11 input cases pass. Real Iroh/Noq fixtures cover blocked independent writes, saturated admission, delayed receipts and native H.264 recovery. macOS desktop tests and strict default/desktop Clippy pass; Linux X11 Clippy passes. Both-OS CI is required. Installed-device latency/stability qualification remains open and is not inferred from loopback results.
The first Linux CI exposed a pre-existing metrics test race: server sampling ran after queueing the echo but before the UDP driver sent it. The fixture now waits for a peer-observation fence before sampling, preserving all assertions without sleeps or production transport changes. The corrected metrics fixture and strict metrics Clippy pass locally.