Repository navigation
fix(gui): choose the receiver before pairing a device - #1614
Merged
Merged
Conversation
[Medium impact] The PR appears safe to merge; no new actionable defects were found. SummaryAdd Device now asks users to choose a receiver and keeps that choice through retries and window recreation.
No new actionable issues were found. The supplied previous threads were rechecked without reposting them; none had a supplied Comment number. No builds, tests, or native-window captures were run during this review.
|
With both Unifying and Bolt receivers connected, Add Device used the
first enumerated receiver, so a Bolt device could never pair when the
Unifying receiver enumerated first. Add Device now asks which receiver
to use and keeps that exact choice through retries and window
recreation.
- Append `ReceiverSelector::ReceiverUid { product_id, uid }`. It matches
the selected product ID and receiver UID and never falls back to
another receiver.
- Keep selected-receiver open diagnostics through a runtime receiver
identity cache shared by the inventory and pairing.
- Wait for terminal cleanup before acknowledging `cancel_pairing`.
- Keep a refused pairing command visible across empty pairing snapshots.
- Add the chooser strings to every locale catalog and document the flow.
Squashed from the contributor's ten commits on
`fix/pairing-receiver-selection` before rebasing onto master.
Two Unifying receivers share one product ID, so only the unique ID tells them apart. Cover choosing the second one: only its channel stays open, and the first sees nothing beyond its identity read. An ID that matches neither receiver fails the session with `ReceiverNotFound` and writes nothing past the identity reads.
`list_pairing_receivers` read the unique ID only for Bolt and returned `None` for every Unifying receiver, although `read_receiver_uid` already reads the Unifying serial number. A caller could then not build a `ReceiverSelector::ReceiverUid` for a Unifying receiver from the listing. Read the ID for both families, so each listed ID is one a selection can name.
`pairing.cancelling` was the only catalog value ending in three periods; every other in-progress string uses `…`. The non-English catalogs carry the English fill-in for this new key, so they change with it.
AprilNEA
force-pushed
the
fix/pairing-receiver-selection
branch
from
October 21, 2026 07:40
b6b76cb to
39008c6
Compare
Merged
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.
Summary
With both Unifying and Bolt connected, Add Device used the first enumerated receiver, so a Bolt mouse could never appear when Unifying came first. Add Device now asks which receiver to use and retains that exact choice through retries and window recreation. A refused pairing command also keeps its explanation and Retry action when the agent refreshes an empty pairing snapshot.
Changes
ReceiverSelector::ReceiverUidwhile preserving existing selector encodings. Document the extension under upstream's unreleased IPC version 37, following the once-per-release protocol policy; the latest release, v0.8.14, uses version 36. Keep client and agent binaries from the same source tree.Merged upstream master
87ef8dafafter v0.8.14. The refresh retains upstream receiver APIs, notification flags, per-keyboard OS layout, pairing icons, passkey behavior, locale additions, and new device settings. This PR remains independent of #1746 and #1807.Testing
Final tree on Windows x86_64, Rust 1.99.0, with
RUSTFLAGS=-D warningsandCARGO_INCREMENTAL=0:a_refused_start_keeps_its_error_and_target_after_empty_snapshotsfailed because the Retry action disappeared. It passes after the fix and verifies that Retry targets the same receiver.cargo test --locked -p openlogi-desktop windows::add_device::tests -- --nocapture— 14 passed, including cancellation acknowledgement and receiver changes.cargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets -- -D warningscargo test --locked --workspace— 2,508 passed; two existing ignored doctests.cargo doc --locked --workspace --no-deps --document-private-items --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay --exclude openlogi-agent, withRUSTDOCFLAGS=-D warnings.cargo xtask ci wasm ast-grep typos— all three checks passed, none skipped.cargo deny --config .cargo/deny.toml --all-features --manifest-path crates/openlogi/Cargo.toml --locked checkgit diff --cached --checkWorkspace tests cover fixed-byte IPC compatibility, receiver selection and UID recovery, inventory replay, pairing-window interactions, locale parity, desktop localization, and upstream icon/passkey behavior.
macOS validation at
b6b76cbe830af4c1c3fbaa2059dcd1ea0f1b6508on macOS 27.0.1 / arm64 / Rust 1.99.0, with warnings denied:cargo xtask ci— 7 passed, 0 failed, 7 skipped. Passed rustfmt, publish closure, native full-workspace/all-target Clippy, Rust 1.98 arm64 all-target workspace check, non-GUI private-item rustdoc, macOS all-target workspace tests, and portable Wasm checks.cargo xtask ci i18n wirepassed catalog parity/localization and all 20 fixed-byte wire tests.cargo build --locked -p openlogi-desktop -p openlogi-agent -p openlogi-overlay -p openlogi— passed; all four outputs verified as Mach-O arm64 debug binaries. These builds were not installed; installation and distribution packaging/signing were not validated.Linux builds and physical KVM, Bluetooth/Bolt handoffs, pairing/passkeys, sleep/wake, modifier recovery, and native-window screenshot qualification remain unperformed on this exact head. Hardware qualification remains: select between mixed and same-family receivers, authenticate the intended device, reopen/retry the flow, wait for cancellation cleanup, and verify disconnect or selected-receiver failure never pairs on another receiver.
The screenshot below is an earlier Windows preview with synthetic inventory, not this refreshed head.