Messaging & Notifications
Traces has three separate communication surfaces, all driven from the analyst header / comm dock:
- Analyst-to-analyst messaging (the comm hub)
- The notifications bell (persisted notifications + ephemeral session alerts)
- Release notes (the changelog feed)
Analyst messaging (Comm Hub)
A direct-message panel between analysts. There is no floating launcher of its own — it's opened from the Messages item in the navigation, and its open state and unread badge live in shared messaging context.
The panel
A 400×560 panel that floats bottom-left. It has two views:
- Analyst list — every other analyst, each with an avatar (initials), an online dot, and presence text ("Active now", "Last seen Xm ago", or "Offline"). Analysts with unread messages are highlighted and show an unread count. The header shows the total unread count.
- Conversation — opened by clicking an analyst. The back chevron returns to the list. The header shows the other analyst's name and live online status. Messages are bubbles (yours right-aligned, theirs left), each with a relative timestamp.
Sending messages
A multi-line, auto-growing input. Enter sends; Shift+Enter inserts a newline. Sent messages appear optimistically (immediately) and are reconciled with the server response. Opening a conversation marks its messages read.
Presence and polling
| Concern | Interval |
|---|---|
| Heartbeat (marks you online) | every 30s |
| Unread-count poll | every 15s |
| Messages poll (open conversation) | every 15s |
| Presence poll (analyst list) | every 30s |
An analyst is considered online based on a recent heartbeat (presence threshold ~2 minutes). Polls are skipped while the browser tab is hidden and resume on focus; returning to the tab also triggers an immediate refresh of heartbeat, unread, presence, and the open conversation.
The browser tab title reflects unread messages — e.g. (3) Traces — and resets to Traces at zero.
The panel closes on an outside click (clicks on the trigger that toggles it are ignored).
Notifications bell
The bell icon in the header opens a dropdown that merges two feeds:
- Persisted notifications — server-stored notifications (
/api/notifications), polled every 60s. Unread notifications have a blue left bar and dot. - Session alerts — ephemeral, in-session alerts surfaced on the analyst header only (errors, warnings, successes, info). Each has a coloured left bar by type, an icon, a relative timestamp, an optional description and source tag, and a dismiss (×) button.
Badge and read behaviour
- The red badge on the bell shows the combined unread count (notifications + alerts), capped at "9+".
- Opening the dropdown with unread persisted notifications marks them all read (optimistically, then confirmed server-side). There's also a Mark all read button in the header.
- Session alerts can be dismissed individually or cleared all at once via Clear all.
When both feeds have content, alerts are grouped under an "Alerts" heading and notifications under a "Notifications" heading. An empty state shows when both are empty.
Release notes
A changelog panel mounted in the bottom comm dock (markdown-rendered).
- The launcher shows an unread dot when there's a release note newer than you last viewed. "Last
viewed" is tracked in
localStorageundertraces_changelog_viewed_at; opening the panel updates it and clears the dot. - The panel lists recent entries (title, optional version badge, relative time, markdown body).
- Admins see a Post release note form (title, optional version, markdown body) and a trash icon to delete entries.