Loading
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 totrue, so the other callers of the query don't change. validateWorkflowExistsinee/app/assets/javascripts/ai/duo_agentic_chat/components/duo_agentic_chat_state_manager.vuepasseswithHistory: false.- The
WORKFLOW_NOT_FOUNDerror comes from the workflows resolver, not fromduoMessages, 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
workflowIdin 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
- Issue: #631642
- Parent issue: #631606
- Next in the stack: !265826 (closed), then !260497
Screenshots or screen recordings
No UI change.
How to set up and validate locally
- Open any project on GDK (http://gdk.test:3000/...) and open an existing chat in the GitLab Duo panel.
- In the browser dev tools Network tab, filter by
graphql. - Send a message.
Expect: the
getWorkflowLatestCheckpointrequest sent before the message haswithHistory: false, and its response has noduoMessages.
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