Skip to content

Silence double-toast custom-catch sites in MeatSpace health forms (#2669)#2755

Merged
atomantic merged 2 commits into
mainfrom
claim/issue-2669
Jul 17, 2026
Merged

Silence double-toast custom-catch sites in MeatSpace health forms (#2669)#2755
atomantic merged 2 commits into
mainfrom
claim/issue-2669

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Partial ship of #2669 — the MeatSpace health batch. Continues the non-settings custom-catch double-toast sweep established in PR #2567 / #2682 / #2721 / #2723 / #2730 / #2743.

Swept 5 genuine double-error-toast sites across 3 tabs, threading a backward-compatible trailing options param into 5 apiMeatspace.js wrappers so each caller can suppress the API helper's default toast:

  • GenomeTab.jsxupdateGenomeMarkerNotes (inline .catch toast "Failed to save notes")
  • NicotineTab.jsxaddCustomNicotineProduct, updateCustomNicotineProduct (if (!result) toast.error(...) after a swallowing catch)
  • AlcoholTab.jsxaddCustomDrink, updateCustomDrink (same if (!result) pattern)

Wrappers gaining a trailing options = {}: updateGenomeMarkerNotes, addCustomDrink, updateCustomDrink, addCustomNicotineProduct, updateCustomNicotineProduct. Added apiMeatspace.test.js pinning that each forwards silent and preserves its method/body/indexed-path (arg-exact), plus a back-compat case.

Deliberately left alone (single helper layer is correct):

  • Swallowing catches with no custom error toast (removeCustomDrink, removeCustomNicotineProduct, removeAlcoholDrink, updateEpigeneticIntervention, genome upload/scan/search/save, ClinVar sync/scan, epigenetic add/log).
  • EpigeneticTracker.jsx and PostDrillConfig.jsx — no genuine double-error-toast sites.
  • The entire Catalog area (Catalog.jsx, CatalogIngest.jsx, CatalogIngredient.jsx, CatalogCastPanel.jsx) was verified already fully swept — every request-routed custom-catch already passes silent: true. The issue's "Catalog / CatalogCastPanel" remaining bullet is stale.

Out of scope (a different bug class, not double-error-toast): a few handlers toast success unconditionally after a swallowing catch (GenomeTab handleDeleteMarker/handleDeleteGenome, EpigeneticTracker handleDelete) — they'd stack a success toast on the helper's error toast on failure. Noted for a follow-up rather than widened into here.

Test plan

  • cd client && npx vitest run src/services/apiMeatspace.test.js — 6 passed (new arg-exact test).
  • cd client && npx vitest run src/components/meatspace — 19 files / 260 tests passed.

Remaining

This is a partial ship (Refs, not Closes — issue stays open). Still unshipped per the issue's (re-verify-first) list:

  • Misc singles — GmailMboxImportPanel, LocalLlmTab, MessageDetail, PipelineManuscriptEditor
  • ManuscriptCommentCard.jsx:247,251generatePipelineManuscriptFix still needs an options param
  • Catalog is now confirmed done (no code change needed); the remaining-list bullet for it can be dropped.

Refs #2669

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant