Context
Split out from #469 (finding 9). Today an "unread" state for chats exists client-side only: AppSidebar keeps an in-memory hasUnreadUpdate flag (manuallyUnreadChatIds / unreadChatIds) and renders a blue dot. There is no DB column, no API, no fetch — so the state is lost on reload and never syncs across sessions/devices.
#469 only adds an immediate cosmetic fix (the chat menu item now toggles between "Als ungelesen markieren" and "Als gelesen markieren"). This issue tracks the real feature.
Two concepts, one indicator
The current dot conflates two distinct ideas that a persisted model should keep separate:
- Manual unread — a user-asserted state ("mark as unread").
- New activity / background update — a system-detected change while the chat wasn't active.
Scope
- DB: add read-tracking to the chat model (e.g.
last_read_at, or an explicit unread flag).
- API: endpoints to mark read/unread and to fetch unread state; include unread in chat summary/library contracts.
- Frontend: drive the sidebar indicator and the menu toggle from server state instead of in-memory refs; survive reload and sync across sessions.
- Decide whether manual-unread and new-activity are tracked separately or collapsed.
Notes
- Likely warrants an ADR (new persisted domain concept; the manual-vs-automatic distinction should be reflected in
CONTEXT.md).
- Indicator visibility bug to keep in mind: the dot is currently suppressed on row hover / open menu (
group-hover/chat-row:hidden).
Context
Split out from #469 (finding 9). Today an "unread" state for chats exists client-side only:
AppSidebarkeeps an in-memoryhasUnreadUpdateflag (manuallyUnreadChatIds/unreadChatIds) and renders a blue dot. There is no DB column, no API, no fetch — so the state is lost on reload and never syncs across sessions/devices.#469only adds an immediate cosmetic fix (the chat menu item now toggles between "Als ungelesen markieren" and "Als gelesen markieren"). This issue tracks the real feature.Two concepts, one indicator
The current dot conflates two distinct ideas that a persisted model should keep separate:
Scope
last_read_at, or an explicit unread flag).Notes
CONTEXT.md).group-hover/chat-row:hidden).