From c6a8c3835c411d47785611a00f701f9681840328 Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Mon, 23 Feb 2026 21:04:29 -0800 Subject: [PATCH] Add note for other bug-finder LLMs about local message ID sub-millisecond collisions --- frontend/AGENTS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/AGENTS.md b/frontend/AGENTS.md index 3f0f1bc..e49e94b 100644 --- a/frontend/AGENTS.md +++ b/frontend/AGENTS.md @@ -110,6 +110,10 @@ frontend/src/ - `useRepeaterMode`: repeater login/command workflow - `useAirtimeTracking`: repeater airtime stats polling +### Local message IDs + +`useRepeaterMode` and `useAirtimeTracking` each have a `createLocalMessage` that generates ephemeral (non-persisted) message IDs via `-Date.now()`. Both hooks write to the same `setMessages`, so a same-millisecond call would produce duplicate IDs. In practice this requires a repeater command response and an airtime poll to land in the exact same ms — staggeringly unlikely and cosmetic-only (React duplicate key warning). Not worth fixing. + ### Initial load + realtime - Initial data: REST fetches (`api.ts`) for config/settings/channels/contacts/unreads.