feat(settings): add toggle to disable in-app toast notifications#3088
Conversation
Toasts always showed unconditionally; users had no way to turn off in-app notifications the way they can for push/dock notifications. Gate is centralized in the shared toast wrapper's emit() so every call site is covered without per-feature changes, and error toasts are exempt so users never lose failure feedback. Generated-By: PostHog Code Task-Id: 6ea6d7f0-144f-4c02-9b23-f975bcd246f4
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
|
Reviews (1): Last reviewed commit: "feat(settings): add toggle to disable in..." | Re-trigger Greptile |
pauldambra
left a comment
There was a problem hiding this comment.
QA Swarm review complete. See inline comments.
|
Note 🤖 Automated comment by QA Swarm — not written by a human Multi-perspective review: qa-team (specialists + generalists), paul-reviewer, xp-reviewer, security-audit Verdict: 💬 APPROVE WITH NITSSmall, well-scoped change. The centralized gate in Key findings
Convergence
Reviewer summaries
Automated by QA Swarm — not a human review |
There was a problem hiding this comment.
The greptile bot raised a valid, unresolved concern on the current head: when toasts are suppressed and no caller-supplied id exists, emit returns "". A caller doing const id = toast.loading("Saving"); toast.dismiss(id) then passes "" to dismiss, which doesn't hit the undefined guard and forwards quillToast.dismiss("") — potentially dismissing unrelated toasts or behaving unexpectedly. The diff doesn't address this, and bot comments with valid concerns that are ignored require escalation.
…when suppressed Suppressed toasts without a caller-supplied id previously returned "" from emit(), an implicit sentinel that dismiss() would forward to quill. Return undefined so the contract matches dismiss()'s existing undefined guard.
pauldambra
left a comment
There was a problem hiding this comment.
QA Swarm round 2 review complete (follow-up fix commit). See inline comment.
|
Note 🤖 Automated comment by QA Swarm — not written by a human Round 2 — reviewing follow-up commit b039f86 (fixes the round-1 fabricated-id finding) Verdict: ✅ APPROVEAll six review passes converged: Key findings
Nothing blocking. Ready from qa-swarm's side. Automated by QA Swarm — not a human review |
There was a problem hiding this comment.
Clean feature addition with tests. The original empty-string ID bug (flagged by bots on an older commit) was fixed — suppressed emit() now returns undefined or the caller-supplied stable id, and connectivityToast.ts was updated to match. All inline comments are resolved. The soft layering concern (primitives importing a feature store) is acknowledged and non-blocking given the lazy getState() call.
Summary
toastNotificationssetting (default on) alongside the existing push/dock notification togglesemit()— a single choke point everytoast.*call in the app goes through, so no per-feature changes were neededTest plan
pnpm --filter @posthog/ui typecheckpnpm --filter @posthog/ui test(28/28 passing, including new parameterized suppression cases)biome checkon changed filesCreated with PostHog Code