fix(marketplace): detail CTA reflects installed state on tenant runtimes#1484
Merged
Merged
Conversation
The package-detail primary CTA stayed 'Install to cloud…' even for an already-installed package in an env console. The installed-state probe was gated on getRuntimeConfig().defaultEnvironmentId, which is empty on a per-subdomain tenant runtime — so the probe never ran. But getCloudInstallationInfo's same-origin /cloud-connection/installation path resolves the env by hostname and needs no explicit id (pairs with cloud #88). Drop the guard so the probe always runs; the CTA flips to 'Installed'. Also add the missing marketplace.action.installed i18n key (en 'Installed', zh '已安装') — code previously relied on a defaultValue fallback, so zh showed English.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
The in-env marketplace package-DETAIL CTA stayed '安装到云端… / Install to cloud…' even when the package was already installed in the current env. Root cause: the installed-state probe was gated on
getRuntimeConfig().defaultEnvironmentId, which is empty on a per-subdomain tenant runtime, so the probe never fired.getCloudInstallationInfo's same-origin/cloud-connection/installationpath resolves the env by hostname and needs no explicit id (pairs with cloud #88 which made that probe return correct data). Drop the guard → CTA flips to '已安装 / Installed'. Also adds the missingmarketplace.action.installedkey (was relying on a defaultValue fallback, so zh rendered English).Verified locally:
/cloud-connection/installation?package_id=…returns{installed:true}with the env session; with this change the detail CTA reads '已安装'.