fix(registry): surface an error toast when starting or cancelling a QA run fails - #5025
Open
pedrofrxncx wants to merge 1 commit into
Open
fix(registry): surface an error toast when starting or cancelling a QA run fails#5025pedrofrxncx wants to merge 1 commit into
pedrofrxncx wants to merge 1 commit into
Conversation
…A run fails Both mutations were fired with await mutateAsync(...) and no try/catch, so a rejected REGISTRY_MONITOR_RUN_START/CANCEL call (network error, backend validation) left the button just resetting to idle with zero feedback - every sibling mutation in this same directory (registry-items-page.tsx, monitor-connections-panel.tsx, registry-settings-page.tsx) already wraps its mutateAsync call in try/catch + toast.error.
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.
Bug found reading
apps/mesh/src/web/views/registry/monitor-dashboard.tsxin the registry-ui-polish focus area ("missing error handling").startMonitor()andonCancel()callrunStartMutation.mutateAsync(...)/runCancelMutation.mutateAsync(...)directly with no try/catch, and neitheruseMonitorRunStart/useMonitorRunCancel(apps/mesh/src/web/hooks/registry/use-monitor.ts) define anonError. IfREGISTRY_MONITOR_RUN_START/REGISTRY_MONITOR_RUN_CANCELrejects (network error, a running-run conflict, any backend validation), the promise rejection is swallowed silently — the "Start QA run"/"Cancel" button just resets to idle with zero user feedback, so a user has no idea their click did nothing. Every sibling mutation call in the same directory (registry-items-page.tsx,monitor-connections-panel.tsx,registry-settings-page.tsx) already wraps itsmutateAsyncin try/catch +toast.error— this file was the one outlier missing it.Fix: wrap both calls in try/catch and show
toast.errorwith the thrown message, matching the existing pattern in this directory.Reviewer command to see the fixed paths: read
apps/mesh/src/web/views/registry/monitor-dashboard.tsxstartMonitor/onCancel(lines ~363-403).Verification run locally:
bun run fmt(clean) andcd apps/mesh && bunx tsc --noEmit(no new errors — the only tsc errors on this branch are in an unrelated pre-existing untracked file,apps/mesh/src/storage/types.test.ts, not touched by this diff). No new test added: the fix is UI-wiring around an existing mutation hook, and a real component test would require mockinguseMonitorRunStart/useMonitorRunCancelwithmock.module, which falls outside this repo's unit-test tier (no-mocks rule in TESTING.md) — full CI/e2e coverage is out of scope for this bounded fix.Summary by cubic
Show a
sonnererror toast when starting or cancelling a QA run fails in the Monitor Dashboard, replacing the previous silent failure with clear user feedback.Written for commit 62afaf3. Summary will update on new commits.