Skip to content

mark unread messages in Chat, count them in the sidebar and notify on the desktop - #198

Merged
hkonsti merged 5 commits into
mainfrom
hkonsti/unread-message-indicator
Nov 5, 2026
Merged

hkonsti merged 5 commits into
mainfrom
hkonsti/unread-message-indicator

Conversation

@hkonsti

@hkonsti hkonsti commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

A conversation now keeps how far its member has read it: AgentThread.readSeq, the seq of the last entry they have seen, moved on by the Chat page while it is in view and by what the person says, never back. Nothing tracked that before, so there was no way to tell what an agent said while the person was elsewhere.

The persona list says which conversations have something unread, and a new POST chat/personas/:personaId/read marks one read to its end. In the web app a provider around the human side polls the list from every page and on focus: the sidebar's Chat counts the conversations with something new, as does the window's title, and each such row in Chat's list is marked, the open one never. Turned on under Account, a notification tells of an answer that comes while the person is elsewhere and opens the conversation when clicked: through the browser's Notification API, or through the desktop app, whose preload gains notify, the page to open and a badge count, and whose main process shows the system's notification, focuses the window and sets the Dock badge.

The migration backfills every thread's cursor to its last entry, so nothing already there turns unread on deploy. A background tab reads nothing: marking happens only while the page is visible, so what comes then is told of like anywhere else. Verified against the local stack: the badge, the row mark, the title and the read marking behave; tests cover the store, the route, the provider, the notifications helper, the list marks and the sidebar badge.


Open workspace in Conductor

…and tell of it on the desktop

A conversation keeps how far its member has read it (AgentThread.readSeq), moved on by the
Chat page while it is in view and by what the person says. The persona list says which
conversations have something unread; the sidebar's Chat counts them, as does the window's
title and the desktop app's badge; and, turned on under Account, a notification tells of
an answer that comes while the person is elsewhere, opening the conversation when clicked.
…n looks at it, and tell of an answer once across tabs
…gain, tell of an answer the page has not shown, and open a notification's page where nothing listens
…n's last answer from its newest entry, keep a notification's path on the app's origin, and send no read the api refused again
…e-indicator

# Conflicts:
#	packages/web/src/pages/account-page.tsx
@hkonsti
hkonsti force-pushed the hkonsti/unread-message-indicator branch from 38100c0 to 30bd828 Compare November 5, 2026 22:52
@hkonsti
hkonsti merged commit 9f41432 into main Nov 5, 2026
4 checks passed
@hkonsti
hkonsti deleted the hkonsti/unread-message-indicator branch November 5, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant