SurfSense/surfsense_web/atoms
voidborne-d bf2b4ebeb0 fix(web): suppress global error toast on mutations that own their toast UX
Closes #1371. Retarget of #1385 onto dev per maintainer request.

surfsense_web/lib/query-client/client.ts configures a global
MutationCache.onError that shows an error toast for every failed
mutation unless meta.suppressGlobalErrorToast is set. The opt-out
hook existed in the consumer but had zero producers — every mutation
atom that already had its own onError: toast.error(...) was
double-toasting on failure.

Add meta: { suppressGlobalErrorToast: true } to the 30 mutations
across 9 atom files that own their own error toast:

- atoms/prompts/prompts-mutation.atoms.ts (4)
- atoms/invites/invites-mutation.atoms.ts (4)
- atoms/chat-comments/comments-mutation.atoms.ts (4)
- atoms/new-llm-config/new-llm-config-mutation.atoms.ts (4)
- atoms/members/members-mutation.atoms.ts (3)
- atoms/roles/roles-mutation.atoms.ts (3)
- atoms/image-gen-config/image-gen-config-mutation.atoms.ts (3)
- atoms/vision-llm-config/vision-llm-config-mutation.atoms.ts (3)
- atoms/public-chat-snapshots/public-chat-snapshots-mutation.atoms.ts (2)

Atoms intentionally left alone (no local onError, rely on global):
auth, user, search-spaces, logs, documents, connectors.

Local validation (against dev): pnpm biome check on the 9 touched
files is clean; tsc --noEmit shows no new errors in the touched files
(pre-existing errors elsewhere unrelated).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 23:43:30 +08:00
..
agent feat: updated agent harness 2026-04-28 09:22:19 -07:00
agent-tools chore: ran linting 2026-03-11 12:30:20 +05:30
auth Refactor register page 2025-11-17 08:10:12 +02:00
chat chore: fix linting 2026-05-12 04:00:04 +05:30
chat-comments fix(web): suppress global error toast on mutations that own their toast UX 2026-05-15 23:43:30 +08:00
citation refactor: citation viewer 2026-04-28 23:25:26 -07:00
connector-dialog chore: ran linting 2026-02-06 05:35:15 +05:30
connectors refactor: update connector mutation atoms to handle optional searchSpaceId and improve query invalidation logic 2026-02-06 04:54:29 +05:30
documents feat(filesystem): introduce support for local openable text file extensions and enhance folder expansion persistence in the UI 2026-04-28 01:12:15 +05:30
editor feat(filesystem): enhance local file handling in editor and IPC integration 2026-04-23 17:23:38 +05:30
folder-sync feat: improve Obsidian connector visibility and desktop sync flow 2026-04-14 19:07:14 +09:30
image-gen-config fix(web): suppress global error toast on mutations that own their toast UX 2026-05-15 23:43:30 +08:00
inbox feat: implement batch unread counts for notifications to reduce API calls and improve performance 2026-03-10 01:26:37 -07:00
invites fix(web): suppress global error toast on mutations that own their toast UX 2026-05-15 23:43:30 +08:00
layout refactor: citation viewer 2026-04-28 23:25:26 -07:00
logs fix(web): invalidate all log cache keys on log mutations 2026-05-13 20:59:08 +08:00
members fix(web): suppress global error toast on mutations that own their toast UX 2026-05-15 23:43:30 +08:00
new-llm-config fix(web): suppress global error toast on mutations that own their toast UX 2026-05-15 23:43:30 +08:00
permissions feat: add cache keys and permissions query atom for RBAC 2025-12-16 09:07:33 +00:00
prompts fix(web): suppress global error toast on mutations that own their toast UX 2026-05-15 23:43:30 +08:00
public-chat-snapshots fix(web): suppress global error toast on mutations that own their toast UX 2026-05-15 23:43:30 +08:00
roles fix(web): suppress global error toast on mutations that own their toast UX 2026-05-15 23:43:30 +08:00
search-spaces feat: migrated to surfsense deep agent 2025-12-23 01:16:25 -08:00
settings Remove dead MorePagesDialog component and morePagesDialogAtom 2026-04-09 14:13:31 -07:00
tabs chore: ran linting 2026-03-30 01:50:41 +05:30
ui fix: remove message from loading UI 2026-01-27 15:28:30 +05:30
user feat: unified credits and its cost calculations 2026-05-02 14:34:23 -07:00
vision-llm-config fix(web): suppress global error toast on mutations that own their toast UX 2026-05-15 23:43:30 +08:00