Skip to content

MGMT-22463: Mass hostname change preview is not correctly aligned#3344

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
jgyselov:pf6_cim_mass_hostname_change_alignment
Jan 14, 2026
Merged

MGMT-22463: Mass hostname change preview is not correctly aligned#3344
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
jgyselov:pf6_cim_mass_hostname_change_alignment

Conversation

@jgyselov
Copy link
Copy Markdown
Contributor

@jgyselov jgyselov commented Jan 2, 2026

https://issues.redhat.com/browse/MGMT-22463

Before:
image

After:

image

Summary by CodeRabbit

  • Style
    • Redesigned the mass-hostname-change preview into a three-column layout: left shows original hostnames, middle displays visual dividers, right shows new hostnames or a fallback message.
    • Clarified hostname change restrictions by showing the reason in a popover accessed via an inline link-styled info control when a change isn't allowed.

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 2, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Jan 2, 2026

@jgyselov: This pull request references MGMT-22463 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 sub-task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

https://issues.redhat.com/browse/MGMT-22463

Before:

After:

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 review from batzionb and jkilzi January 2, 2026 14:52
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 2, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 2, 2026

📝 Walkthrough

Walkthrough

Added oldHostname to per-host change data and restructured the preview into a three-column Split layout showing old hostname, dividers, and new hostname or a reason Popover when change is disallowed.

Changes

Cohort / File(s) Summary
UI Component — Mass hostname preview
libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx
Added oldHostname to getNewHostnames output; replaced stacked per-host preview with a three-column Split (left: oldHostname, middle: dividers, right: newHostname or Info Popover with reason); imported Content from PatternFly; minor formatting tweak.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

lgtm

Suggested reviewers

  • batzionb
  • ammont82

Poem

🐰 I hopped through code with nimble feet,

Old names on the left, new ones to meet,
A column of arrows, a popover's song,
Hosts lined up tidy — the preview's strong! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: reworking the Preview layout from a stacked per-host format to a three-column Split-based layout to fix alignment issues in the mass hostname change preview.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

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

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 2, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Jan 2, 2026

@jgyselov: This pull request references MGMT-22463 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 sub-task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

https://issues.redhat.com/browse/MGMT-22463

Before:
image

After:

image

Summary by CodeRabbit

  • Style
  • Redesigned the preview section in mass hostname change operations with a three-column layout: left column displays original hostnames, middle shows visual dividers, and right column displays new hostnames or explains why a change cannot be made.
  • Improved clarity of hostname change restrictions by showing restriction reasons in popovers when applicable.

✏️ Tip: You can customize this high-level summary in your review settings.

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
Copy Markdown

@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 (1)
libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (1)

215-217: Consider adding a fallback for empty oldHostname.

Similar to the fallback provided for newHostname at line 246, consider adding a fallback text when host.oldHostname is empty or undefined to improve the user experience.

🔎 Proposed refactor with fallback
                 {newHostnames.map((host, i) => (
                   <div className="hostname-column__text" key={`old-hostname-${i}`}>
-                    <strong>{host.oldHostname}</strong>
+                    <strong>{host.oldHostname || t('ai:Unknown hostname')}</strong>
                   </div>
                 ))}
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b9ba48 and 4fcec7d.

📒 Files selected for processing (1)
  • libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts:69-69
Timestamp: 2025-10-19T17:22:52.502Z
Learning: CIM UI changes in the repository openshift-assisted/assisted-installer-ui (e.g., files under libs/ui-lib/lib/cim/) are handled separately by the CIM team and should be tracked via separate issues rather than being included in PRs for other UI components.
🧬 Code graph analysis (1)
libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (1)
libs/ui-lib/lib/common/components/hosts/utils.ts (1)
  • getHostname (185-186)
⏰ 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: circular-deps
  • GitHub Check: translation-files
  • GitHub Check: format
  • GitHub Check: lint
  • GitHub Check: unit-tests
  • GitHub Check: tests
