You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Notifications — "Mark all as read" button stays enabled while personal-stream mutation is in-flight #2019
Notifications panel — "Mark all as read" button disabled state logic
Steps to reproduce
Open the notifications bell / panel with at least one unread personal notification (review request, task assignment, etc.).
Click Mark all as read rapidly twice in quick succession.
Expected
The button is disabled for the entire duration of both mutations it fires — org stream (markAllRead) and personal stream (markAllNotificationsRead) — preventing double submission.
Actual
The button's disabled prop is only bound to markAllRead.isPending (the org-notification mutation). The personal-stream mutation (markAllMyRead) runs concurrently and has no guard. If the org mutation resolves first, the button becomes re-enabled while markAllMyRead is still in-flight, allowing a second markAllNotificationsRead call to be submitted.
Both useMarkAllNotificationsRead and useMarkAllMyNotificationsRead come from separate useConvexMutation instances, so their isPending states are independent.
The personal markAllNotificationsRead mutation (convex/collab/notifications.ts:120) is idempotent (it only patches read: false rows), so the duplicate call produces no data corruption — the concern is unnecessary network traffic and the Convex write quota cost of a redundant mutation execution.
Activity
fix: Notifications — "Mark all as read" stays enabled while personal-…