frontend: kraken: Improve custom installation extension#3822
Merged
patrickelectric merged 2 commits intobluerobotics:masterfrom Mar 10, 2026
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds keyboard shortcut and smarter paste handling to the Kraken extension creation modal, improving usability when entering Docker image tags. Sequence diagram for keyboard shortcut submission in ExtensionCreationModalsequenceDiagram
actor User
participant ExtensionCreationModal
participant VuetifyDialog
User->>VuetifyDialog: keydown ctrl+enter
VuetifyDialog->>ExtensionCreationModal: keydown.ctrl.enter event
ExtensionCreationModal->>ExtensionCreationModal: saveExtension()
ExtensionCreationModal->>VuetifyDialog: close dialog on success
Sequence diagram for Docker tag paste handling in ExtensionCreationModalsequenceDiagram
actor User
participant TagInputField
participant ExtensionCreationModal
User->>TagInputField: paste docker_image:tag
TagInputField->>ExtensionCreationModal: paste event
ExtensionCreationModal->>ExtensionCreationModal: handleTagPaste(event)
ExtensionCreationModal->>ExtensionCreationModal: extract tag part
ExtensionCreationModal-->>TagInputField: set new_extension.tag to extracted tag
User->>TagInputField: paste tag_only
TagInputField->>ExtensionCreationModal: paste event
ExtensionCreationModal->>ExtensionCreationModal: handleTagPaste(event)
ExtensionCreationModal-->>TagInputField: leave pasted text unchanged (no match)
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The
handleTagPasteregex^[a-zA-Z0-9_-]+:(.+)$is quite restrictive and won't match many valid image formats (e.g. with slashes, dots, or registries); consider broadening it (e.g.^[^:]+:(.+)$or a more Docker-specific pattern) so it works for typical repository-style prefixes. - In
handleTagPaste, the captured group is stored in a variable namedbranch, which is confusing in the context of Docker tags; renaming this to something liketagwould make the intent clearer and avoid mixing Git terminology with Docker concepts.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `handleTagPaste` regex `^[a-zA-Z0-9_-]+:(.+)$` is quite restrictive and won't match many valid image formats (e.g. with slashes, dots, or registries); consider broadening it (e.g. `^[^:]+:(.+)$` or a more Docker-specific pattern) so it works for typical repository-style prefixes.
- In `handleTagPaste`, the captured group is stored in a variable named `branch`, which is confusing in the context of Docker tags; renaming this to something like `tag` would make the intent clearer and avoid mixing Git terminology with Docker concepts.
## Individual Comments
### Comment 1
<location path="core/frontend/src/components/kraken/modals/ExtensionCreationModal.vue" line_range="308-312" />
<code_context>
}, 2000) // Reset after 2 seconds
}
},
+ handleTagPaste(event: ClipboardEvent) {
+ const pastedText = event.clipboardData?.getData('text')?.trim()
+ if (!pastedText) return
+
+ const match = pastedText.match(/^[a-zA-Z0-9_-]+:(.+)$/)
+ if (match) {
+ const [, branch] = match
</code_context>
<issue_to_address>
**issue (bug_risk):** The Docker image regex is too restrictive and will miss common valid image formats.
This pattern only matches very simple `name:tag` forms and will reject valid image references with dots, slashes, or registry prefixes (e.g. `registry.gitlab.com/group/image:tag`, `my.registry.local/app/image:tag`). Consider making the match logic focus on the last `:` (after an optional digest separator) instead of constraining the repository part, for example by using a more permissive regex or `pastedText.lastIndexOf(':')` and slicing from there.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
core/frontend/src/components/kraken/modals/ExtensionCreationModal.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/kraken/modals/ExtensionCreationModal.vue
Outdated
Show resolved
Hide resolved
8c101c5 to
7e0ee21
Compare
patrickelectric
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: #3127
Summary by Sourcery
Improve the extension creation modal UX for setting Docker tags and saving custom extensions.
New Features: