Give the light agentic chat manager its own workflow stream
What does this MR do and why?
The light agentic chat manager (duo_agentic_chat_state_manager_light.vue) embeds agentic chat on a page where the AI panel is also mounted. Both surfaces read the workflow stream singleton, and the panel's manager adopts and subscribes to whatever stream is connected. With the panel open, a turn started in the embed was mirrored into the panel's transcript (capture below). Ownership flags on the embed's side cannot stop the panel from adopting, so the fix is to stop sharing.
Each WorkflowStream owns its worker, socket and buffer. The light manager now builds a private RetryableWorkflowStream in created() and terminates it on destroy, so it shares no live state with the panel. That removes the ownership and yield machinery and the mount-time adoption path. A host or a spec can supply a ready stream through the new stream prop.
The shared composer keeps its input enabled during a turn and emits queue-chat-prompt instead of send-chat-prompt while canSendPrompt is false. The light manager now honours that contract with an in-memory queue: canSendPrompt gates the composer, queued prompts render through the view, and the queue drains as the turn ends. It stays in memory because the panel's PromptQueue persists under one sessionStorage key this surface must not share. Without this, a second Enter during a running turn disconnected the socket and started a new turn.
The queue drains on the socket's close, not on the agent's final status: Workhorse holds the workflow lock for the life of a socket and releases it before the close frame, so a prompt sent on the status alone is rejected as "already responding in another tab". This is the same race Wait for the workflow lock before draining queued prompts closed in the full manager; the fork tracks isStreamOpen from its own stream's open and close events the same way.
The embed also stops initialising the shared tool-event hub, whose module-level dedup marker assumes one stream per page. Nothing on the embedding page listens for those events.
Nothing imports this component on master yet; Add a flag-gated Duo home dashboard page is its first consumer, behind the sdlc_duo_home flag, which is why this change needs no flag of its own.
Screenshots or screen recordings
Captured on a local instance with the Duo home page embedding this component.
On that instance every second turn in one session ends with "There was an error processing your request in the Duo Agent Platform", in the embed and in the AI panel alone on a plain page. That is the local agent service, not this change; the captures show that the panel no longer mirrors the embed.
How to set up and validate locally
- Enable
sdlc_duo_homeand Duo for a user with agentic chat, set Preferences > Behavior > Homepage to "Duo home", open/dashboard/duo_home(the page is on !250953). - Open the AI panel from the topbar, then send a prompt from the page's composer. The panel stays on its own thread and the embed completes its turn.
- Send a prompt, then type and submit another before the reply finishes. It renders as a queued bubble and sends when the turn ends.
Jest: ee/spec/frontend/ai/duo_agentic_chat/components/duo_agentic_chat_state_manager_light_spec.js, 34 examples under Vue 2 and the Vue 3 compat build.



