Handle multiple sources for one extension#17031
Conversation
There was a problem hiding this comment.
Pull request overview
Improves the Extensions UI to better handle the case where the same extension exists in multiple repositories, preserving correct “installed” attribution and surfacing the source repository in the card footer.
Changes:
- Load Helm Apps to determine an installed extension’s original source repo and avoid incorrectly marking a different repo’s chart as installed.
- Introduce an “already installed from another source” uninstall-first modal (
UninstallExistingExtensionDialog.vue) and switch install-status tracking to use pluginid(vsname) to disambiguate duplicates. - Add shared extension-dialog styling mixin and expand unit tests for footer repo display + helm-op status tracking.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| shell/pages/c/_cluster/uiplugins/index.vue | Cross-references Helm Apps for source repo, updates install/uninstall flows for multi-source duplicates, tracks install state by id, shows repo footer item. |
| shell/pages/c/_cluster/uiplugins/tests/index.test.ts | Adds unit tests for repo footer display and updates helmOps watcher tests to use plugin ids. |
| shell/pages/c/_cluster/apps/charts/AppChartCardFooter.vue | Updates footer text styling (capitalization). |
| shell/dialog/UninstallExistingExtensionDialog.vue | New uninstall-first modal for “installed from another source” scenario. |
| shell/dialog/tests/UninstallExistingExtensionDialog.test.ts | Unit tests for the new dialog. |
| shell/dialog/InstallExtensionDialog.vue | Switches install status callback to use plugin id; adopts shared dialog mixin. |
| shell/dialog/UninstallExtensionDialog.vue | Switches uninstall status callback to use plugin id; adopts shared dialog mixin. |
| shell/assets/styles/base/_mixins.scss | Adds shared extension-dialog mixin. |
| shell/assets/translations/en-us.yaml | Adds i18n strings for the new uninstall-first modal text. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aalves08
left a comment
There was a problem hiding this comment.
Left a few comments @momesgin .
Functionally, seems to be working fine. Like advertised.
A couple of nitpicks with the presentation/visuals (@oboc-sts to reply, if possible):
In the case of Rancher Extensions, uppercase looks good to me, but for Elemental-Repo and others it seems weird... Just a personal opinion but I would prefer to see elemental-repo or ui-plugin-catalog-charts. This last one could be "translated" to Image Catalog or something and fallback to ui-plugin-catalog-charts.
Another one for @oboc-sts as well: In this scenario

I got the extension installed, but these two cards don't display anything (warning?) in regards to being an extension with the same ID already installed... Don't know if you guys covered this scenario or not but would love to hear your opinion on it 🙏
Thanks in advance
|
Thanks for pointing these @aalves08 ... I'm trying to go through them but I'm having some issues:
I... am not aware of having any case-sensitive formatting applied there, or I don't recall spec'ing something like this 😁 . Not for the extension, nor for the chart cards. @momesgin am I missing something here?
I see the screenshot but I have no idea which extensions you're talking about and what is the warning message you're missing? In other words, I need a bit of context / more details around this. Are you sure this is a matter related to the component (the card) itself and not to the installation process that should've checked if there is an extension already installed with that ID? |
@oboc-sts sorry for the lack of context, I tested with |
|
They seem duplicated, but I see they come from different repos. So they are not in fact identical. Or are they? I'm trying to better define the problem we're trying to solve here but it's still not clear to me. Maybe it's something I'm missing but having conflicts (in general, not necessarily for extensions) of this type (having extensions with the same ID, installing extensions from the same source, etc) is something that is (should be) always treated during the process (of adding, installing, etc) and doesn't have anything to do with the components being used in the end result. In other words, the warnings, errors and other conflictual use cases should be accounted for at "design time" (e.g. before the extension actually gets installed / added / etc), not "runtime" (after the extension is already installed / added / etc). The micro version of this would be: act proactively (try to prevent having identical extensions installed), not retroactively (passively inform the use there are identical extensions installed). Maybe having a call with you and @momesgin would clarify the whole case a bit more. |
@oboc-sts I thought it was by design, but I might've misunderstood that. Will address that along with this PR. Re the other question from @aalves08, I have the same understanding as you do. |
I am fine with that path @oboc-sts. Just wanted to raise it so that we would consider all angles, that's it. You are the UX man so I completely trust your opinion. As long as the experience is aligned with your expert analysis, I am fine with it 🙏 |
|
Thanks, Alex. I'll take it with @momesgin |
|
Just had a call with @momesgin and:
|
Totally in agreement 🙏 Thanks for looking into this |
|
@momesgin is this ready for approval? |
yes UPDATE: no! I forgot to address the wrong styling for the repo names, but now it's fixed. So now... YES! |
* display repo on extension cards * handle install/uninstall process for multiple extenstions with the same name * minor style + remove log * display repo name on installed card even after repo is removed * implement the final ux/ui * address feedback * remove unused code * update comments * add UninstallExistingExtensionDialog to PromptModal.test.ts * remove capitalize styling for the cards footer --------- Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local> Co-authored-by: nwmac <1955897+nwmac@users.noreply.github.com>
Summary
Fixes #16935
Fixes #16228
Occurred changes and/or fixed issues
UninstallExistingExtensionDialog.vuecomponent for handling this scenarioTechnical notes summary
availablecomputed property inshell/pages/c/_cluster/uiplugins/index.vuenow creates standalone items for installed plugins when the original repository is removed, rather than marking a fallback chart from another repo as "installed"originalRepoNameshowInstallDialogmethod now checks if the same extension is already installed from a different source and showsUninstallExistingExtensionDialoginstead ofInstallExtensionDialogshell/assets/styles/base/_mixins.scssused byInstallExtensionDialog,UninstallExtensionDialog, andUninstallExistingExtensionDialogAreas or cases that should be tested
Areas which could experience regressions
Screenshot/Video
multisourceext.mov
UPDATE:

addressing the wrong capitalization styling for repo names
Checklist
Admin,Standard UserandUser Base