Unseen badge shows incorrect number #122

Closed
opened 2026-04-08 00:15:52 +00:00 by talksik · 0 comments
talksik commented 2026-04-08 00:15:52 +00:00 (Migrated from github.com)

It shows a number based on open and closed streams. The current method is having all rows send an unseen count to a zustand store. However, this is not reliable.

Approaches:

  1. Calculate this in a hook that does not rely on rendering a list of streams. Only check for open streams that I am involved in.
  2. Calculate this in the server-side and poll or invalidate react query cache when relevant (impossible given this depends on other clients' actions as well). A websocket server could manage this state for every client and push updates to clients when relevant, although that becomes a mess.
It shows a number based on open and closed streams. The current method is having all rows send an unseen count to a zustand store. However, this is not reliable. Approaches: 1. Calculate this in a hook that does not rely on rendering a list of streams. Only check for open streams that I am involved in. 2. Calculate this in the server-side and poll or invalidate react query cache when relevant (impossible given this depends on other clients' actions as well). A websocket server could manage this state for every client and push updates to clients when relevant, although that becomes a mess.
Sign in to join this conversation.