lotus(#2): address review — ack contract, rate, param precedence
- Document that io.lotus.call_state is request/response and the host must
ack it (cinny listenAction replies {}) to avoid 10s-timeout churn (H1).
- Throttle 150ms -> 250ms to reduce widget traffic (M1).
- lotusParam: hash fragment wins over query, matching EC's ParamParser (L1).
- Fix the misleading "opaque" id comment; id is userId:deviceId (L2).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
9d7784b9bc
commit
0f90600a59
@@ -12,7 +12,7 @@ import { type CallViewModel } from "../state/CallViewModel/CallViewModel";
|
||||
import { LotusWidgetActions, lotusFlag, lotusSendToHost } from "./lotusWidget";
|
||||
|
||||
interface ParticipantState {
|
||||
/** Opaque media id (stable per tile). */
|
||||
/** EC media id (`${userId}:${deviceId}`), stable per participant device. */
|
||||
id: string;
|
||||
/** Matrix user id this media belongs to. */
|
||||
userId: string;
|
||||
@@ -59,7 +59,9 @@ export function startLotusCallState(vm: CallViewModel): () => void {
|
||||
),
|
||||
),
|
||||
// `speaking` flips rapidly; cap the send rate and drop no-op repeats.
|
||||
throttleTime(150, undefined, { leading: true, trailing: true }),
|
||||
// 250ms is plenty for speaking rings / mute badges and keeps the
|
||||
// request/response widget traffic modest.
|
||||
throttleTime(250, undefined, { leading: true, trailing: true }),
|
||||
distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),
|
||||
)
|
||||
.subscribe((participants) => {
|
||||
|
||||
Reference in New Issue
Block a user