Skip to content

EDM-4148: Add helper text to repository selection component#702

Open
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-4148-clarify-visible-repositories
Open

EDM-4148: Add helper text to repository selection component#702
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-4148-clarify-visible-repositories

Conversation

@celdrake

@celdrake celdrake commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Add helper text to indicate why the list of repositories contains only a subset all all existing repositories.

For image builds:
ib

For fleet/device spec:
fleet-device

Summary

This pull request enhances the repository selection UI components across the application by adding contextual helper text to clarify which repository types are supported in different contexts.

Areas Affected

libs/ui-components/ (Shared UI Components)

  • Three wizard step components are modified to add helper text to RepositorySelect fields
  • Changes span two separate feature areas: Device/Fleet configurations and Image Builds

Specific Changes

  1. Device Wizard (Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx)

    • Introduces dynamic helper text for repository selection in host configurations
    • Implements a new getRepositoryHelperText helper function that derives messages based on selected repository type
    • Adds useTranslation() hook to support internationalization of the helper text
  2. Image Build Wizard - Source Image Step (ImageBuilds/CreateImageBuildWizard/steps/SourceImageStep.tsx)

    • Adds helper text clarifying that only OCI-compliant registries are shown for image builds
    • Notes that Git and HTTP repository types are not supported for this operation
  3. Image Build Wizard - Output Image Step (ImageBuilds/CreateImageBuildWizard/steps/OutputImageStep.tsx)

    • Updates repository selection helper text to specify OCI-compliance requirement
    • Replaces prior generic storage repository help text with more specific guidance

Cross-Cutting Implications

  • Shared UI Component Impact: Changes to the RepositorySelect component usage pattern affect both device configuration and image build workflows, improving user clarity across the platform
  • Internationalization: The introduction of translation support in the device wizard component suggests expansion of i18n support for dynamic helper text patterns
  • User Experience: Adds progressive disclosure of compatibility information directly in UI forms, reducing user confusion about supported repository types

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: e1ed5adc-02cf-4703-bb5d-06b464688ecc

📥 Commits

Reviewing files that changed from the base of the PR and between 66e5e62 and 18a7ba0.

⛔ 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/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx
  • libs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/OutputImageStep.tsx
  • libs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/SourceImageStep.tsx

Walkthrough

Three wizard step components receive updated helperText props on their RepositorySelect fields. ConfigWithRepositoryTemplateForm gains a getRepositoryHelperText helper and a useTranslation hook to serve repo-type-specific (Git vs HTTP) strings. Both image build steps now display an OCI-only registry message.

Changes

RepositorySelect Helper Text

Layer / File(s) Summary
Device config: repo-type-specific helper text
libs/ui-components/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx
Adds TFunction import, a getRepositoryHelperText helper returning Git- or HTTP-specific translated strings, a useTranslation() call, and wires the result into RepositorySelect as helperText.
Image build steps: OCI-only helper text
libs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/OutputImageStep.tsx, libs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/SourceImageStep.tsx
Replaces or adds helperText on RepositorySelect in both image build steps to inform users that only OCI-compliant registries are shown and other types (Git/HTTP) are unsupported.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested labels

ui-components, i18n

Poem

🗂️ A helper now speaks to the repo you chose,
Git gets its words, HTTP gets those.
OCI registries stand proud and alone,
"No Git here," says the text — leave them be in their zone.
🏗️ Three wizard steps cleaner, the user now knows!

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Unchecked-Errors ⚠️ Warning Found 6 unchecked errors assigned to blank identifier without justifying comments in Go proxy files: proxy/auth/auth.go (2×), proxy/auth/redirect.go (1×), proxy/bridge/handler.go (2×), proxy/bridge... Add comments explaining why each error is safe to ignore, or properly handle the errors. Examples: json.Marshal errors on redirect responses, resp.Body.Close errors, etc.
Generated-Files-Not-Hand-Edited ⚠️ Warning The PR directly edits libs/i18n/locales/en/translation.json by adding new translation strings. This file should be regenerated via npm run i18n (i18next-parser), not hand-edited. Regenerate translation.json using npm run i18n instead of adding translation entries manually to the file.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the primary change: adding helper text to the repository selection component across multiple contexts.
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 All changes are translation-based UI helper texts. No hardcoded secrets, API keys, tokens, passwords, credentials, base64 strings, or suspicious patterns found.
No-Weak-Crypto ✅ Passed No weak crypto, custom crypto implementations, or non-constant-time secret comparisons found. PR contains only UI helper text additions for repository selection clarity.
No-Injection-Vectors ✅ Passed No injection vectors found. All helper text uses static translated strings rendered safely via JSX with no eval/exec, dangerouslySetInnerHTML, or other dangerous patterns.
Container-Privileges ✅ Passed PR modifies only UI component files (TypeScript/React). No container or Kubernetes manifests with privilege configurations are changed; check is not applicable.
No-Sensitive-Data-In-Logs ✅ Passed No logging statements detected in the three modified files. Changes consist solely of adding UI helper text via translation functions with no sensitive data exposure.
Resource-Leaks ✅ Passed Custom check targets Go files in proxy/ directory. This PR modifies only TypeScript/React UI components (.tsx files); no Go files are changed.
Ai-Attribution ✅ Passed AI tool usage (Cursor) is properly attributed with "Made-with: Cursor" trailer in commit message, using the acceptable attribution format specified in the check.
I18n-Compliance ✅ Passed All user-visible strings added in the PR are properly wrapped in t() translation function. No variable keys detected in t() calls. All translations use hardcoded string literals.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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.

1 participant