Extract the Duo readiness card and add a progress header
What does this MR do and why?
This MR extracts the Duo readiness card into its own component. The settings form passes state into the card through props. The card sends toggle changes back to the form through events. The form still submits the same fields as before.
This MR also adds a progress header above the card. The header shows a progress bar, a step counter, and a state line. The state line tells the user what to do next.
Five steps count toward the step total: Agent Platform, GitLab Duo, flow execution, the CI/CD runner, and the agent configuration file. The agent configuration file counts because of a product decision (see References). The foundational flows toggle is nested under flow execution. It still renders, but it does not count toward the total.
The GitLab Duo toggle now reports its own state. It stays editable even when Agent Platform is off at a level above the project. This toggle also controls Chat and Code Suggestions. These features work without the Agent Platform. This change follows option 2 from the linked issue. The flow rows keep their existing blocked state.
The state line shows one of five readings: not set up; Chat and Code Suggestions work but flows need more steps; steps left; ready; or blocked.
How to test locally
Automated tests: 800 frontend tests pass for the settings area, including 11 new tests for the card. On GDK, the tally updated live from 3 of 5 steps to 4 of 5 steps when flow execution was turned on.
Manual steps:
- Enable the
duo_agent_readiness_settingsfeature flag. - Open a project. Go to Settings > General.
- Expand the GitLab Duo section.
- Check the header counter and the state line.
- Flip toggles and confirm the tally and the state line update without saving.
References
- Closes #607644 (closed), #607867 (closed), and #608268 (closed).
- Part of epic gitlab-org#22591.
- Stacked on !250804 (merged) (async row loading). Both halves come from one combined MR that was split.
- Product decision on the agent configuration file: #607580 (comment 3707396997).