Collapse Duo question options when the thread is resolved
What does this MR do and why?
Collapses and disables the GitLab Duo clarifying-question card once its thread is resolved without an answer. Until now a resolved thread kept rendering its full interactive card, so clicking an option would post an answer into a discussion the agent had already stopped waiting on.
The suggested answers now sit behind a Show suggested answers / Hide suggested answers toggle, and everything in the card is disabled. The options stay readable, since they record what the agent weighed, but they can't be clicked. The collapse state is per view only, so it resets on reload.
References
Screenshots or screen recordings
| Default (Collapsed) | Expanded | Expand/Collapse Transition |
|---|---|---|
![]() |
![]() |
Screen recording of the behaviour: to be added
How to set up and validate locally
- Enable the feature flag in a rails console:
Feature.enable(:duo_workplan_async_flow) - On any work item, post a comment whose body contains a fenced
json:duo-questionblock holding a payload with atypeofclosed, aquestionstring, and anoptionsarray (each option needs anidand alabel, optionallydescriptionandrecommended). Add"multiple": truefor the multi-select shape - Reply to the thread once, so the resolve control appears on it
- Resolve the thread without picking an answer
- Confirm the options collapse behind
Show suggested answers, and that expanding them shows greyed, unclickable rows with a neutralRecommendedbadge - For the multi-select shape, confirm the
Submitbutton is gone - Reload, and confirm the card comes back collapsed
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.

