Skip to content

fix(registry): surface an error toast when starting or cancelling a QA run fails - #5025

Open
pedrofrxncx wants to merge 1 commit into
mainfrom
fix/monitor-dashboard-silent-run-errors-w4
Open

fix(registry): surface an error toast when starting or cancelling a QA run fails#5025
pedrofrxncx wants to merge 1 commit into
mainfrom
fix/monitor-dashboard-silent-run-errors-w4

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Bug found reading apps/mesh/src/web/views/registry/monitor-dashboard.tsx in the registry-ui-polish focus area ("missing error handling").

startMonitor() and onCancel() call runStartMutation.mutateAsync(...) / runCancelMutation.mutateAsync(...) directly with no try/catch, and neither useMonitorRunStart/useMonitorRunCancel (apps/mesh/src/web/hooks/registry/use-monitor.ts) define an onError. If REGISTRY_MONITOR_RUN_START/REGISTRY_MONITOR_RUN_CANCEL rejects (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 its mutateAsync in try/catch + toast.error — this file was the one outlier missing it.

Fix: wrap both calls in try/catch and show toast.error with 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.tsx startMonitor/onCancel (lines ~363-403).

Verification run locally: bun run fmt (clean) and cd 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 mocking useMonitorRunStart/useMonitorRunCancel with mock.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 sonner error 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.

Review in cubic

…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.
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