feat(forwarding): let the PC own hold timing for scanning profiles - #173
Merged
Merged
Conversation
Hold-to-stop and the idle stop now apply to keyboard forwarding only, so a long hold on a scanning profile still delivers its release and the PC can offer hold actions past five seconds. Cancelled presses are withdrawn with a sync instead of ending the session; replacements send release then press. Closes #172 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ing it A synthesized release would reach the PC as an up edge and could select. For scanning profiles the old press is withdrawn with a sync that omits the switch, then the new press is sent. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
enaboapps
marked this pull request as ready for review
September 14, 2026 18:41
This was referenced Sep 14, 2026
Closed
enaboapps
added a commit
that referenced
this pull request
Sep 15, 2026
* fix(forwarding): restore hold-to-stop for scanning profiles Removing it in #173 left switch users no way to end a session from a switch. A release at or past the Forwarding hold-to-stop stops forwarding without an actionable release again; shorter holds still deliver their release so the PC can run hold actions. The idle stop stays off for scanning, and cancelled or replaced presses keep their sync-based handling. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * test(forwarding): pin safety stop ordering after a hold-to-stop Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Owen McGirr <o.a.mcgirr@gmail.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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.
Closes #172
Summary
Scanning profiles leave hold timing to the PC. Remote's hold-to-stop and 60-second idle stop now apply to keyboard forwarding only, so a long hold on a scanning profile still delivers its release and the PC can offer hold actions past five seconds. A cancelled press is withdrawn with a
switch.syncthat omits it, so the PC drops the gesture without selecting and the session continues. A replacement press is withdrawn with aswitch.syncthat omits the switch and then sent as a fresh press, never as a release the PC could act on; keyboard forwarding keeps its synthesized release. Nothing in the controller ends a scanning session on the user's behalf any more; disconnects, explicit Stop and PC refusals still do.The Forwarding hold to stop setting describes its narrower scope, and the protocol and smoke-test docs describe the new behaviour. The PC side in switchifyapp/switchify-pc applies assignments to a live session and no longer rejects a stale profile revision.
Companion PC PR: switchifyapp/switchify-pc#763
Validation
npm run validateon Node 24: lint, TypeScript, 594 tests across 66 suites, 21 of 21 Expo Doctor checksUpdated tests cover cancelled, held and replaced presses keeping the session active with the expected edges and syncs, and the idle stop not being armed for scanning profiles. An independent review of the first head found the synthesized release on replacement could select on the PC; fixed in the second commit. Physical Android to PC validation of a hold longer than five seconds remains outstanding.