Alert the user when the agent plan query fails

What does this MR do and why?

When the agent plan query moved from work_plan.vue up into work_item_ai_widget.vue (!254260 (merged)), its Apollo error handler only reported to Sentry, so a failed readiness score or plan fetch left the widget silently empty with nothing to tell the user why. This was flagged as a non-blocking follow-up in that review.

This MR shows an alert from the query's error handler, in the same way work_plan.vue surfaces its update errors with createAlert, and keeps the Sentry report. One string is added to locale/gitlab.pot. The spec covers the failure path and fails without the change.

References

Differences

Before: If the workItemAgentPlan query fails, the AI widget renders with no plan and no message.

After: An alert reads "Something went wrong when fetching the agent plan. Please refresh this page."

How to set up and validate locally

  1. Open a work item that shows the AI widget.
  2. Block the workItemAgentPlan GraphQL request in the browser's Network tab and reload.
  3. On master the widget is empty; with this MR the alert appears.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jeston Singh

Merge request reports

Loading
Loading