Read one page of Duo Chat messages from the checkpoint
What does this MR do and why?
Adds a paged read of Duo Chat messages to getWorkflowLatestCheckpoint. Nothing calls it yet, so behavior doesn't change.
This is the first of three MRs split out of !266759 (merged), which lazy loads Duo Chat history behind duo_chat_lazy_load_messages. It uses the messages connection that !264039 (merged) added to DuoWorkflowEvent.
- The query takes
$paged(defaultfalse) and$before. Withpaged, it selects onemessages(last: 50, before: $before)page and itspageInfo { startCursor hasPreviousPage }instead ofduoMessages. The message fields move into aDuoMessageFieldsfragment that both selections use. ApolloUtils.fetchWorkflowEventsandloadActiveWorkflowWithRetryacceptpaged(andbefore), and only send the new variables whenpagedis set.readCheckpointMessagesreturns the messages from whichever selection was read, plus the cursor of the next older page (ornullonce the first message is reached).
Why four existing specs change
Apollo adds the query's declared default (paged: false) to the request variables. So message_tool_start_flow_spec.js and the reconnect spec in duo_agentic_chat_state_manager_spec.js now expect paged: false, and the two integration specs (conversation_lifecycle_spec.js and archived_thread_spec.js) check only the workflow id they care about (toMatchObject instead of toEqual).
References
- https://gitlab.com/gitlab-org/gitlab/-/work_items/635129
- Split from !266759 (merged), which wires this in.
Screenshots or screen recordings
Not applicable: no UI change.
How to set up and validate locally
No visible change: nothing passes paged: true until !266759 (merged). To check that the existing request is unchanged:
- Open a Duo Chat thread.
- In the browser network tab, check that the
getWorkflowLatestCheckpointrequest still selectsduoMessagesand returns the full history.
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.