fix(lotus): reply immediately to lotus actions with no mounted handler; new fromWidget actions

Lotus toWidget actions with no handler used to sit in the LazyEventEmitter
backlog forever (host timed out; stale replay on remount). They now get
an immediate {} reply. Adds RequestState and DenoiseState to the enum
(fromWidget) with a test pinning the toWidget/fromWidget split.

Fixes #18

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
Lotus CI
2026-09-13 01:22:20 -04:00
co-authored by Claude Opus 5
parent bb639bb92d
commit 501e3fb5ac
3 changed files with 80 additions and 2 deletions
+15
View File
@@ -31,6 +31,21 @@ export enum LotusWidgetActions {
Decorations = "io.lotus.decorations",
/** toWidget: deafen remote audio (and optionally mute screenshare audio). */
SetDeafen = "io.lotus.set_deafen",
/**
* fromWidget: sent on (re)registration of a lotus toWidget handler (e.g.
* decorations) so the host can re-push state that would otherwise only be
* sent on change (decorations roster, the current focus pin) after an
* EC-side reconnect/remount. cinny's `resendForkState()` should respond to
* this the same way it responds to a fresh join.
*/
RequestState = "io.lotus.request_state",
/**
* fromWidget: real state of the in-source denoise engine —
* `{ active: boolean, model: string, error?: string }` — sent once the
* processor attaches (or after the rnnoise fallback also fails), so the host
* toggle can reflect reality rather than the requested state.
*/
DenoiseState = "io.lotus.denoise_state",
}
/** toWidget Lotus actions that must be allow-listed in `initializeWidget`. */