Show in Diagnostics what the glasses deliver (event types only)
During the second device session a tap on the glasses did nothing and the phone page could not show whether the Even app had delivered any event. The Even adapter now counts gesture/lifecycle events, ignored events and audio frames and records the last non-audio event by envelope and type code (never audio or content). The phone's Diagnostics shows it and refreshes when an event arrives, including one that changes no state. Not reviewed. Not deployed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,8 @@ export interface Snapshot {
|
||||
pairingExpiresAt: string;
|
||||
status: DeviceStatusResponse | null;
|
||||
hudReady: boolean;
|
||||
/** What the glasses runtime has delivered, by type only (empty when the device cannot say). */
|
||||
glassesInput: string;
|
||||
/** Last settled turn, complete and untruncated, for the phone. */
|
||||
lastTurn: TurnResult | null;
|
||||
log: DiagEntry[];
|
||||
@@ -128,6 +130,9 @@ export class Controller {
|
||||
this.note('hud', this.hudReady ? 'HUD page created' : 'HUD page was refused by the host');
|
||||
this.unsubscribers.push(
|
||||
this.device.onEvent((event) => this.onDeviceEvent(event)),
|
||||
// Refresh the phone's Diagnostics when the glasses deliver something, even if it changes
|
||||
// no state (an ignored or unrecognised event is exactly what needs to be visible).
|
||||
this.device.onInputActivity?.(() => this.emit()) ?? (() => undefined),
|
||||
this.device.onConnection((connected) => {
|
||||
this.note('glasses', connected ? 'connected' : 'disconnected');
|
||||
this.dispatch({ type: 'glasses_status', connected });
|
||||
@@ -181,6 +186,7 @@ export class Controller {
|
||||
pairingExpiresAt: this.stored?.pairingExpiresAt ?? '',
|
||||
status: this.status,
|
||||
hudReady: this.hudReady,
|
||||
glassesInput: this.device.inputSummary?.() ?? '',
|
||||
lastTurn: this.lastTurn,
|
||||
log: [...this.log],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user