Repository navigation
fix: Notifications — "Mark all as read" stays enabled while personal-stream mutation is in-flight (#2019) - #2229
Conversation
Desk review — #2019Verdict: NOT READY — CHANGES REQUIRED (one blocking item — a missing regression test. The code change itself is correct and should be kept exactly as written.) The fix is correct
Blocking: no regression testThis PR adds no test. By the repo's own bar that's a gap:
Required change CI is fully green; |
Desk Review — READY TO MERGE ✅Reviewed the fix for #2019 ("Mark all as read" stays enabled while the personal-stream mutation is in-flight) via a two-round review (5 parallel breadth subagents across correctness / robustness / elegance / tests / boundaries, then independent confirmation). The fix ( Completeness: grep confirms this is the only UI surface with a "Mark all as read" button firing both streams (NotificationBell just wraps this panel). No other surface carries the same bug. No new boundary/security surface. Tests: New Test run: CI: All required checks green (Unit, UI, Type check, Lint, Format, Knip, Build platform, all 16 Playwright platform shards, etc.); only fork-PR/container jobs skipped. Minor, non-blocking: the suite focuses on the disabled-gating (no test asserts the click fires both mutations, or that the button is hidden when Verdict: READY TO MERGE. |
Closes #2019
Problem
The "Mark all as read" button in the notifications panel fires two independent mutations — the org stream (
markAllRead) and the personal stream (markAllMyRead) — but itsdisabledprop was only bound tomarkAllRead.isPending. Since the twouseConvexMutationinstances have independentisPendingstates, if the org mutation resolves first the button re-enables while the personal-stream mutation is still in-flight, allowing a redundantmarkAllNotificationsReadsubmission.Fix
Bind the button
disabledstate to both pending flags so it stays disabled for the full duration of both mutations:Verification
tsc --noEmit(platform) — passesoxlint --type-awareon the changed file — 0 warnings, 0 errors