Silence double error toasts in the apps/GitHub/misc client sites (#2669)#2721
Merged
Conversation
This was referenced Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sweeps the Apps / GitHub / misc pages batch of #2669: 28 call sites where a caller shows its own
toast.errorin a rejection handler and the API call routes through the auto-toastingrequest()helper, so the user sees two stacked toasts. Each now passes{ silent: true }per the "Custom catch ⇒silent: true" rule in CLAUDE.md, leaving exactly one toast layer.Threaded a backward-compatible trailing
optionsparam into the wrappers that lacked one:apiGit.js(deleteBranch,mergeBranch,checkoutRemoteBranch,cleanupMergedBranches),apiGithub.js(all repo + secret calls),apiReferenceRepos.js(all five),apiApps.js(buildApp), andapiAsk.js(promoteAskTurn,deleteAskConversation).apiAuthors.jsandnavigateBrowseralready had one.Record correction: the issue's original "Remaining" list was stale — PR #2682 was a broad sweep that already covered writers-room, universe/universeBuilder, digital-twin, media pages, and the shared hooks. The
## Remainingsection below reflects a fresh wrapper-aware scan, not those stale bullets.Sites swept (28): Tribe 6, ReferenceReposPanel 5, GitHub 5, GitTab 4, Authors 4, Ask 2, AppDetailView 1, Browser 1.
Deliberately not touched (verified single-layer, not misses)
A naive
.catch+toast.errorgrep produces false positives here; these were classified and correctly left alone:GitTab.handleSync/handlePushAll— use.catch(() => null)with no toast in the catch. Theirtoast.errorfires on a successful response's per-branch error payload, not on a thrown error. Addingsilentwould suppress the only toast a transport failure gets.fixAppViteHosts(AppDetailView) — wrapper is already silent-by-default (hardcodedsilent: true).Ask.streamAskTurn— rawfetch, never routes throughrequest()(same class as the previously-notedStagePromptModelPicker.jsx:78).getGitHubSecrets().catch(() => ({})),getTribeMemoryLinks(...).catch(() => ({ links: [] })),getTribeTouchpoints(...), the legacy-contact import — single default layer is correct per the rule.getTribePeople({ silent: true })— already passessilent.Also swept explicitly for the bug class an inline-
.catchgrep misses:useLockToggle/useAsyncActionconsumers (none in this batch's scope) and.then(onOk, onErr)rejection handlers — which caughtAsk.jsx:439(deleteAskConversation) and threeReferenceReposPanelsites that a.catchgrep would have skipped.Test plan
cd client && npm test— 400 files / 4319 tests passing.npx eslinton all 14 changed files — clean.GitTab.test.jsx) still pass: everyoptionsparam is trailing and defaulted, so existing call sites are unaffected.Remaining
Per a fresh wrapper-aware scan (classify each
api*wrapper as silent-by-default vs toasting, then match custom-catch callers that omitsilent). Counts are raw grep hits for areas outside this batch and are not individually wrapper-verified:CreativeDirector.jsx:180,PlanTab.jsx(2 —:91,:103/:113),OverviewTab.jsx:148.Loras.jsx(6),MediaModels.jsx(4),MediaJobsQueue,ImageGen,ImageClean,MusicVideo.CatalogCastPanel,GmailMboxImportPanel,LocalLlmTab,MessageDetail,GenomeTab,PipelineManuscriptEditor.components/pipeline/ManuscriptCommentCard.jsx:247,251—generatePipelineManuscriptFixstill needs anoptionsparam.Already shipped and verified clean — do not re-sweep: settings tabs + JIRA (#2670), messages/calendar/sharing, pipeline stages/canvas (#2714), and writers-room / universe / universeBuilder / digital-twin / media pages / shared hooks (#2682).
Refs #2669