Fold remote switches into the switch list and own their hold timing - #763
Merged
Merged
Conversation
Switches forwarded from Switchify Remote were a separate panel of eight numbered slots with its own Save button and a reload-profiles chore after every change. They are now rows in the same list with the same editor: names, press action, ordered hold actions and the timing note. Add remote switch takes the next free number and the number can be changed in the editor. Edits save as they happen. The backend applies saved remote assignments, the shared hold interval and a mode change to a live session on the next press instead of ending it, and only ends the session when the mode's required actions are gone. Session start no longer rejects a stale profile revision, since the PC applies its current assignments and Remote's labels are only informational. Holding a remote switch past the emergency limit resets the scan and keeps the session, as the local emergency hold does. Slots gain an optional name; existing files load unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pausing for a switch or scan-settings save ended the remote session before the new settings were applied, so the live update never happened. Pause now resets only the scanner and local key broker; the session survives and restarts on the next tick with the applied settings. Learning a key still stops everything, since the broker must be free. A replacement press from Remote arrives as a sync without the switch followed by a fresh down, so the PC resets the gesture instead of treating it as a release. Moving a remote switch to another number and opening a remote draft keep focus, the emergency hold shown counts remote hold lists, and an unusable Add button is skipped when focus returns. 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.
Remote switches now live in the same list as keyboard switches, with the same editor, names and hold actions, and the PC owns hold timing for them.
Settings UI
Behaviour
The remote slot schema gains an optional
name; files without it load unchanged.save_switchesandconfigure_point_scanno longer bump the remote profile revision.Companion
Switchify Remote must stop applying its hold-to-stop and idle limits to scanning profiles for holds longer than five seconds to reach the PC. That change is in the companion Remote PR switchifyapp/switchify-remote#173; until it ships, remote holds are capped by the phone's hold-to-stop setting.
Validation
tsc, 149 frontend tests plus 5 Node tests, cargo fmt, Clippy all targets with warnings denied, 362 Rust unit tests and 7 integration tests passed on Windows. An independent review of the first head found that live apply was dead behind the pause and that a replaced press could select; both are fixed with tests, along with focus after moving a remote switch or opening a remote draft. New tests cover remote rows in the list, editing in place, adding into the next free slot, moving a slot, removing with a failed save and retry, live application of config to a session, and names flowing into bindings and labels. Tests use fake input and do not send desktop input.
Physical Android to PC checks remain manual: a remote hold longer than five seconds offering hold actions, editing assignments during a live session, and the emergency hold resetting without ending the session.