Skip to content

EDM-4144: Clarify OCI reference terminology#689

Open
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-4144-oci-reference-terminology
Open

EDM-4144: Clarify OCI reference terminology#689
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-4144-oci-reference-terminology

Conversation

@celdrake

@celdrake celdrake commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator
  • Replace "Artifact URI" for "OCI reference" in Catalog.
  • Modified the ariaLabel for CreateRepository (Image name) to match the visible label.

Affected Areas

All functional changes are localized to libs/ui-components/ (shared UI used across platforms):

  • Catalog configuration components (AddCatalogItemWizard)
  • Repository management components (CreateRepository)

The UI changes rely on libs/i18n/ localized terminology (e.g., “OCI reference” and “OCI reference is required”) for user-facing labels and validation messages, but no platform-specific app code, auth proxy, container build logic, E2E tests, or CI configuration is implicated.

Summary

This PR clarifies OCI reference terminology in the shared UI by replacing “Artifact URI”/generic “URI” wording with the more precise “OCI reference”, including both visible labels and accessibility/validation text.

Changes by Component

Catalog Configuration (libs/ui-components/src/components/Catalog/AddCatalogItemWizard/)

  • Updated the OS artifact input UI to label the field as “OCI reference” (including the ARIA label).
  • Updated catalog URI validation to use a shared imageReferenceWithoutVersionSchema / uriHasNoTagOrDigest approach:
    • Ensures required OCI/image references
    • Rejects tag (:) and digest (@)
  • Standardized required-message wording to “OCI reference is required”.

Repository Management (libs/ui-components/src/components/Repository/CreateRepository/)

  • Aligned the CreateRepository OCI base image field accessibility label:
    • Changed aria-label from “Artifact URI” to “Image name” (matching the visible label).

Impact

  • Shared UI behavior/wording change: affects any product area that uses these shared components (e.g., both standalone and OCP plugin UIs).
  • No public API changes and no changes to platform-specific logic, authentication proxy, container build pipelines, E2E tests, or CI configuration.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR adds a shared OCI reference validator that rejects tags and digests, applies it to catalog and repository image fields, and updates the related form labels and ARIA text to match the new terminology.

Changes

OCI Reference Validation and Terminology Updates

Layer / File(s) Summary
OCI reference validation schema factory
libs/ui-components/src/components/Catalog/AddCatalogItemWizard/utils.ts
Adds uriHasNoTagOrDigest and imageReferenceWithoutVersionSchema, a reusable Yup schema factory for required OCI/image references without tag (:) or digest (@) suffixes.
Validation integration and UI label consistency
libs/ui-components/src/components/Catalog/AddCatalogItemWizard/utils.ts, libs/ui-components/src/components/Catalog/AddCatalogItemWizard/steps/TypeConfigStep.tsx, libs/ui-components/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx
Switches containerUri and artifact uri validation to the new schema with updated required messages, and updates catalog/repository labels and ARIA labels from "URI"/"Artifact URI" to "OCI reference" and "Image name".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

ui-components

Suggested reviewers

  • jkilzi

Poem

