Skip to content

Conversation

@jhadvig
Copy link
Member

@jhadvig jhadvig commented Nov 21, 2025

/assign @Leo6Leo

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Nov 21, 2025
@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-65883, 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.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

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

In response to this:

/assign @Leo6Leo

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 November 21, 2025 13:28
@coderabbitai
Copy link

coderabbitai bot commented Nov 21, 2025

Walkthrough

Added a ConsoleLink YAML template cl-contact-mail, a matching sample entry, and two English localization strings (duplicated) describing the contact mail link.

Changes

Cohort / File(s) Summary
YAML template addition
frontend/public/models/yaml-templates.ts
Added cl-contact-mail ConsoleLink YAML template with apiVersion: console.openshift.io/v1, kind: ConsoleLink, metadata.name: example-contact-mail, spec.href: mailto:[email protected], spec.location: UserMenu, spec.text: Contact Mail Link.
Sample addition
frontend/packages/console-shared/src/utils/sample-utils.ts
Added sample entry id: cl-contact-mail for ConsoleLinkModel with title and description about a contact mail link appearing in the user menu.
Localization additions
frontend/public/locales/en/console-shared.json
Added two English strings for the contact mail link (title and description). The same pair of keys appears twice in the file (duplicate insertion).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify YAML string formatting and that the sample targets ConsoleLinkModel.
  • Confirm localization keys are correct and remove the duplicate entries if unintended.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit 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 ee04702 and c6dff48.

📒 Files selected for processing (3)
  • frontend/packages/console-shared/src/utils/sample-utils.ts (1 hunks)
  • frontend/public/locales/en/console-shared.json (1 hunks)
  • frontend/public/models/yaml-templates.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • frontend/packages/console-shared/src/utils/sample-utils.ts
  • frontend/public/models/yaml-templates.ts
🧰 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/public/locales/en/console-shared.json
🔇 Additional comments (2)
frontend/public/locales/en/console-shared.json (2)

298-299: Discrepancy between AI summary and provided code: verify if strings are duplicated.

The AI summary claims these localization strings appear "duplicated in two locations within the file," but the provided code shows only one occurrence (lines 298-299). Confirm whether these strings should appear in multiple locations or if the summary is inaccurate.


298-299: Verify that the sample entry integrates with this localization.

From the PR comments, the new contact mail link sample is not appearing in the UI's Create → ConsoleLink → Samples section. This suggests changes may be missing in frontend/packages/console-shared/src/utils/sample-utils.ts. Confirm that the sample is properly registered and uses these localization keys.


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

@openshift-ci openshift-ci bot requested review from cajieh and spadgett November 21, 2025 13:29
@openshift-ci openshift-ci bot added component/core Related to console core functionality approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 21, 2025
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

🧹 Nitpick comments (1)
frontend/public/models/yaml-templates.ts (1)

926-938: Fix indentation for consistency.

The contact-mail-link template correctly demonstrates a ConsoleLink with a mailto URL. However, line 932 uses 4 spaces for the name field under metadata, while all other ConsoleLink templates in this file use 2 spaces for consistency.

Apply this diff to fix the indentation:

 apiVersion: console.openshift.io/v1
 kind: ConsoleLink
 metadata:
-    name: contact-mail-link
+  name: contact-mail-link
 spec:
   href: 'mailto:[email protected]'
   location: UserMenu
   text: Contact Mail Link
📜 Review details

Configuration used: CodeRabbit 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 569b5f4 and e8dc069.

📒 Files selected for processing (1)
  • frontend/public/models/yaml-templates.ts (1 hunks)
🧰 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/public/models/yaml-templates.ts
🔇 Additional comments (1)
frontend/public/models/yaml-templates.ts (1)

911-925: LGTM!

The cl-namespace-dashboard template follows the correct structure and formatting conventions consistent with other ConsoleLink templates in this file.

Copy link
Contributor

@Leo6Leo Leo6Leo left a comment

Choose a reason for hiding this comment

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

Generated with Claude, trying this feature

Review Summary

This PR adds a helpful sample for ConsoleLink with a mailto: href, which is currently missing from the available templates.

Issues Found

Indentation inconsistency

  • Line 932 (in the diff): name: contact-mail-link has 4 spaces of indentation instead of 2
  • All other ConsoleLink samples in the file use 2-space indentation consistently

Compare with existing samples (lines 1057-1058, 1070-1071, 1083-1084, 1099-1100):

metadata:
  name: example  # 2 spaces ✓

Your new sample:

metadata:
    name: contact-mail-link  # 4 spaces ✗

What Looks Good

✅ The sample structure is correct for ConsoleLink
✅ The mailto: href is properly formatted
✅ The location UserMenu is valid and appropriate
✅ The sample key contact-mail-link follows naming conventions
✅ Addresses a genuine gap in the available samples

Recommendation

Please update the indentation for name: contact-mail-link from 4 spaces to 2 spaces to match the existing code style, then this will be ready to merge.

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.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 21, 2025
@logonoff
Copy link
Member

per leo's review re. yaml spacing inconsistency

/lgtm cancel

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 21, 2025
@logonoff
Copy link
Member

/lgtm

@jhadvig
Copy link
Member Author

jhadvig commented Nov 21, 2025

@Leo6Leo @logonoff comment addressed, PTAL

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 21, 2025
@jhadvig
Copy link
Member Author

jhadvig commented Nov 23, 2025

/retest

@jhadvig jhadvig added the plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer label Nov 24, 2025
@Leo6Leo
Copy link
Contributor

Leo6Leo commented Nov 24, 2025

QE verification:
/assign @yapei

@yapei
Copy link
Contributor

yapei commented Nov 25, 2025

@XiyunZhao please help verify, thanks!

@XiyunZhao
Copy link

Hi @jhadvig, I have two questions:

  1. For consistency with the other ConsoleLink sample names, should contact-mail-link be updated to cl-contact-mail , or something along those lines?
  2. The new sample doesn't appear under the “Create ConsoleLink” → “Samples” tab. Do we need to make an additional change in the section below to enable it? https://github.com/openshift/console/blob/b25299c50d63077a508479e300b451ec2c181710/frontend/packages/console-shared/src/utils/sample-utils.ts#L185C4-L213C6
65883_issue

@openshift-ci openshift-ci bot added component/shared Related to console-shared and removed lgtm Indicates that a PR is ready to be merged. labels Nov 25, 2025
@openshift-ci openshift-ci bot added the kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated label Nov 25, 2025
@logonoff
Copy link
Member

/lgtm

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

openshift-ci bot commented Nov 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, logonoff

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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

@XiyunZhao
Copy link

/verified by @XiyunZhao
Thanks for the quick fix, no other issue was found, the Contact Mail Link sample works as expected

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Nov 26, 2025
@openshift-ci-robot
Copy link
Contributor

@XiyunZhao: This PR has been marked as verified by @XiyunZhao.

In response to this:

/verified by @XiyunZhao
Thanks for the quick fix, no other issue was found, the Contact Mail Link sample works as expected

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
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD c6881d1 and 2 for PR HEAD c6dff48 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 26, 2025

@jhadvig: all tests passed!

Full PR test history. Your PR dashboard.

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 35bb3ec into openshift:main Nov 26, 2025
8 checks passed
@openshift-ci-robot
Copy link
Contributor

@jhadvig: Jira Issue Verification Checks: Jira Issue OCPBUGS-65883
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-65883 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

In response to this:

/assign @Leo6Leo

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.

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/core Related to console core functionality 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. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged. plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants