Restore retry alternatives pager for duoWorkflowBranches API
What does this MR do and why?
The alternatives pager (browse previous manual-retry attempts) was
wired end-to-end in
!240895 (merged) against
a msg.alternatives field a backend MR was going to add directly on
each DuoMessage. That backend MR
(!238143 (closed)) was
closed, and the frontend transform for it was later removed because
that GraphQL shape never shipped. Since then nothing populated
.alternatives, so the pager never rendered even though duo-ui's
components and this app's selectedAlternatives/retryStates/
select-alternative wiring were still present.
The backend has since replaced it with DuoMessage.alternativeCount
plus a separate duoWorkflowBranches(workflowId, threadTs) query.
This MR adapts that new contract into the shape duo-ui's pager
already expects, without changing duo-ui itself:
- Select
alternativeCountalongsidethreadTs/parentTs, and add a query forduoWorkflowBranches. - Add
alternatives_utils.js: collapses same-question retry turns (a live retry appends a new turn rather than replacing the old one in place) into one, attaching analternativesarray to the remaining terminator message. Historical (pre-session) alternatives are fetched lazily, only once a user pages to them. - Wire the merge into both
duo_agentic_chat_state_manager.vueand its light variant.
Only observable once the dw_read_blobs_graphql feature flag
(default off) is enabled, so there is no changelog entry.
References
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist.