Repository navigation
feat(core,daemon,app): dialpad bindings and the dialpad panel (#188) - #206
Conversation
A profile's [dialpad] table binds the dial, the roller (cw, ccw, step, label; a chord string is the short form) and buttons 1 to 4 (label, action, on_fail); an app profile falls back to the global table per control. A turn runs its action once per step detents, the rest carried, at most [dialpad].max_per_event (config.toml, default 8) per report. The daemon drives the Dialpad on its own actor next to the Keypad's (the Bolt receiver found under sysfs or --dialpad-device), reports it in status and as the dialpad event, turns as the new dial event class and buttons as key events with a control. Trace records and press requests name a control (dial, roller, button:N) instead of a key. A turn under the session lock is traced blocked and runs nothing; a turn is no pad activity for the page return, a button press is. The profile editor reads and writes the controls (keyvo-client Editor::control and set_control, the app's control and edit_control commands), keeping a short-form chord short. Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
…t link Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Merge summary: PR #206 feat(core,daemon,app): dialpad bindings and the dialpad panel (#188)What changes and why: The Dialpad now does something. A profile's
|
Summary
Slice 8 of the beta epic #180 (plan QUB-633, revision 2). The Dialpad now does something: a profile's
[dialpad]table binds the dial, the roller and the four buttons, the daemon drives the Dialpad on its own actor next to the Keypad, the socket reports it, and the Pad screen gets the Dialpad panel.Closes #188
Changes
profile.rs, newdialpad.rs,edit.rs,socket.rs,trace.rs,config.rs,schemas/):[dialpad]withdialandroller(cw,ccwas a full action or a chord string,stepdefault 1,label) andbuttons.1tobuttons.4(label,action,on_fail); unknown fields rejected with position. Per-control fallback to the global table (Bindings), the step and carry arithmetic (Turns),[dialpad].max_per_eventinconfig.toml(default 8). Trace records carrycontroland an optionalkey. The editor writes controls (set_rotary,set_button), keeps a short-form chord short, dropsstep = 1and removes a control left empty.dialpad.rsactor,daemon.rs,engine.rs,linux.rs,main.rs,exec.rs,socket.rs): a second actor on its own thread and connector (the Bolt receiver under sysfs or--dialpad-device), so either device may be absent;status.dialpadand thedialpadevent; thedialevent class; buttons askeyevents withcontrol;presswithcontrol(+delta) anddry_run;KEYVO_CONTROLfor anexec; a turn under the lock is tracedblocked; a turn is no pad activity for the page return, a button press is.Editor::control/set_control, the mirror keeps the Dialpad block and held buttons;controlandedit_controlcommands (build.rs and the capability list).Dialpad.svelte(panel under the mirror, collapsible,No Dialpad connected, the pulse),ControlEditor.sveltein the Inspector,ActionFields.svelteshared with the key editor, the catalogue assigning to a control,protocol.ts,editor.ts,pad.ts, the mock (a connected Dialpad reading contrib's bindings, adialevent every 3 s).docs/socket-api.md;CONTEXT.md(Control, Detent);docs/design/gui-ux.md§3.3 as built;docs/beta-test.mdblock feat(core,daemon,app): dialpad bindings and the dialpad panel (#188) #206; roadmap status; README device row;CLAUDE.mdlayout and test doubles; the socket fixtures README.Automated checks
just fmt-checkjust lint(clippy-D warnings)just test(792 passed, 1 skipped)just deny(advisories, bans, licenses, sources ok)just app-test(svelte-check 0 errors, vitest 2627 passed, audit at high clean, app deny ok)User test
Owner, host, both devices, the daemon under the unit, the example profiles (
docs/beta-test.md, section 5, block #206).bin/keyvo ctl statuscarries thedialpadblock with"connected":true, the slot and both rollers.bin/keyvo ctl subscribeshowsdialevents withactionsandtraceentries with"control":"dial".step = 1on the dial, a flick givesdialevents withactionsat most 8; with[dialpad] max_per_event = 2inconfig.toml, at most 2.No Dialpad connected; plug it back and touch the Dialpad: works again within about two seconds.blocked.generalpage keep turning the dial: the page returns after 10 s anyway; button presses keep it.Brightness uptocw: the file carries it and the dial raises the brightness; undo in the file: back on the volume.bin/keyvo ctl press '{"control":"dial","delta":6,"dry_run":true}'answers"runs":1with adry_runentry; nothing changes.Notes for reviewer
stepstays default 1 as the issue says (one action per reported increment); the example profiles set 6 (volume), 4 (tabs), 15 (indent) so a turn feels like a ratchet.max_per_eventdefault 8 caps a flick atstep = 1.PressDetectorover keys and buttons) rather than instate.rs; the page-return rule is tested end to end (a_turn_does_not_hold_the_page_return_and_a_button_does). The turn arithmetic and fallback are core tests incrates/keyvo-core/tests/dialpad.rsinstead ofstate.rs.keyis now optional in trace records andkeyevents, and a status carriesdialpad; an older client would fail on a Dialpad record. All in-repo clients are updated.blockedrecord per report.presscommand takes a key); the panel's "no profile has a table" check looks at the shown and the global profile only (the profile list carries no Dialpad flag).4a6a308holds core, daemon, client and the Tauri commands together: the trace and press changes do not compile in smaller steps.