Skip to content

Silence double error toasts in the Creative Director area (#2669)#2743

Merged
atomantic merged 1 commit into
mainfrom
claim/issue-2669
Jul 17, 2026
Merged

Silence double error toasts in the Creative Director area (#2669)#2743
atomantic merged 1 commit into
mainfrom
claim/issue-2669

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Sweeps the Creative Director feature area for the double-toast bug tracked in #2669: custom-catch callers that show their own toast.error while the auto-toasting request() helper also fires its default toast, stacking two error toasts on failure.

Ten call sites across four files now pass { silent: true } so only the caller's own toast fires:

  • pages/CreativeDirector.jsx — load projects, create project, create directive project, start, pause, delete, smoke-test.
  • pages/CreativeDirectorDetail.jsxhandleAction start/pause/resume.
  • components/creative-director/OverviewTab.jsxhandleAudioToggle (audio-disable PATCH).
  • components/creative-director/PlanTab.jsx — save directive, re-plan.

Threaded a backward-compatible trailing options = {} arg (spread into the request options) into the nine apiCreativeDirector.js wrappers that lacked one: listCreativeDirectorProjects, createCreativeDirectorProject, deleteCreativeDirectorProject, start/pause/resumeCreativeDirectorProject, createSmokeTestCreativeDirectorProject, setCreativeDirectorDirective, replanCreativeDirectorProject. The wrappers that already accepted options (updateCreativeDirectorProject, updateCreativeDirectorPlanStep, applyCreativeDirectorAutoCast) just gained the silent pass at the call site.

Deliberately left unchanged (per the sweep rule):

  • CreativeDirectorModelsDrawer.jsx — already fully swept (all three sites already pass silent).
  • OverviewTab.jsx auto-cast (applyCreativeDirectorAutoCast) and PlanTab.jsx step action (updateCreativeDirectorPlanStep) — already pass silent.
  • CreativeDirectorDetail.jsx getCreativeDirectorProject(...).catch(() => null) / getCosAgents().catch(() => []) — toast-less swallowing catches keep the single default helper layer.
  • CreativeDirectorDetail.jsx music-bed toasts (lines 92/96) — sourced from useMediaJobProgress, not a request() catch, so not a double-toast.

Test plan

  • cd client && npm install && npx vitest run — full client suite green (407 files / 4432 tests, 0 failures).
  • Updated the one arg-exact assertion affected: PlanTab.test.jsx now expects replanCreativeDirectorProject('cd-1', { silent: true }).

Refs #2669

Remaining

Un-swept batches still tracked by #2669 (counts are raw and unverified — re-scan out to request() before trusting them; prior batches found the advertised lists stale in both directions):

  • CatalogCatalogCastPanel
  • MeatspaceGenomeTab and others
  • Misc singlesGmailMboxImportPanel, LocalLlmTab, MessageDetail, PipelineManuscriptEditor
  • components/pipeline/ManuscriptCommentCard.jsx:247,251generatePipelineManuscriptFix still needs an options param

Already shipped — do not re-sweep: settings + JIRA (#2670), messages/calendar/sharing, pipeline stages/canvas (#2714), writers-room/universe/universeBuilder/media/hooks (#2682), Apps/GitHub/misc (#2721), Loras/media (#2723), digital-twin (#2730), and now Creative Director (this PR).

Custom-catch callers across the Creative Director index/detail pages and the
Overview/Plan tabs showed their own toast.error while the toasting request()
helper also fired its default toast, stacking two toasts on failure. Pass
{ silent: true } at each such site and thread a backward-compatible trailing
options arg into the nine apiCreativeDirector.js wrappers that lacked one.
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