Repository navigation
Conversation
The probe set Capabilities::thumbwheel as soon as gesture 46 appeared in the 0x6501 descriptor table. On an MX Master (b01e) the gesture is listed but not divertable, so capture left it native without a log line while the GUI kept offering thumb wheel settings that could never apply. Require a diversion index in the probe, bump the probe-cache schema so cached snapshots are re-probed, and warn when capture skips the wheel.
Confidence Score: 4/5
[Medium impact] The change reaches thumb-wheel capability reporting and capture for mice using the older Gestures2 path. The runtime change matches capture's existing limits, but the new test must satisfy the repository's explicit requirements before merging. Findings
|
| let channel = scripted_channel(raw).await; | ||
| let probe = probe_features(&channel, 0xff, None, None).await.0; | ||
| let caps = probe.capabilities().unwrap(); | ||
| assert_eq!(caps.thumbwheel, supported, "flags {flags:02x}"); |
There was a problem hiding this comment.
Blocking. The new test awaits scripted_channel and probe_features without a test deadline, then checks only caps.thumbwheel. This violates the repository requirement that async tests time out with a clear failure message and assert the whole reading. A stalled probe lacks a clear test-level failure, while changes to other capabilities or completeness can pass unnoticed.
Wrap setup and probing in a timeout, then compare the expected capabilities and completeness for both flag values. The test code establishes these gaps; no runtime hang was reproduced.
Rule Used: Severity: medium. Every bug fix ships a regression test that fails without the fix, and the PR states the counter-proof (the reverted line or the killed mutant). A test that passes with the fix reverted is not a regression test: ask for inputs where ... (source)
Summary
On an MX Master over Bluetooth (
046d:b01e, firmware MPM12.10), thumb wheel bindings still do nothing on 0.9.0 (#1388). The mouse has no0x2150, so #2038's Gestures2 path applies. The probe setCapabilities::thumbwheelas soon as gesture 46 appeared in the0x6501descriptor table, without checking that the gesture can be diverted.Capture reads the same descriptor, finds no divertable bit, and leaves the wheel native without logging anything. The GUI therefore offered thumb wheel settings that could never take effect, and the reporter's log only shows
gesture_thumbwheel=false.The probe now reports a Gestures2 thumb wheel only when firmware lets software divert gesture 46. Capture logs a warning when it skips one, so the next report shows why.
Making a non-divertable wheel bindable would mean taking its horizontal scroll from the OS input stream and tying it to this mouse. That is a different feature and is left out here.
Changes
openlogi-device:inventory/features.rs:Capabilities::thumbwheelfrom Gestures2 requires a diversion index.inventory/persist.rs: probe-cache schema 20 → 21, so cached snapshots that still claim the wheel are re-probed.session/gesture/arm.rs: warn when gesture 46 is absent or not divertable.openlogi-hidpp(feature/gestures2.rs): drophas_thumbwheel, which has no caller left.openlogi-core(device.rs): thethumbwheeldoc says the Gestures2 wheel must be divertable.docs/CONFIGURATION.md: explains when the MX Master and MX Master 2S thumb wheel can be bound.Testing
cargo fmt --all -- --checkcargo test -p openlogi-device --lib: all passed.gestures2_thumb_wheel_counts_only_when_it_can_be_divertedprobes a scripted device whose gesture 46 descriptor has flags0x83(divertable) and0x81(not divertable).is_some()check restored, the test fails on0x81.cargo clippy -p openlogi-hidpp -p openlogi-device -p openlogi-core --all-targets -- -D warningsNot runtime-tested on hardware; I don't have an MX Master. The
0x81flags in the test are an assumption. The reporter's diagnostics show gesture 46 present and never diverted, but not its raw descriptor byte.To verify on an MX Master (
b01e):4041) over Unifying, the thumb wheel settings are still shown and bindings still work.Refs #1388