Check that the Duo Chat workflow exists without loading its history

What does this MR do and why?

Before a prompt goes to an existing chat, the Duo Agentic Chat panel checks that the workflow still exists. That check asked for the whole duoMessages history and then ignored it, and rebuilding that history is the slow part of the getWorkflowLatestCheckpoint resolver. The check now leaves out duoMessages.

Design notes
  • The checkpoint query gets duoMessages @include(if: $withHistory). The variable defaults to true, so the other callers of the query don't change.
  • validateWorkflowExists in ee/app/assets/javascripts/ai/duo_agentic_chat/components/duo_agentic_chat_state_manager.vue passes withHistory: false.
  • The WORKFLOW_NOT_FOUND error comes from the workflows resolver, not from duoMessages, so error handling doesn't change.
  • No feature flag: the request is the same without one field, and nothing changes for the user.
  • Two integration specs now match only workflowId in the request variables, because Apollo also sends the new default variable.
  • This is the first of three MRs split from !260497. Merge order: this MR, then !265826 (closed), then !260497.

References

Screenshots or screen recordings

No UI change.

How to set up and validate locally

  1. Open any project on GDK (http://gdk.test:3000/...) and open an existing chat in the GitLab Duo panel.
  2. In the browser dev tools Network tab, filter by graphql.
  3. Send a message. Expect: the getWorkflowLatestCheckpoint request sent before the message has withHistory: false, and its response has no duoMessages.
Edge cases
  • Delete the chat in another tab, then send a message in the first tab. Expect: the panel shows "This chat was deleted.", as on master.

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 Eduardo Bonet

Merge request reports

Loading
Loading