Add stats collection and first-run on-glasses onboarding app

This commit is contained in:
James Babcock committed 2026-10-10 17:33:32 -07:00
1 parent 84baee9c76
commit 406cefe0c5
73 files changed
+3906 -98

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
declare const com: any;
/**
* Connection-reliability event counts since the last call, from the shared
* Kotlin session core (ConnectionCounters.kt), which keeps them process-wide.
*/
export function drainConnectionCounters(): Record<string, number> {
const counts: Record<string, number> = {};
const parsed = JSON.parse(String(com.faceclaw.app.ConnectionCounters.drain())) as Record<string, unknown>;
for (const [name, count] of Object.entries(parsed)) {
if (typeof count === "number" && count > 0) counts[name] = count;
}
return counts;
}