Replace "Review and confirm" CTA with "Implement" and "View" in workplan empty state
What does this MR do and why?
Replaces the confusing "Review and confirm" button in the Duo Chat workplan empty state with two focused CTAs:
- "View" (secondary, listed first) — toggles the workplan drawer, with
aria-pressedreflecting the drawer state, consistent with the "View" toggle in the work item header UI - "Implement" (
DuoWorkItemToMrAction) — starts the developer agent flow with the workplan as context
The old button simply toggled the workplan drawer. If the drawer was already open, clicking "Review and confirm" would close it — the opposite of what users expect. The new "View" button keeps the toggle behavior but is labeled honestly and exposes its pressed state.
The description copy is also updated from "A workplan has already been started for this item." to "View the workplan and implement it when you're ready." to guide users toward the next logical action while encouraging review first.
Screenshots / Screenrecording
| Before | After |
|---|---|
References
- Issue: #626679 (closed)
- Parent investigation: #613424 (closed)
- Related: #626672
Follow up
I believe the spacings between the next headline and its actions are wrong. I'd fix this in a follow up, I can't unseen it
How to set up and validate locally
- Navigate to a work item that has an existing workplan
- Open Duo Chat — the empty state should show "Workplan found"
- Verify the "View" button appears first and toggles the workplan drawer open/closed (
aria-pressedfollows the drawer state) - Verify the "Implement" button appears and triggers the developer agent flow
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.
