Show placeholder text when Duo Core user not able to use agentic chat outside of namespaces
What does this MR do and why?
This MR fixes a bug where the AI Panel incorrectly evaluates the agenticAvailable dataset attribute, causing the chat component to always be rendered even when agentic chat is disabled.
The Problem
Dataset attributes in HTML are always strings. When agenticAvailable="false" is set in the HTML, it's read as the string "false" in JavaScript. Since non-empty strings are truthy in JavaScript, the ternary operator agenticAvailable ? DuoAgenticChat : fallbackMessage always evaluated to true and rendered the chat component instead of showing the "Chat is not available" fallback message.
The Solution
- Parse agenticAvailablestring to boolean usingparseBoolean()before evaluation
- Add gl-min-h-[3.0625rem]to the AI Panel header when displaying fallback text to prevent header collapse
- Update fallback message to "Chat is not available." for better clarity
| Before | After | 
|---|---|
|   |   | 
How to set up and validate locally
- Open any page where the AI Panel can be initialized
- Modify the dataset to set agenticAvailable="false"(or ensure it's set to false in your environment)
- Open the AI Panel
- Verify that:
- The fallback message "Chat is not available." is displayed instead of the chat component
- The panel header maintains consistent height (49px / 3.0625rem)
- The message is properly centered in the panel body
 
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.
Related to #577641