Skip to content

MGMT-22512: Add additional new fields to the above the sea UI#3337

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
ElayAharoni:Add-additional-new-fields-to-the-above-the-sea-UI
Jan 21, 2026
Merged

MGMT-22512: Add additional new fields to the above the sea UI#3337
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
ElayAharoni:Add-additional-new-fields-to-the-above-the-sea-UI

Conversation

@ElayAharoni
Copy link
Contributor

@ElayAharoni ElayAharoni commented Dec 18, 2025

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

Summary by CodeRabbit

  • New Features

    • Added "Disconnected ISO" discovery option, static‑IP workflow pages and editor, rendezvous (controller/bootstrap) IP field, hosts network configuration (DHCP/static), proxy and additional NTP source controls, and disconnected wizard step flow.
    • Image download now opens in a new tab to initiate retrieval.
  • Documentation

    • Expanded and localized UI messages and labels for infra environment, proxy, rendezvous IP, and cluster errors.
  • Bug Fixes

    • Improved validation and translated error messages; bumped disconnected OpenShift default to 4.22.

✏️ 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 Dec 18, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 18, 2025

@ElayAharoni: This pull request references MGMT-22512 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

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 celdrake and rawagner December 18, 2025 16:43
@coderabbitai
Copy link

coderabbitai bot commented Dec 18, 2025

📝 Walkthrough

Walkthrough

Adds disconnected-image support and static-IP flows: new InfraEnv fields (rendezvousIp, hostsNetworkConfigurationType), discovery image option, disconnected static-IP wizard component and routes, OptionalConfigurationsStep infra-env payload/validation, wizard context branching, and i18n keys.

Changes

