Skip to content

Conversation

@adereis
Copy link

@adereis adereis commented Jan 2, 2026

Summary

  • Wrap alert messages in LinkifyExternal component to automatically convert URLs in status card alert messages into clickable links

Test plan

  • Verify alert messages with URLs display as clickable links
  • Verify alert messages without URLs display normally
  • Verify external links open in new tab

Screenshot of the problem being fixed:
Screenshot-ARO-Console-First-Run-InsightsDisabled

Wrap alert messages in StatusItem with LinkifyExternal to automatically
convert URLs to clickable hyperlinks. This makes the status card
behavior consistent with the notification drawer, which already uses
LinkifyExternal for alert descriptions.

This was discovered when investigating why the InsightsDisabled alert
from the insights-operator displayed its documentation URL as plain
text instead of a clickable link in the cluster dashboard status card.
@openshift-ci openshift-ci bot requested a review from rawagner January 2, 2026 05:07
@coderabbitai
Copy link

coderabbitai bot commented Jan 2, 2026

Walkthrough

The AlertItem component now imports the LinkifyExternal utility and wraps alert messages within it, modifying rendering to process URLs as external links.

Changes

Cohort / File(s) Summary
Alert Message Rendering
frontend/packages/console-shared/src/components/dashboard/status-card/AlertItem.tsx
Added LinkifyExternal import and wrapped alert message in LinkifyExternal component to auto-detect and render URLs as external links.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 24830e3 and 0ab68f8.

📒 Files selected for processing (1)
  • frontend/packages/console-shared/src/components/dashboard/status-card/AlertItem.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • frontend/packages/console-shared/src/components/dashboard/status-card/AlertItem.tsx
🧬 Code graph analysis (1)
frontend/packages/console-shared/src/components/dashboard/status-card/AlertItem.tsx (1)
frontend/public/components/utils/link.tsx (1)
  • LinkifyExternal (137-139)
🔇 Additional comments (2)
frontend/packages/console-shared/src/components/dashboard/status-card/AlertItem.tsx (2)

11-11: LGTM!

The import is correctly added and matches the component definition shown in the relevant code snippets.


77-79: No XSS risk from system-generated alert data.

The implementation correctly wraps the message with LinkifyExternal for URL detection. Alert messages (from getAlertDescription, getAlertMessage, or getAlertSummary) are system-generated from monitoring systems (Prometheus/AlertManager) via alert annotations—not user input. This pattern is already established in the notification drawer for the same purpose, and requires no additional sanitization beyond the browser's standard link handling.


Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested a review from spadgett January 2, 2026 05:07
@openshift-ci openshift-ci bot added component/dashboard Related to dashboard component/shared Related to console-shared labels Jan 2, 2026
@adereis
Copy link
Author

adereis commented Jan 2, 2026

/retest

(fail is unrelated to my change)

1 similar comment
@adereis
Copy link
Author

adereis commented Jan 5, 2026

/retest

(fail is unrelated to my change)

Copy link
Member

@logonoff logonoff left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jan 5, 2026
@logonoff
Copy link
Member

logonoff commented Jan 5, 2026

/retitle OCPBUGS-70329: Auto-linkify URLs in status card alert messages

@openshift-ci openshift-ci bot changed the title Auto-linkify URLs in status card alert messages OCPBUGS-70329: Auto-linkify URLs in status card alert messages Jan 5, 2026
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 5, 2026
@openshift-ci-robot
Copy link
Contributor

@adereis: This pull request references Jira Issue OCPBUGS-70329, which is invalid:

  • expected the bug to target either version "4.22." or "openshift-4.22.", but it targets "4.21.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

  • Wrap alert messages in LinkifyExternal component to automatically convert URLs in status card alert messages into clickable links

Test plan

  • Verify alert messages with URLs display as clickable links
  • Verify alert messages without URLs display normally
  • Verify external links open in new tab

🤖 Generated with Claude Code

Screenshot of the problem being fixed:
Screenshot-ARO-Console-First-Run-InsightsDisabled

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.

@logonoff
Copy link
Member

logonoff commented Jan 5, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 5, 2026
@openshift-ci-robot
Copy link
Contributor

@logonoff: This pull request references Jira Issue OCPBUGS-70329, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

Details

In response to this:

/jira refresh

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 openshift-ci bot requested a review from yapei January 5, 2026 17:56
@adereis
Copy link
Author

adereis commented Jan 5, 2026

The issues are with the tests. The failures are unrelated to my changes:

unknown version reference "machine-os"

and

Failed to adjust OOM score of renderer with pid 3414: Permission denied (13)

/retest

@openshift-ci-robot
Copy link
Contributor

@adereis: This pull request references Jira Issue OCPBUGS-70329, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

Details

In response to this:

Summary

  • Wrap alert messages in LinkifyExternal component to automatically convert URLs in status card alert messages into clickable links

Test plan

  • Verify alert messages with URLs display as clickable links
  • Verify alert messages without URLs display normally
  • Verify external links open in new tab

Screenshot of the problem being fixed:
Screenshot-ARO-Console-First-Run-InsightsDisabled

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.

@adereis
Copy link
Author

adereis commented Jan 7, 2026

/retest-required

@adereis
Copy link
Author

adereis commented Jan 9, 2026

/retest

(failing tests are unrelated to my change)

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 9, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adereis, spadgett

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 9, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

@adereis: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

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. component/dashboard Related to dashboard component/shared Related to console-shared jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants