ui: Allow skill publish without Docker image#251
ui: Allow skill publish without Docker image#251timflannagan merged 2 commits intoagentregistry-dev:mainfrom
Conversation
Previously, the Add Skill dialog always required a Docker image and always sent a Docker package payload, even when a GitHub repository was provided. Now we allow either source, require at least one, and only send Docker package metadata when an image is provided. Signed-off-by: timflannagan <[email protected]>
There was a problem hiding this comment.
Pull request overview
Updates the UI “Add Skill” dialog to support publishing a skill from a GitHub repository without requiring a Docker image, aligning the UI with backend support for non-containerized skills (Fixes #250).
Changes:
- Validate that at least one source is provided (GitHub repository URL and/or Docker image).
- Only include Docker package metadata in the request payload when a Docker image is provided.
- Update the Docker image field UI to no longer appear required.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ui/components/add-skill-dialog.tsx
Outdated
| <Label htmlFor="dockerImage"> | ||
| Docker Image <span className="text-red-500">*</span> | ||
| Docker Image | ||
| </Label> | ||
| <Input | ||
| id="dockerImage" | ||
| placeholder="docker.io/username/my-skill:latest" | ||
| value={dockerImage} | ||
| onChange={(e) => setDockerImage(e.target.value)} | ||
| disabled={loading} | ||
| required | ||
| /> | ||
| <p className="text-xs text-muted-foreground"> | ||
| Full Docker image identifier including registry, repository, and tag | ||
| Optional: Provide a Docker image for runtime distribution (not required for GitHub-only publish) | ||
| </p> |
There was a problem hiding this comment.
With the Docker Image asterisk removed, both “GitHub Repository URL” and “Docker Image” now look optional, but the submit validation requires at least one. Consider updating the helper text/label here to explicitly say “Provide either a GitHub repository URL or a Docker image” (and/or visually indicate the ‘one-of’ requirement) so users don’t only discover it after submitting.
There was a problem hiding this comment.
Yeah agreed. I'll play around with better commentary options.
There was a problem hiding this comment.
Actually it might be worth refactoring this UX a bit if those are mutual exclusive options. I'll look into that as well.
Previously, the Add Skill dialog rendered GitHub and Docker inputs together and used one-of validation text, which was easy to misread as both fields being optional. Now the dialog uses an explicit publish source mode selector and renders only the relevant required input for the selected mode, with mode-aligned payload construction and validation.
|
<!-- Thanks for opening a PR! Please delete any sections that don't apply. --> # Description <!-- A concise explanation of the change. You may include: - **Motivation:** why this change is needed - **What changed:** key implementation details - **Related issues:** e.g., `Fixes agentregistry-dev#123` --> Previously, the "Add Skill" dialog always required a Docker image and always sent a Docker package payload, even when a GitHub repository was provided. Now we allow either source, require at least one, and only send Docker package metadata when an image is provided. Fixes agentregistry-dev#250. # Change Type <!-- Select one or more of the following by including the corresponding slash-command: ``` /kind breaking_change /kind bump /kind cleanup /kind design /kind deprecation /kind documentation /kind feature /kind fix /kind flake /kind install ``` --> /kind fix # Changelog <!-- Provide the exact line to appear in release notes for the chosen changelog type. If no, just write "NONE" in the release-note block below. If yes, a release note is required: --> ```release-note Fixed an issue in the UI skill publishing flow where a Docker image was incorrectly required even when publishing from a public GitHub repository. The form now accepts either a GitHub repository URL or a Docker image. ``` # Additional Notes <!-- Any extra context or edge cases for reviewers. --> --------- Signed-off-by: timflannagan <[email protected]>

Description
Previously, the "Add Skill" dialog always required a Docker image and always sent a Docker package payload, even when a GitHub repository was provided.
Now we allow either source, require at least one, and only send Docker package metadata when an image is provided.
Fixes #250.
Change Type
/kind fix
Changelog
Additional Notes