Repository navigation
Conversation
|
082ef2f to
5d97d6b
Compare
bbcf430 to
bea2268
Compare
`workflow_commands` joined line continuations by replacing a backslash followed by LF. Git hands Windows checkouts CRLF unless a `.gitattributes` overrides it, and no rule covers `.github/`, so the continuation is a backslash followed by CRLF there and the join misses it — leaving a stray backslash mid-command. Every wrapped command in `ci_yml_runs_what_this_runner_runs` therefore failed on Windows and only on Windows, so `cargo test --workspace` could not pass on a Windows checkout of an unmodified master. CI never saw it: that job runs on Linux and macOS. Normalizing CRLF before the join fixes the parser rather than the checkout, so it holds however a contributor's git is configured. A test asserts the two line endings parse identically.
The module docs name `PermissionStatus::Unknown` while the type was `cfg(any(macos, linux))`, so on Windows the link had no target, `lib.rs` denies `rustdoc::broken_intra_doc_links`, and the whole crate's docs failed to build. The rustdoc gate in AGENTS.md was therefore unrunnable on a Windows checkout of an unmodified master; CI never saw it because that job is Linux. Declaring the enum everywhere rather than escaping the link keeps the documentation intact, which is how the same bug in `openlogi-hid` was settled (PR AprilNEA#661). It also matches `Permission::Accessibility` immediately below, which is already declared on every platform despite documenting a macOS-only capability — the crate's vocabulary is uniform, only the platform code that answers with it is gated. Windows has no permission to report, so nothing there constructs one; the type is inert rather than wrong.
The two defects this PR fixes were both Windows-only, and both reached master for the same structural reason: `rustdoc (non-GUI crates)` runs on ubuntu-latest, so a `cfg`-gated doc target that exists on Linux and macOS but not on Windows leaves an intra-doc link that resolves everywhere CI looks. `PermissionStatus::Unknown` was exactly that. A broken intra-doc link is neither a compile error nor a clippy lint, so the existing Windows job could not catch it either. Running the rustdoc job's own command there closes the gap: the toolchain and cache are already set up, so it costs one doc build and no new runner. Fixing the two instances without this leaves the third to be found by hand by whoever next runs the gate on Windows — the failure mode this PR exists to remove.
The Windows job's default shell is pwsh, where a trailing backslash is not a line continuation. It parsed --exclude as a unary operator and the step failed before cargo ran, which is how the job this PR adds the step to went red. bash rather than folding the command onto one line, so it stays byte-identical to the Linux rustdoc job it exists to mirror.
Co-authored-by: Samuel Phinizy <none@none.com>
bea2268 to
835a869
Compare
…ecycle Merge upstream master, retain pending restoration until a fresh keyboard channel, and forward genuine departure announcements through follower channels. Preserve physical inventory tracking and reject stale session completions. Keep source-specific validation, exact control reporting modes, and regression coverage for retirement, reconnect cleanup, and bounded event-time slot reads.
… state Merge updated forwarding and current master, preserve dpi_gestures before appending host capabilities in IPC v32, and use the StateEvents mutation boundary. Probe reportable host controls during the existing all-or-nothing table walk and retain persistence rollback coverage. Validated with workspace tests, Clippy, rustdoc, WebAssembly and repository hooks. Mock-agent GUI checks cover selecting a follower, persistence across restart, clearing the link, and connected/offline rows.
Only active restoration writes block a waiting transition. Ready restoration tokens retain ownership and prevent their own keyboard from rearming without blocking another keyboard indefinitely. Add a replay-backed multi-keyboard regression that fails under the previous policy.
Include selected followers even when their capability or inventory record disappears. Allow removing an existing link without requiring a reachable ChangeHost target, while retaining validation when adding followers. Merge the multi-keyboard forwarding recovery fix and its replay regression.
| let restore_blocks_transition = self.slots.iter().any(|slot| { | ||
| matches!( | ||
| slot, | ||
| HostSwitchSlot::Recovering(Recovery { | ||
| restore: RestorePhase::Restoring, | ||
| .. | ||
| }) | ||
| ) | ||
| }); |
There was a problem hiding this comment.
Follower moves before restoration
If keyboard B has keyboard A as a follower while A has a pending Ready restoration, this change lets B's transition move A first. The transition also defers A's restoration, so A can leave the current host with its controls still altered until it reconnects. A pending restoration should prevent a transition from moving that keyboard as a follower.
Knowledge Base Used: Recover host-switch controls across channel retirement
Summary
Add a capability-gated Easy-Switch panel for keyboards with reportable host
controls. Users can select locally known ChangeHost-capable followers without
editing TOML, using the existing physical device identities and
host_switch_targetsconfiguration.Follower links assume that each linked device uses the same Easy-Switch slot
number for the same computer. OpenLogi does not currently detect or remap
mismatched follower associations.
This branch is stacked on the Easy-Switch reliability PR #1122 and #970.
Changes
host_switchingandhost_switch_controlsflags to device capabilities.0x1814 ChangeHostand the reportable0x1b04host-control table through one named capability plan, preserve the upstream
event-index inventory data, and bump the probe cache schema to v4 so older
inventories without the new capability fields are reprobed.
in inventory protocol v30 and update the mock inventory. Follower settings
do not gain a new IPC mutation.
the pre-existing
host_switch_targetsfield directly, request the existingagent config reload only after a successful save, repaint failed rollbacks,
reject self-links, and provide locale-complete semantic TOML copy.
Screenshot
Pending a final GUI smoke test and screenshot. This PR is ready for code review;
the remaining runtime verification is disclosed below.
Testing
cargo fmt --all -- --checkRUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets -- -D warningsRUSTFLAGS="-D warnings" cargo test --workspaceRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay --exclude openlogi-agentcargo xtask ci wasmcargo test -p openlogi-device inventory --no-fail-fastcargo test -p openlogi-ipc --test wire_formatcargo test -p openlogi-ui localecargo test -p openlogi-desktop i18ncargo test -p openlogi-desktop easy_switchtyposwas not run locally becausetypos-cliis unavailable.the keyboard and follower slots map to the same computers, select and clear a
follower, restart the app, confirm the selection persists, and attach a
screenshot of the Easy-Switch tab.
Depends on #1122 and #970
Related to #650