Add the UI-free core — device discovery, keycode catalog, layout geometry - #84
Merged
HaoboGu merged 2 commits intoAug 3, 2026
Merged
Conversation
`DeviceDescriptor` restated five of `DeviceInfo`'s six fields, and every transport filled one on connect: serial re-ran `available_ports()` to look up the VID/PID it had just opened, and BLE read three Device Information Service characteristics over the air. Nothing ever read the result — the store asks the device itself once the handshake completes, and gets the firmware version with it. So the connect commands now answer with the session id alone, and `ConnectResponse` goes with the struct. `TransportInfo` gains a stable id per transport (port path / BLE id / socket address) so a rescan can tell which entry is the live one, and `discover()` no longer closes every session just to enumerate — that teardown belongs to startup, where a reloaded frontend's stale session is what needs dropping. `closeAllSessions` is exported for the caller that will do it.
None of this draws anything — it is what a keymap UI has to have underneath. - `deviceStore` holds discovery: scan, connect, switch, disconnect, and the startup pass that drops sessions a reloaded frontend left holding the port. - `keycatalog` answers "what can this key be bound to" from the firmware's own table, which `keycodeTables()` reads out of the wasm client. Families are matched by name rather than listed, so a keycode added upstream lands in its group by itself and anything unclaimed still reaches the user through `Other`. Against the current firmware that surfaced 48 codes the hand-written lists had missed, `Undo`/`Cut`/`Copy`/`Paste` among them. - `layout` turns a decoded variant into an extent: a key counts by its turned outline, so a 1u key at 45° is √2 wide and sizing from `rect.w` would clip it. A firmware that ships no `[layout].map` gets the bare matrix from its capabilities, built as a real `Variant` so nothing downstream branches on it. - `keycode` names actions the way a keymap reads them, `matrix` decodes the pressed bitmap, and the store gains `refreshMatrix` so a live view can poll the one thing topics never push.
HaoboGu
force-pushed
the
feat/device-picker-and-rynk-ui
branch
from
August 2, 2026 17:15
565fe1c to
7c094cc
Compare
Contributor
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.
No description provided.