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

🤖 Generated with Claude Code

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 the component/dashboard Related to dashboard label Jan 2, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 2, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: adereis
Once this PR has been reviewed and has the lgtm label, please assign rawagner for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 component/shared Related to console-shared label Jan 2, 2026
@adereis
Copy link
Author

adereis commented Jan 2, 2026

/retest

(fail is unrelated to my change)

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 2, 2026

@adereis: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-images 0ab68f8 link true /test okd-scos-images

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

component/dashboard Related to dashboard component/shared Related to console-shared

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant