Skip to content

MGMT-21611: Add DevPreview badge to chatbot and update privacy msg#3144

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
rawagner:chatbot_dev_preview
Aug 27, 2025
Merged

MGMT-21611: Add DevPreview badge to chatbot and update privacy msg#3144
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
rawagner:chatbot_dev_preview

Conversation

@rawagner
Copy link
Member

@rawagner rawagner commented Aug 27, 2025

Screenshot From 2025-08-27 13-57-32

Summary by CodeRabbit

  • New Features
    • Added a Developer Preview badge in the chatbot header with an info popover and a “Learn more” link.
  • Style
    • Simplified the privacy alert title text and moved the privacy statement button to its own line for clearer layout.
    • Shortened the chatbot footnote to a concise review reminder.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 27, 2025

@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.

Details

In 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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 27, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 27, 2025

Walkthrough

Adds 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

Cohort / File(s) Summary of changes
AI alert text tweak
libs/chatbot/lib/components/ChatBot/AIAlert.tsx
Rewrote alert title to use a PatternFly Stack with two items; moved the Red Hat Privacy Statement Button into its own StackItem and shortened the first item's text. No logic/state changes.
ChatBot header update
libs/chatbot/lib/components/ChatBot/ChatBotWindow.tsx
Imported and rendered the new DevPreviewBadge inside ChatBotHeaderActions (before the close button); replaced a complex footnote with a simplified label. No API changes.
New DevPreviewBadge component
libs/chatbot/lib/components/ChatBot/DevPreviewBadge.tsx
Added default-exported component: an orange Label with Info icon that triggers a left-positioned PatternFly Popover containing explanatory text and an external “Learn more” button.

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)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • ElayAharoni
  • jgyselov
  • ammont82

Poem

I nibble code in quiet hops and bounds,
An orange badge now graces header rounds.
Alerts trimmed tidy, buttons gently moved,
A popover blooms where curiosity proved.
I hop — click learn — the support page is found. 🥕🐇

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@openshift-ci openshift-ci bot requested review from ElayAharoni and jgyselov August 27, 2025 11:51
@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 27, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 27, 2025

@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.

Details

In response to this:

Summary by CodeRabbit

  • New Features
  • Added a Developer Preview badge in the chatbot header with an info popover explaining preview features and a “Learn more” link.
  • Style
  • Shortened the privacy alert title text for clearer messaging; existing button and behavior remain unchanged.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 2e7ea94 and 404f8c9.

📒 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

@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 27, 2025

@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.

Details

In response to this:

Screenshot From 2025-08-27 13-57-32

Summary by CodeRabbit

  • New Features
  • Added a Developer Preview badge in the chatbot header with an info popover explaining preview features and a “Learn more” link.
  • Style
  • Shortened the privacy alert title text for clearer messaging; existing button and behavior remain unchanged.

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.

@rawagner rawagner force-pushed the chatbot_dev_preview branch from 404f8c9 to cce1869 Compare August 27, 2025 12:22
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 27, 2025

@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.

Details

In response to this:

Screenshot From 2025-08-27 13-57-32

Summary by CodeRabbit

  • New Features
  • Added a Developer Preview badge in the chatbot header with an info popover and a “Learn more” link.
  • Style
  • Simplified the privacy alert title text and moved the privacy statement button to its own line for clearer layout.
  • Shortened the chatbot footnote to a concise review reminder.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 404f8c9 and cce1869.

📒 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.

@rawagner
Copy link
Member Author

/cherry-pick releases/v0.1-chatbot

@openshift-cherrypick-robot
Copy link
Contributor

@rawagner: once the present PR merges, I will cherry-pick it on top of releases/v0.1-chatbot in a new PR and assign it to you.

Details

In response to this:

/cherry-pick releases/v0.1-chatbot

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.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 27, 2025
@openshift-ci
Copy link

openshift-ci bot commented Aug 27, 2025

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 8f8370d into openshift-assisted:master Aug 27, 2025
11 checks passed
@openshift-cherrypick-robot
Copy link
Contributor

@rawagner: new pull request created: #3146

Details

In response to this:

/cherry-pick releases/v0.1-chatbot

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.

@julienlim
Copy link

@rawagner

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."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants