Render agentic Duo Chat from the micro-frontend in the AI panel

What does this MR do and why?

Renders agentic Duo Chat in the AI panel from the Duo Chat micro-frontend (MFE) when mfe_duo_chat_poc is enabled. This proves the Module Federation delivery model end to end on a real surface.

  • The panel router redirects the agentic chat routes to new mfe_poc_route and mfe_poc_new_route routes, which render MfePocPanel.
  • MfePocPanel loads the mfe_duo_chat remote through ~/mfe_loader and mounts it with a GitLabContext built from the page and the panel props.
  • By default the remote is the copy bundled from @gitlab-mfe/duo-chat. In development, setting MFE_SERVER_ORIGIN loads it from an MFE dev server instead.
  • Classic chat and the History tab stay native. The selected thread reaches the MFE through the same sessionStorage entry the native chat reads.
  • The MFE reports title, subtitle and navigation (open a session, back to history) through DOM CustomEvents, which the panel forwards.

This is MR 4 of a 4-MR stack, split from !233214:

  1. Feature flag: !268037 (merged)
  2. Build and runtime configuration: !268042 (merged)
  3. Context contract CI job: !268043 (merged)
  4. Agentic Duo Chat from the MFE in the AI panel (this MR)

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. In the Rails console, enable the flag:

    Feature.enable(:mfe_duo_chat_poc)
  2. Open any project page as a user with Duo Agent Platform access, and open the Duo panel in agentic mode.

  3. Check that the Chat tab renders the MFE, and that the History tab lists threads and opens the selected one in the MFE.

  4. Optional: to test against an MFE dev server, run pnpm dev in gitlab-org/frontend/gitlab-mfe, start Rails with MFE_SERVER_ORIGIN=http://localhost:4001, and reload.

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 Rafa Frederico

Merge request reports

Loading
Loading