🔇 Additional comments (2)
libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (2)

6-6: LGTM: Content import added for semantic markup.

The Content component is appropriately used at line 245 to wrap the new hostname display.


50-68: LGTM: oldHostname added to support before/after comparison.

The addition of oldHostname to the data structure enables the three-column preview layout. The logic correctly sets newHostname to undefined and captures the reason when hostname changes are not allowed.

@jgyselov jgyselov force-pushed the pf6_cim_mass_hostname_change_alignment branch from 4fcec7d to 6c9a3e7 Compare January 2, 2026 14:57
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Jan 2, 2026

@jgyselov: This pull request references MGMT-22463 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 sub-task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

https://issues.redhat.com/browse/MGMT-22463

Before:
image

After:

image

Summary by CodeRabbit

  • Style
  • Redesigned the mass-hostname-change preview into a three-column layout: left shows original hostnames, middle displays visual dividers, right shows new hostnames or a fallback message when none provided.
  • Improved clarity of hostname change restrictions by showing reasons in a popover accessed via an inline info control when a change isn't allowed.

✏️ Tip: You can customize this high-level summary in your review settings.

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.

@jgyselov jgyselov added this to the v2.17-cim milestone Jan 7, 2026
@jgyselov jgyselov force-pushed the pf6_cim_mass_hostname_change_alignment branch from 6c9a3e7 to f077a3f Compare January 12, 2026 09:29
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Jan 12, 2026

@jgyselov: This pull request references MGMT-22463 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 sub-task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

https://issues.redhat.com/browse/MGMT-22463

Before:
image

After:

image

Summary by CodeRabbit

  • Style
  • Redesigned the mass-hostname-change preview into a three-column layout: left shows original hostnames, middle displays visual dividers, right shows new hostnames or a fallback message.
  • Clarified hostname change restrictions by showing the reason in a popover accessed via an inline link-styled info control when a change isn't allowed.

✏️ Tip: You can customize this high-level summary in your review settings.

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
Copy Markdown

@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)
libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (1)

212-252: Well-structured three-column layout for the hostname preview.

The Split-based layout with old hostname, divider, and new hostname columns is a clean solution for the alignment issue. A few minor observations:

  1. Keys: Using array index as keys works here since the list is derived from selectedHosts which is stable during rendering. For better stability, consider including host IDs in newHostnames and using them as keys.

  2. Accessibility for dividers: The > character serves as a visual separator. Consider adding aria-hidden="true" to prevent screen readers from announcing it, since the layout semantics should be conveyed by the column structure.

Optional: Improve accessibility for dividers
              <SplitItem>
                {newHostnames.map((_, i) => (
-                  <div key={`divider-${i}`}>
+                  <div key={`divider-${i}`} aria-hidden="true">
                    <strong>{'>'}</strong>
                  </div>
                ))}
              </SplitItem>
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4fcec7d and f077a3f.

📒 Files selected for processing (1)
  • libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts:69-69
Timestamp: 2025-10-19T17:22:52.502Z
Learning: CIM UI changes in the repository openshift-assisted/assisted-installer-ui (e.g., files under libs/ui-lib/lib/cim/) are handled separately by the CIM team and should be tracked via separate issues rather than being included in PRs for other UI components.
🧬 Code graph analysis (1)
libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (1)
libs/ui-lib/lib/common/components/hosts/utils.ts (1)
  • getHostname (185-186)
🔇 Additional comments (2)
libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (2)

2-19: LGTM!

Import changes are appropriate. The Content component is properly imported and used in the preview section for displaying hostname text.


56-67: LGTM!

The addition of oldHostname to the returned object is necessary for displaying the old-to-new hostname mapping in the preview.

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

openshift-ci bot commented Jan 14, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgyselov, LiorSoffer

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 cb7d646 into openshift-assisted:master Jan 14, 2026
12 checks passed
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.

3 participants