v3: various improvements and fixes to real-time updates
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 40s

This commit is contained in:
khannurien
2026-06-29 07:52:56 +00:00
parent f162d23ce3
commit aab5b5bfd5
12 changed files with 227 additions and 38 deletions

View File

@@ -58,6 +58,8 @@ export interface WSContextValue {
lastUserEvent: UserEvent | null;
unreadNotificationCount: number;
lastNotification: Notification | null;
/** Increments on each WS reconnect so pages can backfill missed events. */
connectionEpoch: number;
castVote: (dumpId: string) => void;
removeVote: (dumpId: string) => void;
castCommentLike: (commentId: string) => void;
@@ -85,6 +87,7 @@ export const WSContext = createContext<WSContextValue>({
lastUserEvent: null,
unreadNotificationCount: 0,
lastNotification: null,
connectionEpoch: 0,
castVote: () => {},
removeVote: () => {},
castCommentLike: () => {},