Show Chat button only when Chat can be used
What does this MR do and why?
- Previously, the logic would Chat button on all pages of gitlab.com to any user that can use Chat via any group.
- This MR updates the logic to be more fine-grained.
- A user will only see Chat if they are within the resource hierarchy of a Group that enables AI features that they are a member of.
- If the user is on a non-group/project resource, such as the Todos Dashboard, and they have AI features enabled via a Group membership, they will also see the Chat button (to ask Documentation questions)
- This is behind the
tanuki_bot_breadcrumbs_entry_point
feature flag - This updates the logic for the Chat button only, not the Chat access available via the Help menu in the sidebar, which is written in Vue and can either stay as-is or be updated separately.
- See issue description for full details on what the expected behavior is and the rationale: #428541 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Set up a group with AI enabled features locally
- Enable the
tanuki_bot_breadcrumbs_entry_point
feature flag - While viewing the group as a member: the "GitLab Duo" button should be visible
- While viewing the group as a non-member: the "GitLab Duo" button should not be visible
- While viewing todos: the "GitLab Duo" button should be visible when signed in as any user with AI enabled via a group membership.
- While viewing todos: the "GitLab Duo" button should be not visible when signed in as any user without AI enabled via a group membership.
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.
Edited by Jessie Young