diff --git a/app/AGENTS.md b/app/AGENTS.md index 0a9913d..dc9fd34 100644 --- a/app/AGENTS.md +++ b/app/AGENTS.md @@ -63,7 +63,8 @@ app/ ### Connection lifecycle - `RadioManager.start_connection_monitor()` checks health every 5s. -- On reconnect, monitor runs `post_connect_setup()` before broadcasting healthy state. +- Monitor reconnect path runs `post_connect_setup()` before broadcasting healthy state. +- Manual reconnect/reboot endpoints call `reconnect()` then `post_connect_setup()`. - Setup includes handler registration, key export, time sync, contact/channel sync, polling/advert tasks. ## Important Behaviors diff --git a/app/routers/read_state.py b/app/routers/read_state.py index 1f3ee32..e0b3066 100644 --- a/app/routers/read_state.py +++ b/app/routers/read_state.py @@ -35,7 +35,7 @@ async def mark_all_read() -> dict: """Mark all contacts and channels as read. Updates last_read_at to current timestamp for all contacts and channels - in a single database transaction. + using two repository updates (same timestamp value across both tables). """ now = int(time.time()) diff --git a/frontend/AGENTS.md b/frontend/AGENTS.md index 88b6f06..1504944 100644 --- a/frontend/AGENTS.md +++ b/frontend/AGENTS.md @@ -97,7 +97,7 @@ Specialized logic is delegated to hooks: ### Message behavior -- Outgoing sends are optimistic in UI and persisted server-side. +- Outgoing sends are added to UI after the send API returns (not pre-send optimistic insertion), then persisted server-side. - Backend also emits WS `message` for outgoing sends so other clients stay in sync. - ACK/repeat updates arrive as `message_acked` events. - Outgoing channel messages show a 30-second resend control; resend calls `POST /api/messages/channel/{message_id}/resend`.