Make containerType optional in the Duo chat blocked state
What does this MR do and why?
The Duo blocked state view is a route component. Its props come from the Duo panel dataset built in chat panel config. The Rails components pass container_type: container.type, which is nil on pages with no group or project, so the attribute is absent from the DOM. The component declared containerType as a required prop, which fails validation when the prop is undefined.
The warning is: prop "containerType" type check failed.
Fix: make containerType optional with default ''. The value only selects copy in the empty states, so an empty string is a safe fallback.
Changes made:
ee/app/assets/javascripts/ai/duo_agentic_chat/components/duo_agentic_chat_blocked_state_view.vue
How to set up and validate locally
- Open the Duo chat panel on a page outside any group or project, such as the user dashboard.
- Set Duo to be blocked (for example, by not having the correct license).
- The empty state should render without warnings.
- Check the browser console shows no
[Vue warn]line for this warning.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- I have evaluated the MR acceptance checklist for this MR.
References
- Addresses one entry of #628901 (browser console error catalogue, section C: Vue warnings)
- Warnings surfaced by !255207 (closed) (feature specs fail on console errors)
- Sibling fixes from the same section: !255388 (merged), !255389 (merged), !255390 (merged), !255391 (closed), !255392 (merged), !255393 (closed), !255394 (merged), !255395 (merged), !255396 (merged), !255398 (merged)