Skip to content

feat(client): add unread indicator for completed sessions#101

Open
Master-cai wants to merge 1 commit intogbasin:masterfrom
Master-cai:feat/unread-session-indicator
Open

feat(client): add unread indicator for completed sessions#101
Master-cai wants to merge 1 commit intogbasin:masterfrom
Master-cai:feat/unread-session-indicator

Conversation

@Master-cai
Copy link

Summary

This PR adds an unread indicator for sessions that complete work while not currently selected.

Changes

  • Add unreadSessionIds state to session store.
  • Add store actions:
    • markSessionUnread(sessionId)
    • markSessionRead(sessionId)
  • Mark a session unread when status transitions from working -> waiting and the session is not selected.
  • Clear unread state when the user selects that session.
  • Clean up stale unread session ids when sessions are removed.
  • Persist unread ids in store persistence (serialize/deserialize Set correctly).
  • Add UI unread dot indicator in session row.
  • Add unread indicator styles (with reduced-motion fallback).
  • Add tests for unread mark/read/cleanup behavior in sessionState tests.

Why

When multiple agents run concurrently, it’s easy to miss that a background session has completed.
The unread indicator makes finished work discoverable without forcing a session switch.

Scope

  • Client-only change (SessionList, client store, styles, tests)
  • No server API contract changes

Verification

  • bun run lint passed
  • bun run typecheck passed
  • bun run test still has existing unrelated baseline failures in this repository (server-side test isolation/logging cleanup issues), not introduced
    by this PR.

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