Add the debug packet recorder behind the developer-tools toggle.
Checks / checks (push) Successful in 2m14s
Trigger cinny-mobile / dispatch (push) Successful in 1s

This commit is contained in:
2026-11-01 09:01:38 +11:00
parent 9591d8d01b
commit 230ca4fcf0
6 changed files with 150 additions and 4 deletions
+25
View File
@@ -0,0 +1,25 @@
export interface DebugPacket {
id: number;
ts: number;
phase: 'start' | 'end';
method: string;
url: string;
path: string;
status?: number;
ms?: number;
txnId?: string;
eventId?: string;
req?: string;
res?: string;
error?: string;
}
let nextId = 0;
export function recordPacket(packet: Omit<DebugPacket, 'id'>) {
const full: DebugPacket = { id: nextId, ...packet };
nextId += 1;
// Web and mobile builds have no electron bridge, so nothing is recorded there
window.electron?.debug?.send(full);
}