A reference marched in, neat and bright,
No tags, no digests—just OCI right.
Labels and checks now sing in tune,
From wizard to form, by afternoon.

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Generated-Files-Not-Hand-Edited ⚠️ Warning FAIL: HEAD modifies generated artifacts in libs/i18n/locales/en/translation.json and libs/types/** models, which this check forbids. Revert direct edits to generated files, then rerun the appropriate generators (npm run gen-types / npm run i18n) and commit only the regenerated output.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: replacing Artifact URI wording with OCI reference terminology.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed No hardcoded secrets found in the changed files; token/password references are form inputs/labels, not literals with embedded credentials or private keys.
No-Weak-Crypto ✅ Passed Touched files only adjust labels and URI validation; no weak crypto APIs, custom crypto, or secret-comparison logic were added.
No-Injection-Vectors ✅ Passed Touched code only updates labels and Yup/string validation; no eval/exec, dangerous HTML, or unsanitized command/yaml loading was introduced.
Container-Privileges ✅ Passed PASS: The PR only changes UI labels/validation in TSX files; no manifests or container settings like privileged, hostPID, or allowPrivilegeEscalation appear.
No-Sensitive-Data-In-Logs ✅ Passed Touched files only rename labels/validation; no console/logger calls or sensitive values are logged in the modified code.
Resource-Leaks ✅ Passed No proxy Go leak sites: HTTP bodies and websocket connections are deferred-closed, and the terminal goroutines exit on connection teardown.
Unchecked-Errors ✅ Passed PR changes only UI TypeScript files; no proxy/ Go files are in scope, so the unchecked-errors check is not applicable.
Ai-Attribution ✅ Passed HEAD commit has Made-with: Cursor, and no AI-related Co-Authored-By trailer appears in the change set.
I18n-Compliance ✅ Passed The edited TSX strings are all wrapped in t(), and the new t() calls use hardcoded string literals, not variables.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: one or more packages not found in the registry.


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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/Catalog/AddCatalogItemWizard/utils.ts`:
- Around line 516-523: The protocol-stripping regex in uriHasNoTagOrDigest only
matches lowercase schemes; update the regex to be case-insensitive so it strips
protocols like HTTP:// or HTTPS:// as well. Locate the uriHasNoTagOrDigest
function and change the pattern used to remove the protocol to use a
case-insensitive match (e.g., add the 'i' flag to the existing regex) so
path/imageName extraction remains correct for uppercase or mixed-case schemes.
🪄 Autofix (Beta)

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: e91dc34b-69cd-4b15-8833-2d510f770434

📥 Commits

Reviewing files that changed from the base of the PR and between d6bed50 and b1dd277.

⛔ Files ignored due to path filters (1)
  • libs/i18n/locales/en/translation.json is excluded by !libs/i18n/locales/en/translation.json
📒 Files selected for processing (3)
  • libs/ui-components/src/components/Catalog/AddCatalogItemWizard/steps/TypeConfigStep.tsx
  • libs/ui-components/src/components/Catalog/AddCatalogItemWizard/utils.ts
  • libs/ui-components/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx

@jkilzi jkilzi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice cleanup. The terminology change from "URI" to "OCI reference" is more accurate, and the refactoring of the validation schema is a clear improvement.

A few observations:

  • uriHasNoTagOrDigest extraction — good; the named function makes the logic independently testable.
  • Parameterised required message — giving each call site its own error string ("Container image reference is required" vs "OCI reference is required") is the right call.
  • aria-label fix in CreateRepositoryForm — the field previously had aria-label={t('Artifact URI')} and now correctly uses t('Image name'). If there are any Cypress/Playwright selectors or snapshot tests that target the old label, they'll need updating.

@celdrake celdrake force-pushed the EDM-4144-oci-reference-terminology branch from b1dd277 to 0f4af8c Compare June 29, 2026 09:02
@celdrake

Copy link
Copy Markdown
Collaborator Author

Rebased and fixed conflicts in translation.json by generating it again.

@celdrake celdrake requested a review from jkilzi June 29, 2026 09:02

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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/Catalog/AddCatalogItemWizard/steps/TypeConfigStep.tsx`:
- Around line 129-135: The placeholder for the OCI reference field still shows a
download URL example, which conflicts with the new OCI-style label. Update the
TextField in TypeConfigStep to use an OCI reference example placeholder
consistent with the field name, and keep the change localized to the `OCI
reference` input so users are guided toward a valid OCI image reference format.

In `@libs/ui-components/src/components/Catalog/AddCatalogItemWizard/utils.ts`:
- Around line 516-531: The uriHasNoTagOrDigest helper is too permissive because
it strips scheme:// and only inspects the last path segment, allowing full URLs
like https://example.com/image.qcow2 to pass. Update the validation used by
imageReferenceWithoutVersionSchema for both containerUri and artifacts[].uri to
reject non-OCI URL shapes entirely, and validate the full reference string
instead of normalizing away the scheme before checking for tag/digest.
🪄 Autofix (Beta)

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 89a58c06-e8a0-4f61-bd09-ad4e8696a299

📥 Commits

Reviewing files that changed from the base of the PR and between b1dd277 and 0f4af8c.

⛔ Files ignored due to path filters (1)
  • libs/i18n/locales/en/translation.json is excluded by !libs/i18n/locales/en/translation.json
📒 Files selected for processing (3)
  • libs/ui-components/src/components/Catalog/AddCatalogItemWizard/steps/TypeConfigStep.tsx
  • libs/ui-components/src/components/Catalog/AddCatalogItemWizard/utils.ts
  • libs/ui-components/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants