Skip to content

fix(flow): wait ten seconds for a handed-off device to arrive - #2546

Draft
bettodiaz wants to merge 1 commit into
AprilNEA:masterfrom
bettodiaz:fix/flow-arm-timeout
Draft

bettodiaz wants to merge 1 commit into
AprilNEA:masterfrom
bettodiaz:fix/flow-arm-timeout

Conversation

@bettodiaz

Copy link
Copy Markdown

Summary

A Flow handoff reports TIMEOUT and skips cursor placement when the switched devices take longer than 3 s to show up on the receiving side, even though they do arrive. I measured how long that takes:

  • Linux receiver: 2.0 to 4.2 s per handoff, so roughly half of them missed the 3 s window.
  • macOS receiver: 7 to 9 s (the Mac agent log shows its 3 s window closing, then the devices appearing about 4 to 6 s later).

This raises the receiver's arrival window from 3 s to 10 s, the existing MAX_ARM_TIMEOUT a sender honors.

Changes

  • openlogi-agent-core: ARM_TIMEOUT 3 s to 10 s, with a comment giving the measured arrival times; the one handoff test that hard-coded the 3 s window now follows the constant.

Testing

  • cargo fmt --all -- --check, cargo test -p openlogi-agent-core -p openlogi-agent (1065 passed): pass.
  • cargo clippy -p openlogi-agent-core -p openlogi-agent --all-targets -- -D warnings: fails on 8 map_unwrap_or lints in openlogi-core that are already on master (Rust 1.100); clean with that one lint allowed.
  • Not run: the full workspace gate, ast-grep, typos, cargo-deny, the macOS and Windows jobs.
  • Hardware: with an 8 s window on a Linux receiver, all six returns from a Mac arrived (2.0 to 4.2 s) and the cursor was placed each time. The Mac side was not tested with the new value.

This branch has not been deployed

No deployments
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.

1 participant