NO-ISSUE: Replace LabeledResourceRef with plain values in Select/Mult… - #123
Conversation
|
@rawagner: This pull request explicitly references no jira issue. DetailsIn response to this:
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. |
WalkthroughThe PR replaces labeled resource-reference objects with primitive form values across shared fields, catalog provisioning, networking forms, payloads, and schemas. It also replaces generic catalog review sections with adapter-specific review components that resolve resource metadata. ChangesCatalog provisioning form and review flow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CatalogProvisionWizard
participant AdapterReviewStep
participant Formik
participant ResourceAPI
CatalogProvisionWizard->>AdapterReviewStep: render selected catalog item
AdapterReviewStep->>Formik: read wizard values
AdapterReviewStep->>ResourceAPI: fetch selected resource metadata
ResourceAPI-->>AdapterReviewStep: return resource details
AdapterReviewStep-->>CatalogProvisionWizard: render formatted review fields
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterReviewStep.tsx`:
- Around line 43-45: Validate host-type IDs in ClusterReviewStep.tsx lines 43-45
and security-group IDs in VmReviewStep.tsx lines 40-42 using the shared
filter-literal encoder or an allow-list before constructing the API predicates;
preserve only validated IDs in the generated filters.
In
`@libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.ts`:
- Line 40: Update the hostTypeId assignment in the payload builder to trim
row.hostType before using it for nodeSets and hostType. Add a payload.test.ts
case with a padded host-type ID and verify the generated request uses the
normalized value.
In `@libs/ui-components/src/components/Form/SelectField.tsx`:
- Around line 56-74: Update the empty-value checks in the auto-selection
useEffect and toggleLabel useMemo to distinguish only nullish/empty values,
preserving numeric 0 as selected. Ensure auto-selection does not overwrite an
existing 0 value and toggleLabel resolves and displays the option label for 0,
then add a regression test covering an option with value 0.
- Around line 76-80: Update the onSelect callback in SelectField to accept an
optional string or number value, and return early when value is undefined before
invoking helpers.setValue. Preserve the existing behavior for defined values.
In `@libs/ui-components/src/components/networking/SecurityGroupRuleModal.tsx`:
- Line 27: Update the protocol-dependent Yup.when predicates in
SecurityGroupRuleModal to compare the numeric protocol directly with
Protocol.TCP and Protocol.UDP instead of reading protocol.value, ensuring
TCP/UDP port validation is applied and missing ports are rejected. Add coverage
for submitting a TCP rule with missing ports.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8abe2600-5d4e-4dda-92fe-888842728ac2
📒 Files selected for processing (35)
libs/i18n/locales/en/translation.jsonlibs/ui-components/src/components/Form/MultiSelectField.tsxlibs/ui-components/src/components/Form/SelectField.test.tsxlibs/ui-components/src/components/Form/SelectField.tsxlibs/ui-components/src/components/Form/labeledResourceRef.tslibs/ui-components/src/components/Form/labeledResourceRefSchema.tslibs/ui-components/src/components/catalogProvision/CatalogProvisionWizard.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstance/BareMetalReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstanceAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterConfigurationStep.test.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterNodeSetsArrayField.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/fields.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/clusterAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmNetworkingStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/fields.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/generalFields.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/payload.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstanceAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/types.tslibs/ui-components/src/components/catalogProvision/wizard/catalogOverlay.tslibs/ui-components/src/components/catalogProvision/wizard/steps/ReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/steps/WizardSteps.tsxlibs/ui-components/src/components/networking/SecurityGroupCreateModal.tsxlibs/ui-components/src/components/networking/SecurityGroupRuleForm.tsxlibs/ui-components/src/components/networking/SecurityGroupRuleModal.tsxlibs/ui-components/src/components/vm/DetailsPage/AttachExternalIpModal.tsxlibs/ui-components/src/test-utils/createMockConnectTransport.ts
💤 Files with no reviewable changes (5)
- libs/ui-components/src/components/catalogProvision/wizard/steps/ReviewStep.tsx
- libs/ui-components/src/components/Form/labeledResourceRefSchema.ts
- libs/ui-components/src/components/catalogProvision/wizard/steps/WizardSteps.tsx
- libs/ui-components/src/components/catalogProvision/wizard/catalogOverlay.ts
- libs/ui-components/src/components/Form/labeledResourceRef.ts
1d4bf8b to
e9c7642
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@libs/ui-components/src/components/catalogProvision/wizard/adapters/clusterAdapter.ts`:
- Line 50: Update ClusterReviewStep’s filter construction to prevent hostType
values from injecting CEL expressions. Escape each hostType as a CEL string
literal or validate it against an explicit allow-list before interpolation,
while preserving the intended filtering behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0b01216e-0e77-462e-bde8-a2ec1c13fc47
📒 Files selected for processing (35)
libs/i18n/locales/en/translation.jsonlibs/ui-components/src/components/Form/MultiSelectField.tsxlibs/ui-components/src/components/Form/SelectField.test.tsxlibs/ui-components/src/components/Form/SelectField.tsxlibs/ui-components/src/components/Form/labeledResourceRef.tslibs/ui-components/src/components/Form/labeledResourceRefSchema.tslibs/ui-components/src/components/catalogProvision/CatalogProvisionWizard.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstance/BareMetalReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstanceAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterConfigurationStep.test.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterNodeSetsArrayField.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/fields.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/clusterAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmNetworkingStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/fields.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/generalFields.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/payload.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstanceAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/types.tslibs/ui-components/src/components/catalogProvision/wizard/catalogOverlay.tslibs/ui-components/src/components/catalogProvision/wizard/steps/ReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/steps/WizardSteps.tsxlibs/ui-components/src/components/networking/SecurityGroupCreateModal.tsxlibs/ui-components/src/components/networking/SecurityGroupRuleForm.tsxlibs/ui-components/src/components/networking/SecurityGroupRuleModal.tsxlibs/ui-components/src/components/vm/DetailsPage/AttachExternalIpModal.tsxlibs/ui-components/src/test-utils/createMockConnectTransport.ts
💤 Files with no reviewable changes (5)
- libs/ui-components/src/components/catalogProvision/wizard/steps/ReviewStep.tsx
- libs/ui-components/src/components/Form/labeledResourceRefSchema.ts
- libs/ui-components/src/components/catalogProvision/wizard/catalogOverlay.ts
- libs/ui-components/src/components/Form/labeledResourceRef.ts
- libs/ui-components/src/components/catalogProvision/wizard/steps/WizardSteps.tsx
🚧 Files skipped from review as they are similar to previous changes (28)
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterConfigurationStep.test.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/payload.ts
- libs/ui-components/src/components/catalogProvision/CatalogProvisionWizard.tsx
- libs/ui-components/src/test-utils/createMockConnectTransport.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterNodeSetsArrayField.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/types.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/fields.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstanceAdapter.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.ts
- libs/ui-components/src/components/networking/SecurityGroupRuleForm.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmNetworkingStep.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/generalFields.test.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/fields.ts
- libs/ui-components/src/components/networking/SecurityGroupCreateModal.tsx
- libs/ui-components/src/components/networking/SecurityGroupRuleModal.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.test.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstanceAdapter.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.test.ts
- libs/ui-components/src/components/vm/DetailsPage/AttachExternalIpModal.tsx
- libs/ui-components/src/components/Form/SelectField.test.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.test.ts
- libs/ui-components/src/components/Form/MultiSelectField.tsx
- libs/i18n/locales/en/translation.json
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmReviewStep.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterReviewStep.tsx
- libs/ui-components/src/components/Form/SelectField.tsx
e9c7642 to
2c93f56
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
libs/ui-components/src/components/catalogProvision/wizard/stepIds.ts (1)
15-21: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRename
STEP_LABEL_KEYSto match its return value.The export now returns translated labels, not translation keys. Rename it to
getWizardStepLabelsand updatelibs/ui-components/src/components/catalogProvision/CatalogProvisionWizard.tsx. This prevents future callers from treating the returned labels as i18next keys.Suggested rename
-export const STEP_LABEL_KEYS = ... +export const getWizardStepLabels = ...🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@libs/ui-components/src/components/catalogProvision/wizard/stepIds.ts` around lines 15 - 21, Rename the exported STEP_LABEL_KEYS function to getWizardStepLabels, preserving its translated-label mapping, and update all references in CatalogProvisionWizard.tsx to use the new name.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@libs/ui-components/src/components/catalogProvision/wizard/stepIds.ts`:
- Around line 15-21: Rename the exported STEP_LABEL_KEYS function to
getWizardStepLabels, preserving its translated-label mapping, and update all
references in CatalogProvisionWizard.tsx to use the new name.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d1bab872-e2cc-4790-8b88-6f4789054bb1
📒 Files selected for processing (36)
libs/i18n/locales/en/translation.jsonlibs/ui-components/src/components/Form/MultiSelectField.tsxlibs/ui-components/src/components/Form/SelectField.test.tsxlibs/ui-components/src/components/Form/SelectField.tsxlibs/ui-components/src/components/Form/labeledResourceRef.tslibs/ui-components/src/components/Form/labeledResourceRefSchema.tslibs/ui-components/src/components/catalogProvision/CatalogProvisionWizard.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstance/BareMetalReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstanceAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterConfigurationStep.test.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterNodeSetsArrayField.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/fields.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/clusterAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmNetworkingStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/fields.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/generalFields.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/payload.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstanceAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/types.tslibs/ui-components/src/components/catalogProvision/wizard/catalogOverlay.tslibs/ui-components/src/components/catalogProvision/wizard/stepIds.tslibs/ui-components/src/components/catalogProvision/wizard/steps/ReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/steps/WizardSteps.tsxlibs/ui-components/src/components/networking/SecurityGroupCreateModal.tsxlibs/ui-components/src/components/networking/SecurityGroupRuleForm.tsxlibs/ui-components/src/components/networking/SecurityGroupRuleModal.tsxlibs/ui-components/src/components/vm/DetailsPage/AttachExternalIpModal.tsxlibs/ui-components/src/test-utils/createMockConnectTransport.ts
💤 Files with no reviewable changes (5)
- libs/ui-components/src/components/catalogProvision/wizard/steps/WizardSteps.tsx
- libs/ui-components/src/components/catalogProvision/wizard/catalogOverlay.ts
- libs/ui-components/src/components/catalogProvision/wizard/steps/ReviewStep.tsx
- libs/ui-components/src/components/Form/labeledResourceRefSchema.ts
- libs/ui-components/src/components/Form/labeledResourceRef.ts
🚧 Files skipped from review as they are similar to previous changes (30)
- libs/ui-components/src/test-utils/createMockConnectTransport.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.ts
- libs/ui-components/src/components/networking/SecurityGroupCreateModal.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterConfigurationStep.test.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.test.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.test.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.test.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/clusterAdapter.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/fields.ts
- libs/ui-components/src/components/networking/SecurityGroupRuleForm.tsx
- libs/ui-components/src/components/catalogProvision/CatalogProvisionWizard.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmNetworkingStep.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterNodeSetsArrayField.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmReviewStep.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/types.ts
- libs/ui-components/src/components/Form/MultiSelectField.tsx
- libs/ui-components/src/components/vm/DetailsPage/AttachExternalIpModal.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/generalFields.test.ts
- libs/ui-components/src/components/Form/SelectField.test.tsx
- libs/ui-components/src/components/networking/SecurityGroupRuleModal.tsx
- libs/ui-components/src/components/Form/SelectField.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterReviewStep.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstanceAdapter.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstance/BareMetalReviewStep.tsx
- libs/i18n/locales/en/translation.json
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/payload.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstanceAdapter.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/fields.ts
2c93f56 to
2e628d5
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
ElayAharoni
left a comment
There was a problem hiding this comment.
the 3 new review files has some duplications in them, the DescriptionLIst, loading spinner, and hte catalog item related fields.
maybe it worth trying to create a reusable component for those?
2e628d5 to
6a0fc56
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
I dont see a reason to have another abstraction on top of we may want to consider loading state abstraction - but in a separate PR where we change the wizard from adapter pattern to jsx composition. the changes to review pages are done only to align with changes to labeled ref. The previous, pure function didnt allow for fetching resources. |
…iSelect fields
SelectField and MultiSelectField stored { value, label } objects (LabeledResourceRef)
in Formik state. This coupled display concerns into form values, complicated payloads,
and required unwrapping everywhere. Simplify to store plain string/number values instead
and derive display labels from the options list at render time.
- Remove labeledResourceRef.ts and labeledResourceRefSchema.ts
- Update SelectField/MultiSelectField to use primitive Formik values
- Move review step rendering into per-adapter components (VmReviewStep,
ClusterReviewStep, BareMetalReviewStep) that fetch display data directly,
replacing the generic ReviewStep that relied on labeled refs
- Simplify form schemas and payload builders to work with plain values
- Add get handlers to mock transport for InstanceTypes, VirtualNetworks,
and Subnets to support review step data fetching in tests
Assisted-by: Claude Code <noreply@anthropic.com>
6a0fc56 to
b604e37
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
@coderabbitai resume |
✅ Action performedReviews resumed. |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@libs/ui-components/src/components/catalogProvision/wizard/stepIds.ts`:
- Around line 1-15: Add the required commit trailers with Red Hat
identification: include a single Red Hat AI-assistance trailer using the
expected Assisted-by format, remove duplicate Assisted-by: Claude Code trailers,
and add the required Co-Authored-By trailer. Keep the implementation unchanged.
- Around line 5-7: Restore literal step ID typing by declaring WIZARD_STEP_IDS
with a const assertion, so WizardStepId remains the union of known IDs and
downstream labels/schema APIs reject arbitrary strings. Update isWizardStepId to
use some with an equality comparison if includes no longer accepts its string
parameter.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b8e7ad66-6ef9-461d-882c-7ea3bac1ee33
📒 Files selected for processing (36)
libs/i18n/locales/en/translation.jsonlibs/ui-components/src/components/Form/MultiSelectField.tsxlibs/ui-components/src/components/Form/SelectField.test.tsxlibs/ui-components/src/components/Form/SelectField.tsxlibs/ui-components/src/components/Form/labeledResourceRef.tslibs/ui-components/src/components/Form/labeledResourceRefSchema.tslibs/ui-components/src/components/catalogProvision/CatalogProvisionWizard.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstance/BareMetalReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstanceAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterConfigurationStep.test.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterNodeSetsArrayField.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/fields.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/clusterAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmNetworkingStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/fields.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/generalFields.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/payload.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.test.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstanceAdapter.tslibs/ui-components/src/components/catalogProvision/wizard/adapters/types.tslibs/ui-components/src/components/catalogProvision/wizard/catalogOverlay.tslibs/ui-components/src/components/catalogProvision/wizard/stepIds.tslibs/ui-components/src/components/catalogProvision/wizard/steps/ReviewStep.tsxlibs/ui-components/src/components/catalogProvision/wizard/steps/WizardSteps.tsxlibs/ui-components/src/components/networking/SecurityGroupCreateModal.tsxlibs/ui-components/src/components/networking/SecurityGroupRuleForm.tsxlibs/ui-components/src/components/networking/SecurityGroupRuleModal.tsxlibs/ui-components/src/components/vm/DetailsPage/AttachExternalIpModal.tsxlibs/ui-components/src/test-utils/createMockConnectTransport.ts
💤 Files with no reviewable changes (5)
- libs/ui-components/src/components/catalogProvision/wizard/steps/WizardSteps.tsx
- libs/ui-components/src/components/catalogProvision/wizard/steps/ReviewStep.tsx
- libs/ui-components/src/components/Form/labeledResourceRefSchema.ts
- libs/ui-components/src/components/Form/labeledResourceRef.ts
- libs/ui-components/src/components/catalogProvision/wizard/catalogOverlay.ts
🚧 Files skipped from review as they are similar to previous changes (30)
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.test.ts
- libs/ui-components/src/components/networking/SecurityGroupRuleForm.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/payload.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterConfigurationStep.test.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/payload.ts
- libs/ui-components/src/test-utils/createMockConnectTransport.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstanceAdapter.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/schemas.test.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstanceAdapter.ts
- libs/ui-components/src/components/vm/DetailsPage/AttachExternalIpModal.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterNodeSetsArrayField.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmNetworkingStep.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/bareMetalInstance/BareMetalReviewStep.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.test.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/VmReviewStep.tsx
- libs/ui-components/src/components/catalogProvision/CatalogProvisionWizard.tsx
- libs/ui-components/src/components/networking/SecurityGroupRuleModal.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/ClusterReviewStep.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/schemas.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/clusterAdapter.ts
- libs/ui-components/src/components/Form/SelectField.test.tsx
- libs/ui-components/src/components/catalogProvision/wizard/adapters/cluster/fields.ts
- libs/ui-components/src/components/networking/SecurityGroupCreateModal.tsx
- libs/i18n/locales/en/translation.json
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/fields.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/types.ts
- libs/ui-components/src/components/catalogProvision/wizard/adapters/computeInstance/generalFields.test.ts
- libs/ui-components/src/components/Form/MultiSelectField.tsx
- libs/ui-components/src/components/Form/SelectField.tsx
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ElayAharoni, rawagner The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…iSelect fields
SelectField and MultiSelectField stored { value, label } objects (LabeledResourceRef) in Formik state. This coupled display concerns into form values, complicated payloads, and required unwrapping everywhere. Simplify to store plain string/number values instead and derive display labels from the options list at render time.
Assisted-by: Claude Code noreply@anthropic.com
Summary by CodeRabbit
New Features
Improvements
Bug Fixes