Cohort / File(s) Summary
Localization
libs/locales/lib/en/translation.json
Adds translation keys for infra-env lifecycle errors, proxy UI labels, "Optional configurations", "Rendezvous IP" and description, and related UI messages.
Type definitions
libs/types/assisted-installer-service.d.ts
Adds 'disconnected-iso' to ImageType; adds optional rendezvousIp?: string and `hostsNetworkConfigurationType?: 'dhcp'
Wizard container / routing
libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
Wraps wizard with ModalDialogsContextProvider and registers routes/steps for disconnected static-IP views (static-ip-yaml-view, static-ip-network-wide-configurations, static-ip-host-configurations).
Optional configurations (disconnected)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
Adds buildInfraEnvParams() to assemble InfraEnv payload (proxy, pullSecret, ssh key, NTP, rendezvousIp, staticNetworkConfig), introduces getValidationSchema() (Yup), extends form values and constants, and uses DISCONNECTED_IMAGE_TYPE.
Disconnected static IP UI
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx
New component managing Static IP form state, auto-save/update via InfraEnvsAPI.update, renders ClusterWizardStep with footer and navigation, exported as default.
Review step updates
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx
Changes download handling to open ISO URL in a new tab (10s fallback), shows Controller IP row when disconnectedInfraEnv?.rendezvousIp present, bumps OpenShift version to 4.22.
Basic step version bump
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx
Updates OpenShift version from 4.204.22.
Wizard context flow
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx
Adds getDisconnectedWizardStepIds, tracks disconnectedWizardStepIds, branches step resolution/update logic for disconnected vs connected flows; exposes disconnectedWizardStepIds in context type.
Discovery image types
libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx
Adds 'disconnected-iso' discovery image option and label to discoveryImageTypes.
Discovery image config form
libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
Changes imageType prop/type from ImageType to DiscoveryImageType and simplifies initialValues handling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI as OptionalConfigurationsStep (Formik)
    participant Service as ClustersService / InfraEnvsAPI
    participant API as Assisted-Installer API
    participant Wizard as ClusterWizardContextProvider

    Note over User,UI: User fills optional configs (proxy, NTP, hosts network, rendezvous IP)
    User ->> UI: submit(values)
    UI ->> UI: buildInfraEnvParams(values)
    UI ->> Service: createInfraEnv(params) / updateInfraEnv(params)
    Service ->> API: POST/PUT /infra-env (includes rendezvousIp, hostsNetworkConfigurationType, proxy, pullSecret, etc.)
    API -->> Service: 200/201 InfraEnv
    Service -->> Wizard: updated infraEnv (disconnected flow)
    Wizard ->> UI: update step list (adds Static IP sub-steps)
    UI -->> User: proceed to Static IP / Review (rendezvous IP shown)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

lgtm, size/XXL

Suggested reviewers

  • ammont82
  • rawagner

Poem

🐰 I hopped through forms and fields so bright,
Rendezvous IP and proxies set just right,
Static nets and pull secrets snug and tight,
Disconnected ISOs readied for flight,
A rabbit cheers — clusters take off tonight!

🚥 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 mentions 'Add additional new fields to the above the sea UI' which aligns with the PR's primary objective of adding proxy, NTP, network configuration, and rendezvous IP fields to the infraEnv UI, though it is somewhat vague about the specific scope.
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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 18, 2025
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 18, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 18, 2025

@ElayAharoni: This pull request references MGMT-22512 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

Summary by CodeRabbit

  • New Features

  • Added support for disconnected ISO image type.

  • Introduced optional configuration fields for proxy settings, NTP sources, and network configuration options (DHCP/static).

  • Added rendezvous IP configuration for bootstrap node communication.

  • Documentation

  • Added localized user-facing messages for infrastructure environment creation, updates, error handling, and configuration options.

✏️ 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

@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/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (1)

329-337: Consider translating the placeholder text.

The placeholder "e.g., 192.168.1.10" is hardcoded. For consistency with the internationalization approach used elsewhere in the component, consider moving this to a translation key.

Suggested change
                     <InputField
                       label={t('ai:Rendezvous IP')}
                       name="rendezvousIp"
                       helperText={t(
                         'ai:The IP address that hosts will use to communicate with the bootstrap node during installation.',
                       )}
-                      placeholder="e.g., 192.168.1.10"
+                      placeholder={t('ai:e.g., 192.168.1.10')}
                     />
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7da983 and bd21398.

📒 Files selected for processing (4)
  • libs/locales/lib/en/translation.json (8 hunks)
  • libs/types/assisted-installer-service.d.ts (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (7 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 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.
📚 Learning: 2025-12-17T09:08:07.992Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/cim/components/helpers/toAssisted.ts:199-201
Timestamp: 2025-12-17T09:08:07.992Z
Learning: In libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, the platformType field on agentClusterInstall.spec is guaranteed to always contain a valid PlatformType value (when lowercased), making the type assertion safe without additional runtime validation.

Applied to files:

  • libs/types/assisted-installer-service.d.ts
📚 Learning: 2025-09-02T08:03:57.204Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3151
File: libs/ui-lib/lib/cim/components/ClusterDeployment/constants.ts:25-25
Timestamp: 2025-09-02T08:03:57.204Z
Learning: In the openshift-assisted/assisted-installer-ui repository, non-English translations are handled separately from the main development process. When adding new translation keys to English locale files, it's expected that non-English locale files (es, fr, ja, ko, zh) may not immediately contain the corresponding translations, as these are managed through a different workflow.

Applied to files:

  • libs/locales/lib/en/translation.json
📚 Learning: 2025-10-21T04:40:36.292Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx:55-63
Timestamp: 2025-10-21T04:40:36.292Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx, the network reordering logic in the useEffect (swapping clusterNetworks and serviceNetworks based on the primary machine network's IP family) is for UI consistency only. Validation of empty or invalid CIDRs is handled separately by validation schemas, not by the reordering logic.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
🧬 Code graph analysis (2)
libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (1)
libs/ui-lib/lib/ocm/components/hosts/ModalDialogsContext.tsx (1)
  • ModalDialogsContextProvider (146-146)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (4)
libs/ui-lib/lib/common/hooks/index.ts (1)
  • useTranslation (3-3)
libs/ui-lib/lib/common/api/utils.ts (1)
  • getApiErrorMessage (53-58)
libs/types/assisted-installer-service.d.ts (2)
  • InfraEnvUpdateParams (1888-1925)
  • InfraEnvCreateParams (1834-1886)
libs/ui-lib/lib/ocm/components/clusterConfiguration/HostsNetworkConfigurationControlGroup.tsx (1)
  • HostsNetworkConfigurationControlGroup (18-66)
🔇 Additional comments (15)
libs/types/assisted-installer-service.d.ts (3)

1737-1737: LGTM: New image type for disconnected environments.

The addition of 'disconnected-iso' to the ImageType union correctly extends the type to support the new disconnected cluster installation flow.


1878-1885: LGTM: InfraEnvCreateParams extended with new fields.

The new optional fields rendezvousIp and hostsNetworkConfigurationType are well-documented with clear JSDoc comments and appropriate types. The literal union 'dhcp' | 'static' provides type safety for the network configuration option.


1917-1924: LGTM: InfraEnvUpdateParams mirrors create params.

The update params consistently include the same new fields as the create params, maintaining API symmetry.

libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (1)

9-9: LGTM: Context provider wrapping for modal dialogs.

Wrapping the wizard in ModalDialogsContextProvider is the correct pattern for enabling modal dialog context to descendant components. This enables the OptionalConfigurationsStep and other wizard steps to access modal-related functionality.

Also applies to: 27-31

libs/locales/lib/en/translation.json (1)

183-183: LGTM: Translation strings for new UI features.

The new translation keys are well-organized, follow the existing ai: namespace convention, and provide clear user-facing messages for the new infrastructure environment configuration features.

Also applies to: 213-213, 346-346, 350-350, 360-360, 566-566, 675-675, 744-744, 846-846

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (10)

45-46: LGTM: Well-defined constants with type narrowing.

Using as const assertions ensures these values are typed as literal types rather than generic strings, which provides better type safety when used with the API types.


60-84: LGTM: Clean param construction with conditional spreading.

The buildInfraEnvParams function correctly constructs the API params object, only including fields that have values. The proxy object is appropriately constructed only when at least one proxy field is provided.


86-108: LGTM: Dynamic validation schema with optional IP validation.

The validation schema correctly handles the optional rendezvousIp field—applying IP validation only when a value is provided. This allows the field to be left empty while ensuring any provided value is a valid IP address.


134-153: LGTM: Cluster fetching with proper error handling.

The effect correctly fetches the cluster data and handles errors with translated messages. The void fetchCluster() pattern properly handles the async function in useEffect.


131-166: LGTM: Sensible initial values and state management.

The editPullSecret state correctly defaults to expanded when no pull secret is available. Initial form values provide appropriate defaults, with hostsNetworkConfigurationType defaulting to DHCP as the most common use case.


171-188: LGTM: Proper custom validation with dynamic schema.

The validate function correctly builds a dynamic schema based on current values and extracts all validation errors (using abortEarly: false) into a Formik-compatible error object.


283-296: LGTM: Proxy settings with conditional display.

The proxy configuration section correctly uses the CheckboxField component with a conditional body that renders ProxyInputFields only when the checkbox is enabled.


298-321: LGTM: NTP configuration with conditional display.

The NTP sources section follows the same pattern as proxy settings, with the AdditionalNTPSourcesField rendered conditionally based on the enableNtpSources checkbox state.


323-327: LGTM: Network configuration control group.

The HostsNetworkConfigurationControlGroup is appropriately included to allow users to select between DHCP and static IP configuration.


202-211: The update params include imageType: DISCONNECTED_IMAGE_TYPE. The assisted-service backend explicitly supports updating imageType on existing InfraEnv objects through InfraEnvUpdateParams, and the code correctly follows this pattern.

@ElayAharoni ElayAharoni removed the request for review from celdrake December 18, 2025 16:47
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 18, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 18, 2025

@ElayAharoni: This pull request references MGMT-22512 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

Summary by CodeRabbit

  • New Features

  • Support for a disconnected ISO image type.

  • Optional configuration inputs for proxy settings, additional NTP sources, hosts network configuration (DHCP/static), and a rendezvous IP for bootstrap communication.

  • Documentation

  • Added localized user-facing messages for infrastructure environment creation, updates, error handling, proxy configuration, and missing/required cluster notifications.

✏️ 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.

@ElayAharoni ElayAharoni force-pushed the Add-additional-new-fields-to-the-above-the-sea-UI branch from 3db2116 to aa6525b Compare December 18, 2025 17:22
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 18, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 18, 2025

@ElayAharoni: This pull request references MGMT-22512 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

Summary by CodeRabbit

  • New Features

  • Support for a disconnected ISO image type.

  • Optional configuration inputs for proxy settings, additional NTP sources, hosts network configuration (DHCP/static), and a rendezvous IP for bootstrap communication.

  • UI wiring to surface and validate these optional configuration options during cluster setup.

  • Documentation

  • Added localized user-facing messages for infra environment creation, updates, errors, proxy configuration, and missing/required cluster notices.

✏️ 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

@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

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3db2116 and 670af24.

📒 Files selected for processing (5)
  • libs/locales/lib/en/translation.json (8 hunks)
  • libs/types/assisted-installer-service.d.ts (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx (1 hunks)
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • libs/locales/lib/en/translation.json
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-17T09:08:07.992Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/cim/components/helpers/toAssisted.ts:199-201
Timestamp: 2025-12-17T09:08:07.992Z
Learning: In libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, the platformType field on agentClusterInstall.spec is guaranteed to always contain a valid PlatformType value (when lowercased), making the type assertion safe without additional runtime validation.

Applied to files:

  • libs/types/assisted-installer-service.d.ts
🧬 Code graph analysis (1)
libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (1)
libs/ui-lib/lib/ocm/components/hosts/ModalDialogsContext.tsx (1)
  • ModalDialogsContextProvider (146-146)
⏰ 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: circular-deps
  • GitHub Check: translation-files
  • GitHub Check: format
  • GitHub Check: unit-tests
  • GitHub Check: tests
🔇 Additional comments (4)
libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (1)

9-9: LGTM! Clean context provider integration.

The ModalDialogsContextProvider wrapper correctly provides modal dialog context to the wizard subtree, enabling child components (like OptionalConfigurationsStep) to access modal functionality during the cluster creation workflow.

Also applies to: 27-31

libs/types/assisted-installer-service.d.ts (3)

1737-1737: LGTM! ImageType extended correctly.

The new 'disconnected-iso' variant is properly added to the ImageType union and aligns with the PR's objective to support disconnected ISO provisioning.


1917-1924: Same verification needed for update parameters.

The InfraEnvUpdateParams fields mirror the create parameters correctly. Apply the same verification and JSDoc comment improvements suggested for InfraEnvCreateParams.


1878-1885: No further action needed.

The new rendezvousIp and hostsNetworkConfigurationType fields in the InfraEnvCreateParams interface are well-typed as optional properties with clear JSDoc comments explaining their purpose ('dhcp' or 'static' for network configuration). The field names align with API conventions and the implementation is correct.

@ElayAharoni ElayAharoni force-pushed the Add-additional-new-fields-to-the-above-the-sea-UI branch from 670af24 to 5fba11f Compare December 18, 2025 17:46
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 18, 2025
@pawanpinjarkar
Copy link
Contributor

/hold while we confirm releasing these changes.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 18, 2025
@ElayAharoni ElayAharoni force-pushed the Add-additional-new-fields-to-the-above-the-sea-UI branch from 60816ad to acfd45f Compare December 21, 2025 09:59
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 21, 2025

@ElayAharoni: This pull request references MGMT-22512 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

Summary by CodeRabbit

  • New Features

  • Support for a disconnected ISO image type.

  • Optional configuration inputs for proxy, additional NTP sources, hosts network configuration (DHCP/static), and a rendezvous IP during cluster setup.

  • Documentation

  • Added localized user-facing messages for infra environment creation, proxy configuration, errors, and cluster notices.

  • Bug Fixes

  • Resolve merge-conflict markers in translation entries that could affect displayed text.

✏️ 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

@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: 3

🧹 Nitpick comments (3)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (3)

107-107: Inconsistent validation logic for optional IP field.

The current approach values.rendezvousIp ? ipValidationSchema : Yup.string() creates the schema based on whether the field currently has a value. This can lead to issues during validation since the schema is rebuilt each time.

A cleaner approach is to make the IP validation optional within the schema itself.

🔎 Proposed fix
-    rendezvousIp: values.rendezvousIp ? ipValidationSchema : Yup.string(),
+    rendezvousIp: Yup.string().test(
+      'valid-ip',
+      'Must be a valid IP address',
+      (value) => !value || ipValidationSchema.isValidSync(value)
+    ),

Or if ipValidationSchema supports chaining:

rendezvousIp: ipValidationSchema.optional(),

260-260: Error boundary title is not translated.

For consistency with other translated strings in this component, the error boundary title should also use the translation function.

🔎 Proposed fix
-            <WithErrorBoundary title="Failed to load Optional Configurations step">
+            <WithErrorBoundary title={t('ai:Failed to load Optional Configurations step')}>

Note: You'll need to add the corresponding key to the translation file.


329-337: Consider translating the placeholder text.

For full i18n support, the placeholder text "e.g., 192.168.1.10" could be wrapped in a translation function, though IP address examples are often kept as-is for clarity.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 670af24 and acfd45f.

📒 Files selected for processing (5)
  • libs/locales/lib/en/translation.json (8 hunks)
  • libs/types/assisted-installer-service.d.ts (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx (1 hunks)
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx
  • libs/types/assisted-installer-service.d.ts
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
🧰 Additional context used
🧠 Learnings (4)
📓 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.
📚 Learning: 2025-10-21T04:40:36.292Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx:55-63
Timestamp: 2025-10-21T04:40:36.292Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx, the network reordering logic in the useEffect (swapping clusterNetworks and serviceNetworks based on the primary machine network's IP family) is for UI consistency only. Validation of empty or invalid CIDRs is handled separately by validation schemas, not by the reordering logic.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-12-17T09:08:07.992Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/cim/components/helpers/toAssisted.ts:199-201
Timestamp: 2025-12-17T09:08:07.992Z
Learning: In libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, the platformType field on agentClusterInstall.spec is guaranteed to always contain a valid PlatformType value (when lowercased), making the type assertion safe without additional runtime validation.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-09-02T08:03:57.204Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3151
File: libs/ui-lib/lib/cim/components/ClusterDeployment/constants.ts:25-25
Timestamp: 2025-09-02T08:03:57.204Z
Learning: In the openshift-assisted/assisted-installer-ui repository, non-English translations are handled separately from the main development process. When adding new translation keys to English locale files, it's expected that non-English locale files (es, fr, ja, ko, zh) may not immediately contain the corresponding translations, as these are managed through a different workflow.

Applied to files:

  • libs/locales/lib/en/translation.json
⏰ 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: unit-tests
  • GitHub Check: format
  • GitHub Check: lint
  • GitHub Check: translation-files
  • GitHub Check: tests
  • GitHub Check: circular-deps
🔇 Additional comments (4)
libs/locales/lib/en/translation.json (1)

186-186: New translation keys are well-structured.

The new translation keys for infrastructure environment configuration, proxy settings, and rendezvous IP follow the established ai: prefix convention and are properly formatted.

Also applies to: 218-218, 351-351, 355-355, 574-574, 683-683, 753-753, 855-855

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (3)

134-153: LGTM - Cluster fetch with proper error handling.

The async fetch with error handling and translated error messages follows good practices.


171-188: LGTM - Custom validation handler.

The validation function correctly uses validateSync with abortEarly: false to collect all errors and maps them to Formik's error format.


189-238: LGTM - Well-structured submit handler.

The submit logic properly handles both create and update flows with appropriate error handling and translated messages.

@ElayAharoni ElayAharoni force-pushed the Add-additional-new-fields-to-the-above-the-sea-UI branch from acfd45f to c426664 Compare December 21, 2025 10:07
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 21, 2025

@ElayAharoni: This pull request references MGMT-22512 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

Summary by CodeRabbit

  • New Features

  • Support for a disconnected ISO image type.

  • Optional configuration inputs: proxy, additional NTP sources, hosts network config (DHCP/static), and a rendezvous IP during cluster setup.

  • Documentation

  • Added localized user-facing messages for infra environment creation, proxy configuration, errors, and cluster notices.

  • Bug Fixes

  • Resolved translation merge-conflict markers that could affect displayed text.

✏️ 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.

@ElayAharoni ElayAharoni force-pushed the Add-additional-new-fields-to-the-above-the-sea-UI branch from c426664 to 57fe300 Compare December 21, 2025 10:40
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 21, 2025

@ElayAharoni: This pull request references MGMT-22512 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

Summary by CodeRabbit

  • New Features

  • Added support for a disconnected ISO image type.

  • New optional configuration inputs during cluster setup: proxy settings, additional NTP sources, hosts network configuration (DHCP/static), and a rendezvous IP.

  • Documentation

  • Added localized user-facing messages for infra environment creation, proxy configuration, errors, and cluster notices.

  • Bug Fixes

  • Fixed translation issues that could affect displayed text.

✏️ 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

@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 (1)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (1)

80-82: Static network configuration uses placeholder data.

This is a known issue from past reviews. When hostsNetworkConfigurationType is STATIC, the code uses getDummyInfraEnvField() which returns placeholder data rather than actual user-provided configuration. Consider either:

  1. Adding form fields to collect actual static network configuration values
  2. Hiding/disabling the STATIC option until the feature is complete
  3. Adding a TODO comment explaining the incomplete state
🧹 Nitpick comments (2)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (2)

104-108: Conditional IP validation may cause unexpected behavior.

The conditional values.rendezvousIp ? ipValidationSchema : Yup.string() means validation only applies when the field has a value. However, this approach recalculates the schema on every keystroke, which could cause validation flicker. Consider using a consistent schema that allows empty strings:

🔎 Proposed fix
-    rendezvousIp: values.rendezvousIp ? ipValidationSchema : Yup.string(),
+    rendezvousIp: Yup.string().test(
+      'ip-validation',
+      'Not a valid IP address',
+      (value) => !value || Address4.isValid(value) || Address6.isValid(value),
+    ),

Note: You'll need to import Address4 and Address6 from ip-address package, or create a helper that wraps ipValidationSchema to allow empty values.


45-46: Consider exporting constants for reuse.

DEFAULT_CPU_ARCHITECTURE and DISCONNECTED_IMAGE_TYPE could be useful in other parts of the codebase. Consider exporting them or moving to a shared constants file.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c426664 and 57fe300.

📒 Files selected for processing (6)
  • libs/locales/lib/en/translation.json (8 hunks)
  • libs/types/assisted-installer-service.d.ts (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx (1 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx
🧰 Additional context used
🧠 Learnings (5)
📓 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.
📚 Learning: 2025-10-21T04:40:36.292Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx:55-63
Timestamp: 2025-10-21T04:40:36.292Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx, the network reordering logic in the useEffect (swapping clusterNetworks and serviceNetworks based on the primary machine network's IP family) is for UI consistency only. Validation of empty or invalid CIDRs is handled separately by validation schemas, not by the reordering logic.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-12-17T09:08:07.992Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/cim/components/helpers/toAssisted.ts:199-201
Timestamp: 2025-12-17T09:08:07.992Z
Learning: In libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, the platformType field on agentClusterInstall.spec is guaranteed to always contain a valid PlatformType value (when lowercased), making the type assertion safe without additional runtime validation.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/types/assisted-installer-service.d.ts
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-09-02T08:03:57.204Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3151
File: libs/ui-lib/lib/cim/components/ClusterDeployment/constants.ts:25-25
Timestamp: 2025-09-02T08:03:57.204Z
Learning: In the openshift-assisted/assisted-installer-ui repository, non-English translations are handled separately from the main development process. When adding new translation keys to English locale files, it's expected that non-English locale files (es, fr, ja, ko, zh) may not immediately contain the corresponding translations, as these are managed through a different workflow.

Applied to files:

  • libs/locales/lib/en/translation.json
📚 Learning: 2025-10-21T04:53:07.362Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx:71-91
Timestamp: 2025-10-21T04:53:07.362Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx, dual-stack mode requires both IPv4 and IPv6 networks (machineNetworks must have at least 2 entries: one IPv4 and one IPv6). Dual-stack with only IPv6 is not supported—dual-stack must have both IP families present.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
🧬 Code graph analysis (2)
libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (1)
libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx (1)
  • RenderableDiscoveryImageType (19-19)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (4)
libs/ui-lib/lib/common/hooks/index.ts (1)
  • useTranslation (3-3)
libs/ui-lib/lib/common/api/utils.ts (2)
  • getApiErrorMessage (53-58)
  • handleApiError (19-51)
libs/ui-lib/lib/common/components/clusterConfiguration/index.ts (1)
  • ProxyInputFields (2-2)
libs/ui-lib/lib/ocm/components/clusterConfiguration/HostsNetworkConfigurationControlGroup.tsx (1)
  • HostsNetworkConfigurationControlGroup (18-66)
⏰ 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: translation-files
  • GitHub Check: format
  • GitHub Check: circular-deps
  • GitHub Check: unit-tests
  • GitHub Check: tests
🔇 Additional comments (5)
libs/types/assisted-installer-service.d.ts (1)

1737-1737: LGTM!

The type definitions are well-structured and consistent. The new 'disconnected-iso' image type and the rendezvousIp/hostsNetworkConfigurationType fields in both InfraEnvCreateParams and InfraEnvUpdateParams align with the PR objectives for disconnected installation support. The JSDoc comments clearly describe each field's purpose.

Also applies to: 1878-1885, 1917-1924

libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (1)

37-40: LGTM!

The migration from ImageType to RenderableDiscoveryImageType for the props is appropriate. This type excludes 'disconnected-iso' since that image type is handled through a separate flow (the new OptionalConfigurationsStep), while the internal OcmImageCreateParams interface retains the broader DiscoveryImageType for API compatibility.

Also applies to: 75-75, 109-109

libs/locales/lib/en/translation.json (1)

186-186: LGTM!

The new translation keys are well-organized, follow the existing "ai:" prefix convention, and provide clear user-facing messages for the infrastructure environment configuration flow. The merge conflict markers from the previous review have been resolved.

Also applies to: 218-218, 351-351, 355-355, 365-366, 571-571, 680-680, 750-750, 852-852

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (2)

189-237: Well-structured submission logic with proper error handling.

The form submission logic properly:

  • Validates cluster existence before proceeding
  • Distinguishes between create and update flows
  • Uses translated error messages
  • Handles API errors consistently with handleApiError and getApiErrorMessage

283-337: UI components are well-organized with appropriate conditional rendering.

The new form sections for proxy settings, NTP configuration, network configuration, and rendezvous IP follow the existing patterns in the codebase. The conditional rendering based on checkbox states (values.enableProxy, values.enableNtpSources) prevents unnecessary field clutter.

@ElayAharoni ElayAharoni force-pushed the Add-additional-new-fields-to-the-above-the-sea-UI branch from f4df023 to 7a764d1 Compare December 29, 2025 13:35
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 29, 2025

@ElayAharoni: This pull request references MGMT-22512 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

Summary by CodeRabbit

  • New Features

  • Added "Disconnected ISO" discovery option, static‑IP workflow pages, a static IP editor, and UI fields for proxy, additional NTP sources, hosts network configuration (DHCP/static) and rendezvous (controller/bootstrap) IP.

  • Image download now opens in a new tab to initiate retrieval.

  • Documentation

  • Expanded and localized UI messages and labels for infra environment, proxy, rendezvous IP, and cluster errors.

  • Bug Fixes

  • Improved validation and translated error messages; bumped OpenShift default for disconnected flow to 4.22.

✏️ 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

@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

♻️ Duplicate comments (4)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx (1)

46-46: Verify OpenShift version consistency across wizard steps.

The version is hardcoded to '4.22' here and at line 101. A past review flagged inconsistency with ReviewStep showing '4.21'. Please confirm ReviewStep has been updated to match, or extract this version into a shared constant to prevent drift.

#!/bin/bash
# Check OpenShift version references across disconnected wizard files
rg -n "openshiftVersion|4\.2[0-9]" libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ --type ts --type tsx 2>/dev/null || rg -n "openshiftVersion|4\.2[0-9]" libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (2)

77-81: Static network configuration uses placeholder data.

The getDummyInfraEnvField() returns hardcoded placeholder data when users select static network configuration. The comment indicates this is intentional for StaticIpPage rendering, but consider adding a more explicit TODO or feature flag if this is incomplete functionality.

Is this the intended behavior for the current milestone? If the static IP form in subsequent steps collects and persists actual configuration, this dummy initialization may be acceptable as a bootstrap value.


60-83: Add hostsNetworkConfigurationType to the API payload.

The hostsNetworkConfigurationType field is collected from the form but never included in the params sent to the API. According to the type definitions, this should be a top-level field in InfraEnvCreateParams/InfraEnvUpdateParams.

🔎 Proposed fix
   return {
     pullSecret: values.pullSecret,
     ...(values.sshPublicKey && { sshAuthorizedKey: values.sshPublicKey }),
     ...(hasProxy && { proxy }),
     ...(values.additionalNtpSources && {
       additionalNtpSources: values.additionalNtpSources,
     }),
     ...(values.rendezvousIp && { rendezvousIp: values.rendezvousIp }),
+    hostsNetworkConfigurationType: values.hostsNetworkConfigurationType,
     // Initialize with dummy static network config when static IP is selected
     // This is required for the StaticIpPage to render properly
     ...(values.hostsNetworkConfigurationType === HostsNetworkConfigurationType.STATIC && {
       staticNetworkConfig: getDummyInfraEnvField(),
     }),
   };
libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx (1)

23-23: New option defined but not rendered in dropdown.

The 'disconnected-iso' entry is added to discoveryImageTypes but is not included in the dropdownItems array (lines 47-84). Users cannot select this option from the UI.

🔎 Proposed fix - add the missing dropdown item
     {discoveryImageTypes['discovery-image-ipxe']}
   </DropdownItem>,
+  <Divider component="li" key="separator3" />,
+  <DropdownItem
+    key="disconnected-iso"
+    id="disconnected-iso"
+    description={'Use when provisioning from a disconnected environment'}
+    value={discoveryImageTypes['disconnected-iso']}
+  >
+    {discoveryImageTypes['disconnected-iso']}
+  </DropdownItem>,
 ];

If the disconnected-iso option should only appear in specific contexts (e.g., disconnected wizard only), consider conditionally including it based on a prop or context flag.

🧹 Nitpick comments (2)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (1)

170-187: Consider using Yup's validateSync with context for cleaner validation.

The custom validate function works but rebuilds the schema on every validation call. Since getValidationSchema depends on values, this is unavoidable with the current approach. However, this pattern is acceptable for forms with conditional validation requirements.

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx (1)

35-42: Improve error handling for missing infraEnv.

The updateInfraEnv function throws a generic Error if disconnectedInfraEnv?.id is missing. Since this is an async function passed to StaticIpPage, the error may surface as an unhandled promise rejection depending on how StaticIpPage handles it.

🔎 Consider handling this more gracefully
 const updateInfraEnv = async (params: InfraEnvUpdateParams) => {
   if (!disconnectedInfraEnv?.id) {
-    throw new Error('No disconnected infraEnv available');
+    // This shouldn't happen as component returns null when disconnectedInfraEnv is missing
+    console.error('updateInfraEnv called without disconnectedInfraEnv');
+    throw new Error('No disconnected infraEnv available');
   }
   const { data: updatedInfraEnv } = await InfraEnvsAPI.update(disconnectedInfraEnv.id, params);
   setDisconnectedInfraEnv(updatedInfraEnv);
   return updatedInfraEnv;
 };

Alternatively, ensure StaticIpPage wraps calls to updateInfraEnv in try-catch and surfaces errors via the form state or alerts.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f4df023 and 7a764d1.

📒 Files selected for processing (10)
  • libs/locales/lib/en/translation.json
  • libs/types/assisted-installer-service.d.ts
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • libs/types/assisted-installer-service.d.ts
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/locales/lib/en/translation.json
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-10-21T04:40:36.292Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx:55-63
Timestamp: 2025-10-21T04:40:36.292Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx, the network reordering logic in the useEffect (swapping clusterNetworks and serviceNetworks based on the primary machine network's IP family) is for UI consistency only. Validation of empty or invalid CIDRs is handled separately by validation schemas, not by the reordering logic.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
📚 Learning: 2025-12-17T09:08:18.279Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/cim/components/helpers/toAssisted.ts:199-201
Timestamp: 2025-12-17T09:08:18.279Z
Learning: In libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, the platformType field on agentClusterInstall.spec is guaranteed to always contain a valid PlatformType value (when lowercased), making the type assertion safe without additional runtime validation.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-10-21T04:53:07.362Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx:71-91
Timestamp: 2025-10-21T04:53:07.362Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx, dual-stack mode requires both IPv4 and IPv6 networks (machineNetworks must have at least 2 entries: one IPv4 and one IPv6). Dual-stack with only IPv6 is not supported—dual-stack must have both IP families present.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-12-17T09:16:41.439Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/common/components/hosts/utils.ts:208-210
Timestamp: 2025-12-17T09:16:41.439Z
Learning: In libs/ui-lib/lib/common/components/hosts/utils.ts, the nodeLabels field on Host objects is guaranteed to be valid JSON because it's always constructed using JSON.stringify in libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, making direct JSON.parse safe without additional error handling.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
🧬 Code graph analysis (1)
libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (1)
libs/ui-lib/lib/ocm/components/hosts/ModalDialogsContext.tsx (1)
  • ModalDialogsContextProvider (146-146)
⏰ 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: circular-deps
  • GitHub Check: format
  • GitHub Check: lint
  • GitHub Check: tests
  • GitHub Check: unit-tests
🔇 Additional comments (6)
libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (2)

20-23: LGTM!

The routing correctly maps all three static IP step IDs to the DisconnectedStaticIp component. The StaticIpPage component rendered inside handles the internal step transitions based on the current step ID from context.


32-36: LGTM!

Wrapping with ModalDialogsContextProvider is appropriate here to enable modal dialog functionality (e.g., for static IP configuration modals) within the wizard without prop drilling.

libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx (2)

79-104: LGTM!

The getDisconnectedWizardStepIds helper correctly mirrors the connected flow logic while inserting static IP steps after 'disconnected-optional-configurations' instead of 'cluster-details'. The additional cleanup on line 100 (removing yaml-view when dhcp-selected) ensures no orphaned steps remain.


279-313: LGTM!

The onUpdateHostNetworkConfigType handler correctly branches between connected and disconnected flows, applying the appropriate step ID updaters. This maintains consistency with the dual-path architecture introduced in this PR.

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx (2)

44-46: LGTM!

The isNextDisabled logic correctly prevents navigation when auto-save is running, form is invalid, alerts are present, or submission is in progress. This provides a good UX by preventing premature navigation.


61-75: LGTM!

The early return when disconnectedInfraEnv is missing prevents rendering the step without required data. The StaticIpPage integration with infraEnv, updateInfraEnv, and onFormStateChange follows the expected pattern for this component.

@ElayAharoni ElayAharoni force-pushed the Add-additional-new-fields-to-the-above-the-sea-UI branch from 7a764d1 to b57c1b7 Compare December 31, 2025 10:20
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 31, 2025

@ElayAharoni: This pull request references MGMT-22512 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

Summary by CodeRabbit

  • New Features

  • Added "Disconnected ISO" discovery option, static‑IP workflow pages and editor, rendezvous (controller/bootstrap) IP field, hosts network configuration (DHCP/static), proxy and additional NTP source controls, and disconnected wizard step flow.

  • Image download now opens in a new tab to initiate retrieval.

  • Documentation

  • Expanded and localized UI messages and labels for infra environment, proxy, rendezvous IP, and cluster errors.

  • Bug Fixes

  • Improved validation and translated error messages; bumped OpenShift default for disconnected flow to 4.22.

✏️ 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

@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

♻️ Duplicate comments (3)
libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx (1)

19-24: New dropdown option is defined but not rendered in the UI.

The 'disconnected-iso' entry is added to discoveryImageTypes at line 23, but no corresponding DropdownItem is added to the dropdownItems array (lines 47-84). Users cannot select this option from the dropdown.

Additionally, the onSelect handler (line 91) only checks for 'discovery-image-ipxe' in the onChange callback - if 'disconnected-iso' requires similar special handling, this also needs updating.

🔎 Proposed fix to add the missing dropdown item
     {discoveryImageTypes['discovery-image-ipxe']}
   </DropdownItem>,
+  <Divider component="li" key="separator3" />,
+  <DropdownItem
+    key="disconnected-iso"
+    id="disconnected-iso"
+    description={'Use when provisioning from a disconnected environment'}
+    value={discoveryImageTypes['disconnected-iso']}
+  >
+    {discoveryImageTypes['disconnected-iso']}
+  </DropdownItem>,
 ];
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (2)

77-81: Static network configuration uses placeholder data as initialization.

The comment explains this is intentional - the dummy config initializes the infraEnv so that StaticIpPage in the subsequent wizard step (DisconnectedStaticIp) can render and allow users to configure the actual static IP values. This is a valid multi-step wizard pattern.

However, ensure the DisconnectedStaticIp component properly updates the staticNetworkConfig with real values before the wizard completes.

#!/bin/bash
# Verify that StaticIpPage updates staticNetworkConfig with actual values
rg -n "staticNetworkConfig|updateInfraEnv" libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.tsx -A 3 -B 1

60-83: hostsNetworkConfigurationType field is not included in the API params.

The buildInfraEnvParams function validates hostsNetworkConfigurationType (line 103-105) but never includes it in the returned params object. According to the type definitions, hostsNetworkConfigurationType should be a top-level field in InfraEnvCreateParams and InfraEnvUpdateParams.

🔎 Proposed fix
 const buildInfraEnvParams = (values: OptionalConfigurationsFormValues) => {
   // Build proxy object - only include fields that have values
   const proxy = {
     ...(values.httpProxy && { httpProxy: values.httpProxy }),
     ...(values.httpsProxy && { httpsProxy: values.httpsProxy }),
     ...(values.noProxy && { noProxy: values.noProxy }),
   };
   const hasProxy = Object.keys(proxy).length > 0;

   return {
     pullSecret: values.pullSecret,
     ...(values.sshPublicKey && { sshAuthorizedKey: values.sshPublicKey }),
     ...(hasProxy && { proxy }),
     ...(values.additionalNtpSources && {
       additionalNtpSources: values.additionalNtpSources,
     }),
     ...(values.rendezvousIp && { rendezvousIp: values.rendezvousIp }),
+    hostsNetworkConfigurationType: values.hostsNetworkConfigurationType,
     // Initialize with dummy static network config when static IP is selected
     // This is required for the StaticIpPage to render properly
     ...(values.hostsNetworkConfigurationType === HostsNetworkConfigurationType.STATIC && {
       staticNetworkConfig: getDummyInfraEnvField(),
     }),
   };
 };
🧹 Nitpick comments (2)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx (1)

61-63: Consider showing a loading state instead of returning null.

When disconnectedInfraEnv is undefined, the component returns null, which may cause a brief blank screen. Consider rendering a loading spinner or skeleton to improve user experience.

libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx (1)

279-313: Consider reducing duplication in onUpdateHostNetworkConfigType.

The STATIC and DHCP branches have identical structure in both connected and disconnected flows. This could be simplified by extracting the common pattern.

🔎 Proposed refactor
 onUpdateHostNetworkConfigType(type: HostsNetworkConfigurationType): void {
-  if (installDisconnected) {
-    // For disconnected wizard, update wizard steps (same pattern as connected)
-    if (type === HostsNetworkConfigurationType.STATIC) {
-      setDisconnectedWizardStepIds(
-        getDisconnectedWizardStepIds(disconnectedWizardStepIds, StaticIpView.FORM),
-      );
-    } else {
-      setDisconnectedWizardStepIds(
-        getDisconnectedWizardStepIds(disconnectedWizardStepIds, 'dhcp-selected'),
-      );
-    }
+  const staticIpView = type === HostsNetworkConfigurationType.STATIC
+    ? StaticIpView.FORM
+    : 'dhcp-selected';
+
+  if (installDisconnected) {
+    setDisconnectedWizardStepIds(
+      getDisconnectedWizardStepIds(disconnectedWizardStepIds, staticIpView),
+    );
   } else {
-    // For connected wizard, update wizard steps directly
-    if (type === HostsNetworkConfigurationType.STATIC) {
-      setWizardStepIds(
-        getWizardStepIds(
-          wizardStepIds,
-          StaticIpView.FORM,
-          customManifestsStep,
-          isSingleClusterFeatureEnabled,
-        ),
-      );
-    } else {
-      setWizardStepIds(
-        getWizardStepIds(
-          wizardStepIds,
-          'dhcp-selected',
-          customManifestsStep,
-          isSingleClusterFeatureEnabled,
-        ),
-      );
-    }
+    setWizardStepIds(
+      getWizardStepIds(
+        wizardStepIds,
+        staticIpView,
+        customManifestsStep,
+        isSingleClusterFeatureEnabled,
+      ),
+    );
   }
 },
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a764d1 and b57c1b7.

📒 Files selected for processing (10)
  • libs/locales/lib/en/translation.json
  • libs/types/assisted-installer-service.d.ts
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx
🚧 Files skipped from review as they are similar to previous changes (6)
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx
  • libs/locales/lib/en/translation.json
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx
  • libs/types/assisted-installer-service.d.ts
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
🧰 Additional context used
🧠 Learnings (5)
📓 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.
📚 Learning: 2025-10-21T04:40:36.292Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx:55-63
Timestamp: 2025-10-21T04:40:36.292Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx, the network reordering logic in the useEffect (swapping clusterNetworks and serviceNetworks based on the primary machine network's IP family) is for UI consistency only. Validation of empty or invalid CIDRs is handled separately by validation schemas, not by the reordering logic.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-12-17T09:08:18.279Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/cim/components/helpers/toAssisted.ts:199-201
Timestamp: 2025-12-17T09:08:18.279Z
Learning: In libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, the platformType field on agentClusterInstall.spec is guaranteed to always contain a valid PlatformType value (when lowercased), making the type assertion safe without additional runtime validation.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-10-21T04:53:07.362Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx:71-91
Timestamp: 2025-10-21T04:53:07.362Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx, dual-stack mode requires both IPv4 and IPv6 networks (machineNetworks must have at least 2 entries: one IPv4 and one IPv6). Dual-stack with only IPv6 is not supported—dual-stack must have both IP families present.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-12-17T09:16:41.439Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/common/components/hosts/utils.ts:208-210
Timestamp: 2025-12-17T09:16:41.439Z
Learning: In libs/ui-lib/lib/common/components/hosts/utils.ts, the nodeLabels field on Host objects is guaranteed to be valid JSON because it's always constructed using JSON.stringify in libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, making direct JSON.parse safe without additional error handling.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
🧬 Code graph analysis (2)
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx (3)
libs/ui-lib/lib/ocm/components/clusterWizard/wizardTransition.ts (2)
  • ClusterWizardStepsType (21-35)
  • disconnectedSteps (51-55)
libs/ui-lib/lib/ocm/components/clusterWizard/constants.ts (1)
  • staticIpFormViewSubSteps (29-32)
libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/fromInfraEnv.ts (1)
  • getStaticIpInfo (54-60)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (6)
libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/dummyData.ts (1)
  • getDummyInfraEnvField (82-87)
libs/ui-lib/lib/common/hooks/index.ts (1)
  • useTranslation (3-3)
libs/ui-lib/lib/common/api/utils.ts (2)
  • getApiErrorMessage (53-58)
  • handleApiError (19-51)
libs/ui-lib/lib/ocm/services/apis/index.ts (1)
  • InfraEnvsAPI (7-7)
libs/ui-lib/lib/common/components/clusterConfiguration/index.ts (1)
  • ProxyInputFields (2-2)
libs/ui-lib/lib/ocm/components/clusterConfiguration/HostsNetworkConfigurationControlGroup.tsx (1)
  • HostsNetworkConfigurationControlGroup (18-66)
⏰ 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: tests
  • GitHub Check: format
  • GitHub Check: unit-tests
  • GitHub Check: circular-deps
  • GitHub Check: lint
  • GitHub Check: translation-files
🔇 Additional comments (4)
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx (1)

79-104: Well-structured parallel implementation for disconnected flow.

The getDisconnectedWizardStepIds function correctly mirrors the getWizardStepIds logic while adapting the insertion point to 'disconnected-optional-configurations'. The dhcp-selected branch properly cleans up both static IP step types.

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (3)

106-110: Good fix for rendezvousIp validation.

The .test() approach correctly handles the optional IP field - it allows empty values while validating non-empty inputs against ipValidationSchema. This addresses the concern from the previous review about schema evaluation timing.


125-169: Initial values and form setup look correct.

The component correctly:

  • Initializes editPullSecret based on pull secret availability (line 135)
  • Sets reasonable defaults for all form fields (lines 158-169)
  • Uses HostsNetworkConfigurationType.DHCP as the default network config type

337-340: No action needed—HostsNetworkConfigurationControlGroup correctly wires the form field internally.

The component uses Formik's useField hook with the hardcoded field name 'hostsNetworkConfigurationType' (line 24), eliminating the need for an explicit name prop from the parent. The form field is automatically bound to the correct schema field through this mechanism.

Likely an incorrect or invalid review comment.

@ElayAharoni ElayAharoni force-pushed the Add-additional-new-fields-to-the-above-the-sea-UI branch from b57c1b7 to f263c5a Compare December 31, 2025 11:19
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 (2)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (2)

77-81: Acknowledge the dummy data usage is intentional for workflow initialization.

The comment explains that getDummyInfraEnvField() is required for the StaticIpPage to render properly. This appears to be intentional scaffolding that gets replaced with actual configuration in subsequent wizard steps (static-ip-yaml-view, static-ip-network-wide-configurations, static-ip-host-configurations).

Please confirm that the actual static network configuration is captured and persisted in the DisconnectedStaticIp component that handles those subsequent steps.


60-83: Critical: hostsNetworkConfigurationType is not included in the API params.

The buildInfraEnvParams function builds configuration but omits the hostsNetworkConfigurationType field. According to the type definitions in assisted-installer-service.d.ts (lines 1889-1890 and 1930-1931), this should be a top-level field in both InfraEnvCreateParams and InfraEnvUpdateParams.

🔎 Proposed fix
 const buildInfraEnvParams = (values: OptionalConfigurationsFormValues) => {
   // Build proxy object - only include fields that have values
   const proxy = {
     ...(values.httpProxy && { httpProxy: values.httpProxy }),
     ...(values.httpsProxy && { httpsProxy: values.httpsProxy }),
     ...(values.noProxy && { noProxy: values.noProxy }),
   };
   const hasProxy = Object.keys(proxy).length > 0;

   return {
     pullSecret: values.pullSecret,
     ...(values.sshPublicKey && { sshAuthorizedKey: values.sshPublicKey }),
     ...(hasProxy && { proxy }),
     ...(values.additionalNtpSources && {
       additionalNtpSources: values.additionalNtpSources,
     }),
     ...(values.rendezvousIp && { rendezvousIp: values.rendezvousIp }),
+    hostsNetworkConfigurationType: values.hostsNetworkConfigurationType,
     // Initialize with dummy static network config when static IP is selected
     // This is required for the StaticIpPage to render properly
     ...(values.hostsNetworkConfigurationType === HostsNetworkConfigurationType.STATIC && {
       staticNetworkConfig: getDummyInfraEnvField(),
     }),
   };
 };
🧹 Nitpick comments (1)
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx (1)

279-313: Consider extracting the step update logic to reduce duplication.

The connected and disconnected branches share similar patterns. This could be simplified, though it's not critical.

🔎 Optional refactor for reduced duplication
 onUpdateHostNetworkConfigType(type: HostsNetworkConfigurationType): void {
+  const view = type === HostsNetworkConfigurationType.STATIC 
+    ? StaticIpView.FORM 
+    : 'dhcp-selected';
+  
   if (installDisconnected) {
-    if (type === HostsNetworkConfigurationType.STATIC) {
-      setDisconnectedWizardStepIds(
-        getDisconnectedWizardStepIds(disconnectedWizardStepIds, StaticIpView.FORM),
-      );
-    } else {
-      setDisconnectedWizardStepIds(
-        getDisconnectedWizardStepIds(disconnectedWizardStepIds, 'dhcp-selected'),
-      );
-    }
+    setDisconnectedWizardStepIds(
+      getDisconnectedWizardStepIds(disconnectedWizardStepIds, view),
+    );
   } else {
-    if (type === HostsNetworkConfigurationType.STATIC) {
-      setWizardStepIds(
-        getWizardStepIds(
-          wizardStepIds,
-          StaticIpView.FORM,
-          customManifestsStep,
-          isSingleClusterFeatureEnabled,
-        ),
-      );
-    } else {
-      setWizardStepIds(
-        getWizardStepIds(
-          wizardStepIds,
-          'dhcp-selected',
-          customManifestsStep,
-          isSingleClusterFeatureEnabled,
-        ),
-      );
-    }
+    setWizardStepIds(
+      getWizardStepIds(
+        wizardStepIds,
+        view,
+        customManifestsStep,
+        isSingleClusterFeatureEnabled,
+      ),
+    );
   }
 },
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b57c1b7 and f263c5a.

📒 Files selected for processing (10)
  • libs/locales/lib/en/translation.json
  • libs/types/assisted-installer-service.d.ts
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx
🚧 Files skipped from review as they are similar to previous changes (7)
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx
  • libs/locales/lib/en/translation.json
  • libs/types/assisted-installer-service.d.ts
🧰 Additional context used
🧠 Learnings (5)
📓 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.
📚 Learning: 2025-10-21T04:40:36.292Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx:55-63
Timestamp: 2025-10-21T04:40:36.292Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx, the network reordering logic in the useEffect (swapping clusterNetworks and serviceNetworks based on the primary machine network's IP family) is for UI consistency only. Validation of empty or invalid CIDRs is handled separately by validation schemas, not by the reordering logic.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
📚 Learning: 2025-12-17T09:08:18.279Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/cim/components/helpers/toAssisted.ts:199-201
Timestamp: 2025-12-17T09:08:18.279Z
Learning: In libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, the platformType field on agentClusterInstall.spec is guaranteed to always contain a valid PlatformType value (when lowercased), making the type assertion safe without additional runtime validation.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-10-21T04:53:07.362Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx:71-91
Timestamp: 2025-10-21T04:53:07.362Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx, dual-stack mode requires both IPv4 and IPv6 networks (machineNetworks must have at least 2 entries: one IPv4 and one IPv6). Dual-stack with only IPv6 is not supported—dual-stack must have both IP families present.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-12-17T09:16:41.439Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/common/components/hosts/utils.ts:208-210
Timestamp: 2025-12-17T09:16:41.439Z
Learning: In libs/ui-lib/lib/common/components/hosts/utils.ts, the nodeLabels field on Host objects is guaranteed to be valid JSON because it's always constructed using JSON.stringify in libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, making direct JSON.parse safe without additional error handling.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
🧬 Code graph analysis (3)
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx (3)
libs/ui-lib/lib/ocm/components/clusterWizard/wizardTransition.ts (2)
  • ClusterWizardStepsType (21-35)
  • disconnectedSteps (51-55)
libs/ui-lib/lib/ocm/components/clusterWizard/constants.ts (1)
  • staticIpFormViewSubSteps (29-32)
libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/fromInfraEnv.ts (1)
  • getStaticIpInfo (54-60)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (6)
libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/dummyData.ts (1)
  • getDummyInfraEnvField (82-87)
libs/ui-lib/lib/common/hooks/index.ts (1)
  • useTranslation (3-3)
libs/ui-lib/lib/common/api/utils.ts (2)
  • getApiErrorMessage (53-58)
  • handleApiError (19-51)
libs/ui-lib/lib/common/api/assisted-service/EventsAPI.ts (1)
  • createParams (21-48)
libs/ui-lib/lib/common/components/clusterConfiguration/index.ts (1)
  • ProxyInputFields (2-2)
libs/ui-lib/lib/ocm/components/clusterConfiguration/HostsNetworkConfigurationControlGroup.tsx (1)
  • HostsNetworkConfigurationControlGroup (18-66)
libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (1)
libs/ui-lib/lib/ocm/components/hosts/ModalDialogsContext.tsx (1)
  • ModalDialogsContextProvider (146-146)
⏰ 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: tests
  • GitHub Check: format
  • GitHub Check: circular-deps
  • GitHub Check: translation-files
  • GitHub Check: unit-tests
  • GitHub Check: lint
🔇 Additional comments (8)
libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (2)

20-23: Clean fall-through pattern for static IP steps.

The shared rendering of DisconnectedStaticIp for all three static-ip steps is appropriate since the component likely handles internal navigation between these sub-steps.


32-36: LGTM - ModalDialogsContextProvider integration.

Wrapping the wizard content with ModalDialogsContextProvider appropriately enables modal dialog support for the disconnected static IP workflow.

libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx (2)

79-104: LGTM - Disconnected wizard step management.

The getDisconnectedWizardStepIds function correctly mirrors the connected flow logic, inserting static IP steps after disconnected-optional-configurations instead of cluster-details. The dhcp-selected case properly removes all static IP steps.


195-219: The guard is already implemented at line 198.

The code already contains the defensive check you're suggesting. The ternary operator currentInfraEnv ? getStaticIpInfo(currentInfraEnv) : undefined on line 198 prevents calling getStaticIpInfo() when currentInfraEnv is undefined. If currentInfraEnv is undefined, staticIpInfo is set to undefined, which then triggers the clear error message on lines 200-201: "Wizard step is currently ${currentStepId}, but no static ip info is defined". No additional guard is needed.

Likely an incorrect or invalid review comment.

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (4)

106-112: Rendezvous IP validation is correctly implemented.

The validation now uses a .test() pattern that properly handles the optional nature of the field - validating IP format only when a value is present, and allowing empty values.


173-185: Consider whether showing all validation errors on mount is the intended UX.

Setting all fields as touched initially (initialTouched) combined with validateOnMount will show validation errors immediately when the form loads. This is unconventional and may be jarring for optional fields. Typically, validation errors are shown after user interaction.

Is this the intended design? If not, consider removing initialTouched and validateOnMount to follow standard form validation patterns where errors appear after blur/submit.


220-246: Verify the spread order in createParams.

The commonParams is spread after the explicit fields in createParams. This is correct, but ensure that commonParams doesn't accidentally override clusterId, openshiftVersion, etc. if those fields were ever added to buildInfraEnvParams.


296-305: LGTM - Rendezvous IP field implementation.

The field is properly configured with appropriate label, helper text, placeholder, and max length matching the validation schema (45 characters for IPv6).

Signed-off-by: Elay Aharoni <elayaha@gmail.com>
@ElayAharoni ElayAharoni force-pushed the Add-additional-new-fields-to-the-above-the-sea-UI branch from f263c5a to f879e66 Compare January 8, 2026 13:44
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 8, 2026

@ElayAharoni: This pull request references MGMT-22512 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

fixes:
https://issues.redhat.com/browse/MGMT-22512

added proxy, NTP, network config, and rendezvous IP to the Above-the-sea UI.
with validations and sen the right API to create the infraEnv

Summary by CodeRabbit

  • New Features

  • Added "Disconnected ISO" discovery option, static‑IP workflow pages and editor, rendezvous (controller/bootstrap) IP field, hosts network configuration (DHCP/static), proxy and additional NTP source controls, and disconnected wizard step flow.

  • Image download now opens in a new tab to initiate retrieval.

  • Documentation

  • Expanded and localized UI messages and labels for infra environment, proxy, rendezvous IP, and cluster errors.

  • Bug Fixes

  • Improved validation and translated error messages; bumped disconnected OpenShift default to 4.22.

✏️ 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

@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: 2

🤖 Fix all issues with AI agents
In @libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx:
- Around line 149-156: The label string is inconsistent: change the
DescriptionListTerm text from "Controller Ip" to "Controller IP" in the
ReviewStep component so it matches other labels (e.g., "API IP"); locate the
block that renders disconnectedInfraEnv?.rendezvousIp and update the
DescriptionListTerm content to "Controller IP" (the JSX using
DescriptionListGroup/DescriptionListTerm/DescriptionListDescription).
🧹 Nitpick comments (2)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx (1)

35-42: Consider adding error handling to updateInfraEnv.

While the StaticIpPage component likely handles errors from this callback, adding explicit error handling here would improve robustness and provide better error context.

♻️ Proposed enhancement
 const updateInfraEnv = async (params: InfraEnvUpdateParams) => {
   if (!disconnectedInfraEnv?.id) {
     throw new Error('No disconnected infraEnv available');
   }
-  const { data: updatedInfraEnv } = await InfraEnvsAPI.update(disconnectedInfraEnv.id, params);
-  setDisconnectedInfraEnv(updatedInfraEnv);
-  return updatedInfraEnv;
+  try {
+    const { data: updatedInfraEnv } = await InfraEnvsAPI.update(disconnectedInfraEnv.id, params);
+    setDisconnectedInfraEnv(updatedInfraEnv);
+    return updatedInfraEnv;
+  } catch (error) {
+    handleApiError(error, () => {
+      addAlert({
+        title: 'Failed to update infrastructure environment',
+        message: getApiErrorMessage(error),
+        variant: AlertVariant.danger,
+      });
+    });
+    throw error; // Re-throw to let caller handle if needed
+  }
 };

Note: You'll need to import handleApiError and getApiErrorMessage from ../../../../common/api if this approach is taken.

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (1)

45-45: Consider making CPU architecture configurable.

The CPU architecture is hardcoded to 'x86_64', which prevents users from creating disconnected infraEnvs for ARM or other architectures. If multi-architecture support is planned, consider making this configurable through the UI or deriving it from cluster settings.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f263c5a and f879e66.

📒 Files selected for processing (10)
  • libs/locales/lib/en/translation.json
  • libs/types/assisted-installer-service.d.ts
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx
  • libs/types/assisted-installer-service.d.ts
🧰 Additional context used
🧠 Learnings (8)
📓 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.
📚 Learning: 2025-10-21T04:40:36.292Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx:55-63
Timestamp: 2025-10-21T04:40:36.292Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx, the network reordering logic in the useEffect (swapping clusterNetworks and serviceNetworks based on the primary machine network's IP family) is for UI consistency only. Validation of empty or invalid CIDRs is handled separately by validation schemas, not by the reordering logic.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-12-17T09:08:18.279Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/cim/components/helpers/toAssisted.ts:199-201
Timestamp: 2025-12-17T09:08:18.279Z
Learning: In libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, the platformType field on agentClusterInstall.spec is guaranteed to always contain a valid PlatformType value (when lowercased), making the type assertion safe without additional runtime validation.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-09-02T08:03:57.204Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3151
File: libs/ui-lib/lib/cim/components/ClusterDeployment/constants.ts:25-25
Timestamp: 2025-09-02T08:03:57.204Z
Learning: In the openshift-assisted/assisted-installer-ui repository, non-English translations are handled separately from the main development process. When adding new translation keys to English locale files, it's expected that non-English locale files (es, fr, ja, ko, zh) may not immediately contain the corresponding translations, as these are managed through a different workflow.

Applied to files:

  • libs/locales/lib/en/translation.json
📚 Learning: 2025-10-21T04:53:07.362Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx:71-91
Timestamp: 2025-10-21T04:53:07.362Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx, dual-stack mode requires both IPv4 and IPv6 networks (machineNetworks must have at least 2 entries: one IPv4 and one IPv6). Dual-stack with only IPv6 is not supported—dual-stack must have both IP families present.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-12-17T09:16:41.439Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3319
File: libs/ui-lib/lib/common/components/hosts/utils.ts:208-210
Timestamp: 2025-12-17T09:16:41.439Z
Learning: In libs/ui-lib/lib/common/components/hosts/utils.ts, the nodeLabels field on Host objects is guaranteed to be valid JSON because it's always constructed using JSON.stringify in libs/ui-lib/lib/cim/components/helpers/toAssisted.ts, making direct JSON.parse safe without additional error handling.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-05-22T07:31:16.062Z
Learnt from: rawagner
Repo: openshift-assisted/assisted-installer-ui PR: 2826
File: libs/ui-lib/lib/cim/components/YamlEditor/YamlEditor.tsx:50-61
Timestamp: 2025-05-22T07:31:16.062Z
Learning: The `submitYamls` function in the YamlEditor component (libs/ui-lib/lib/cim/components/YamlEditor/utils.ts) already handles YAML validation with yaml.loadAll() and provides user-friendly error messages. Additional validation in the submit function would be redundant.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
📚 Learning: 2025-05-22T07:31:16.062Z
Learnt from: rawagner
Repo: openshift-assisted/assisted-installer-ui PR: 2826
File: libs/ui-lib/lib/cim/components/YamlEditor/YamlEditor.tsx:50-61
Timestamp: 2025-05-22T07:31:16.062Z
Learning: The YamlEditor component in libs/ui-lib/lib/cim/components/YamlEditor/YamlEditor.tsx already handles YAML validation through the submitYamls function in utils.ts, which validates YAML syntax and throws user-friendly error messages if parsing fails.

Applied to files:

  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx
🧬 Code graph analysis (4)
libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (1)
libs/ui-lib/lib/ocm/components/hosts/ModalDialogsContext.tsx (1)
  • ModalDialogsContextProvider (146-146)
libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (1)
libs/ui-lib/lib/common/types/clusters.ts (1)
  • DiscoveryImageType (75-75)
libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx (6)
libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/propTypes.ts (1)
  • StaticIpFormState (9-16)
libs/ui-lib/lib/ocm/store/slices/infra-envs/thunks.ts (1)
  • updateInfraEnv (40-47)
libs/types/assisted-installer-service.d.ts (2)
  • InfraEnvUpdateParams (1896-1933)
  • Error (1003-1024)
libs/ui-lib/lib/ocm/services/apis/index.ts (1)
  • InfraEnvsAPI (7-7)
libs/ui-lib/lib/common/components/ui/formik/utils.ts (1)
  • getFormikErrorFields (34-37)
libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.tsx (1)
  • StaticIpPage (30-107)
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx (3)
libs/ui-lib/lib/ocm/components/clusterWizard/wizardTransition.ts (2)
  • ClusterWizardStepsType (21-35)
  • disconnectedSteps (51-55)
libs/ui-lib/lib/ocm/components/clusterWizard/constants.ts (1)
  • staticIpFormViewSubSteps (29-32)
libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/data/fromInfraEnv.ts (1)
  • getStaticIpInfo (54-60)
🔇 Additional comments (21)
libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (1)

72-72: LGTM: Type alignment with extended image type ecosystem.

The change from ImageType to DiscoveryImageType aligns with the broader PR changes introducing 'disconnected-iso' support. The direct assignment in initialValues is appropriate since the prop is optional and the form can handle undefined values.

Also applies to: 106-106

libs/ui-lib/lib/ocm/components/clusterWizard/NewClusterWizard.tsx (2)

32-36: LGTM: ModalDialogsContextProvider correctly wraps wizard content.

The ModalDialogsContextProvider wrapper is properly placed to enable modal dialog functionality for the static IP configuration steps. This aligns with the documented usage pattern.


20-23: LGTM: Clean route mappings for static IP workflow.

The three new route cases ('static-ip-yaml-view', 'static-ip-network-wide-configurations', 'static-ip-host-configurations') correctly map to the DisconnectedStaticIp component using a fall-through pattern. All route IDs are properly defined in ClusterWizardStepsType and included in the wizardStepsOrder array, confirming proper integration into the wizard flow.

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx (1)

159-159: LGTM: OpenShift version update aligns with PR scope.

The version update from 4.20 to 4.22 is consistent with the PR's introduction of disconnected flow support for OpenShift 4.22.

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx (3)

12-21: LGTM: Clean initial state factory.

The getInitialFormStateProps helper provides appropriate defaults for the form state, with safe initial values for all required properties.


44-46: LGTM: Comprehensive navigation state management.

The isNextDisabled logic correctly considers all relevant form states (auto-save, validation, alerts, submission), and errorFields properly extracts touched errors for display.


61-75: LGTM: Proper null safety and error boundary usage.

The early return for missing disconnectedInfraEnv prevents runtime errors, and the error boundary around StaticIpPage provides graceful degradation if the component fails.

libs/locales/lib/en/translation.json (1)

186-186: LGTM: Translation keys support new disconnected flow features.

All new translation keys are well-written with clear, concise messaging that aligns with existing translation patterns. They appropriately support the new infrastructure environment configuration, proxy settings, rendezvous IP, and error handling for the disconnected installation flow.

Note: Per repository practices, non-English translations are handled separately and will be updated through a different workflow.

Also applies to: 218-218, 351-351, 355-355, 365-365, 570-570, 679-679, 749-749, 851-851

libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx (5)

79-104: LGTM! Disconnected step management mirrors connected flow correctly.

The getDisconnectedWizardStepIds function correctly implements step management for the disconnected wizard flow, appropriately inserting static IP steps after 'disconnected-optional-configurations' instead of 'cluster-details', and omitting custom manifests and single-cluster feature handling which are not applicable to the disconnected flow.


119-120: LGTM! State management is properly initialized.

The disconnectedWizardStepIds state is correctly initialized with disconnectedSteps, and line 138 properly switches between connected and disconnected step arrays based on the installDisconnected flag.

Also applies to: 138-138


195-220: LGTM! Static IP step transition handling is correct for both flows.

The handleMoveFromStaticIp function correctly determines the current infraEnv based on the installation mode and updates the appropriate wizard steps array using the corresponding getter function. The separation between disconnected and connected flows is clean and maintainable.


257-278: LGTM! Static IP view switching handles both flows appropriately.

The onUpdateStaticIpView handler correctly updates the current step ID and wizard steps for both disconnected and connected flows. The disconnected flow appropriately omits custom manifests and single-cluster parameters, which are not applicable to that flow.


279-313: LGTM! Network configuration type handler correctly manages dynamic step injection.

The onUpdateHostNetworkConfigType handler properly updates wizard steps when users switch between DHCP and static IP configuration modes, maintaining consistency across both disconnected and connected installation flows.

libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx (8)

90-99: Verify proxy validation allows both HTTP and HTTPS proxy to be empty.

The validation schema allows both httpProxy and httpsProxy to be empty (allowEmpty: true) even when enableProxy is true. This means users can enable proxy configuration without providing any proxy URLs, which may not be the intended behavior. Typically, enabling proxy requires at least one of httpProxy or httpsProxy to be specified.

Consider whether this is the desired UX or if at least one proxy field should be required when enableProxy is true.


115-122: LGTM! Validation function follows standard Formik pattern.

The validate function correctly integrates the Yup schema with Formik using validateSync and yupToFormErrors for proper error formatting.


140-140: LGTM! Translation and pull secret editing state properly initialized.

The i18n integration and pull secret editing logic correctly defaults to showing the pull secret field when no pull secret is available.

Also applies to: 146-146


148-167: LGTM! Cluster fetch effect properly handles errors with i18n.

The cluster fetch logic correctly handles errors and displays translated error messages via the alerts system.


169-236: LGTM! Form submission logic correctly handles both create and update flows.

The form initialization and submission logic properly:

  • Initializes all fields with appropriate defaults
  • Validates on mount to catch errors early
  • Builds API parameters using the helper function
  • Differentiates between creating new and updating existing infraEnvs
  • Provides translated error messages

294-330: Form handles conditional fields correctly via buildInfraEnvParams.

The conditional rendering of proxy and NTP fields is properly handled. Although toggling the checkboxes off leaves values in the form state, the buildInfraEnvParams function correctly filters out empty or unused fields before API submission, ensuring clean payloads.


333-336: LGTM! Network configuration control integrated correctly.

The HostsNetworkConfigurationControlGroup component is properly wired to manage the hostsNetworkConfigurationType form field, enabling users to switch between DHCP and static IP configuration. This triggers the wizard step updates via onUpdateHostNetworkConfigType in the context provider.


79-81: No action needed. The dummy staticNetworkConfig is a legitimate design pattern used consistently across the codebase. The field is optional in the API type definitions, properly structured with required fields (networkYaml, macInterfaceMap), and intentionally replaces user-provided values when the StaticIpPage form is completed. The API accepts this initialization approach.

@rawagner
Copy link
Member

Going back in form fails (we wont load the fields). We will address it in a follow up

@rawagner
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 21, 2026
@openshift-merge-bot openshift-merge-bot bot merged commit 2283bcd into openshift-assisted:master Jan 21, 2026
12 checks passed
ElayAharoni added a commit to ElayAharoni/assisted-installer-ui that referenced this pull request Feb 23, 2026
openshift-merge-bot bot pushed a commit that referenced this pull request Feb 24, 2026
* Revert "UI freezes when clicking Select button without version (#3401)"

This reverts commit 52c39a9.

* Revert "OCPBUGS-75072 | OVE UI: Above-the-sea UI QE test (#3383)"

This reverts commit f61e1b1.

* Revert "OCPBUGS-74421 | OVE UI: Fix rendezvousIP field name in error message (#3376)"

This reverts commit 142fdc5.

* Revert "Add additional new fields to the above the sea UI (#3337)"

This reverts commit 2283bcd.

* Revert "add new fields to above sea level ABI (#3274)"

This reverts commit 41a3210.

* Revert "Assisted Installer OVE UI shows transient blank page with Technology Preview spinner (#3341)"

This reverts commit d47ab5f.
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants