MGMT-21611: Add DevPreview badge to chatbot and update privacy msg#3144
Conversation
|
@rawagner: This pull request references MGMT-21611 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughAdds a DevPreviewBadge component and inserts it into the ChatBot header actions; shortens the AIAlert title by moving the privacy-statement button to a separate Stack item. No behavioral or state changes to existing logic or public APIs. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant App
participant ChatBotWindow
participant HeaderActions as ChatBotHeaderActions
participant Badge as DevPreviewBadge
participant Popover
User->>App: Open ChatBot
App->>ChatBotWindow: render
ChatBotWindow->>HeaderActions: render actions
HeaderActions->>Badge: render DevPreviewBadge
Note right of Badge #ffe0b2: New header UI element (label + popover)
User->>Badge: click label
Badge->>Popover: toggle popover (non-trapping)
User->>Popover: click "Learn more"
Popover->>User: open external support page (new tab)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@rawagner: This pull request references MGMT-21611 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
libs/chatbot/lib/components/ChatBot/AIAlert.tsx (2)
2-2: Standardize PatternFly icon import to avoid bundle duplication.Use the top-level icons package for consistency with DevPreviewBadge.
-import { ExternalLinkAltIcon } from '@patternfly-6/react-icons/dist/js/icons/external-link-alt-icon'; +import { ExternalLinkAltIcon } from '@patternfly-6/react-icons';
24-35: Add an accessible label to announce new tab behavior.Improves SR discoverability of the external link.
<Button variant="link" isInline icon={<ExternalLinkAltIcon />} component="a" href="https://www.redhat.com/en/about/privacy-policy" iconPosition="end" target="_blank" rel="noopener noreferrer" + aria-label="Open Red Hat Privacy Statement (opens in a new tab)" > Red Hat Privacy Statement </Button>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
libs/chatbot/lib/components/ChatBot/AIAlert.tsx(1 hunks)libs/chatbot/lib/components/ChatBot/ChatBotWindow.tsx(2 hunks)libs/chatbot/lib/components/ChatBot/DevPreviewBadge.tsx(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: lint
- GitHub Check: tests
- GitHub Check: format
- GitHub Check: unit-tests
- GitHub Check: translation-files
- GitHub Check: circular-deps
🔇 Additional comments (1)
libs/chatbot/lib/components/ChatBot/ChatBotWindow.tsx (1)
30-30: LGTM: badge placement in header actions looks good.Nice, minimal integration without touching behavior.
Also applies to: 134-135
|
@rawagner: This pull request references MGMT-21611 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
404f8c9 to
cce1869
Compare
|
@rawagner: This pull request references MGMT-21611 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (3)
libs/chatbot/lib/components/ChatBot/DevPreviewBadge.tsx (3)
15-25: Clarify external link behavior.Add an aria-label noting it opens a new tab.
<Button href="https://access.redhat.com/support/offerings/devpreview" target="_blank" rel="noopener noreferrer" icon={<ExternalLinkAltIcon />} iconPosition="end" variant="link" isInline + aria-label="Learn more about developer preview (opens in a new tab)" > Learn more </Button>
32-34: Fix non-focusable trigger: wrap Label in a Button for keyboard/screen-reader access.Label isn’t focusable; users can’t open the popover via keyboard. Wrap with a plain Button and drop the pointer style.
- <Label style={{ cursor: 'pointer' }} color="orange" icon={<InfoCircleIcon />}> - Developer Preview - </Label> + <Button variant="plain" aria-label="Open developer preview information"> + <Label color="orange" icon={<InfoCircleIcon />}>Developer Preview</Label> + </Button>
6-7: Label the Popover for assistive tech.Without headerContent, Popover needs an aria-label to expose its purpose.
<Popover + aria-label="Developer preview information" bodyContent={ @@ - withFocusTrap={false} + withFocusTrap={false}Also applies to: 29-31
🧹 Nitpick comments (3)
libs/chatbot/lib/components/ChatBot/DevPreviewBadge.tsx (2)
5-5: Add explicit return type.Minor TS clarity.
-const DevPreviewBadge = () => ( +const DevPreviewBadge = (): JSX.Element => (
10-13: Optional: externalize user-facing strings for i18n.If the app uses localization, move these strings to message catalogs.
Also applies to: 24-24, 33-33
libs/chatbot/lib/components/ChatBot/ChatBotWindow.tsx (1)
212-212: Nit: hyphenate “AI-generated” and add a period.Polished user-facing copy.
- <ChatbotFootnote label="Always review AI generated content prior to use" /> + <ChatbotFootnote label="Always review AI-generated content prior to use." />
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
libs/chatbot/lib/components/ChatBot/AIAlert.tsx(2 hunks)libs/chatbot/lib/components/ChatBot/ChatBotWindow.tsx(3 hunks)libs/chatbot/lib/components/ChatBot/DevPreviewBadge.tsx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- libs/chatbot/lib/components/ChatBot/AIAlert.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: translation-files
- GitHub Check: tests
- GitHub Check: circular-deps
- GitHub Check: unit-tests
- GitHub Check: lint
- GitHub Check: format
🔇 Additional comments (2)
libs/chatbot/lib/components/ChatBot/ChatBotWindow.tsx (2)
30-30: LGTM: scoped import of DevPreviewBadge.
134-136: LGTM: badge placement before the close button.Good spot in header actions; tab order remains intuitive.
Please verify in narrow viewports that the new badge doesn’t wrap the header actions or push the close button off-screen.
|
/cherry-pick releases/v0.1-chatbot |
|
@rawagner: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: celdrake, rawagner The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
8f8370d
into
openshift-assisted:master
|
@rawagner: new pull request created: #3146 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
We should call it "Preview" as it's a hosted service. Dev Preview is typically used for self-managed. Here's the suggested text to put in the information bubble: "Preview refers to early access features or functionalities that are under active development and not yet fully supported for production environments. This feature is made available to allow users to test new functionalities, provide feedback, and help shape the future development of the feature. Preview features have limitations on support compared to fully released features. They are not intended for production workloads and are not covered by standard Red Hat Customer Portal case management. This Preview features os still in development and may undergo changes, or even be removed, before or during their official release." |

Summary by CodeRabbit