Show Explore Extensions for self-hosted with static JSON fallback; remove legacy APPS_MARKETPLACE_API_URL#6391
Show Explore Extensions for self-hosted with static JSON fallback; remove legacy APPS_MARKETPLACE_API_URL#6391lkostrowski wants to merge 23 commits intomainfrom
Conversation
…d and remove legacy APPS_MARKETPLACE_API_URL Self-hosted instances may not have the extensions marketplace API configured. When EXTENSIONS_API_URL is not set, the "Explore" nav item is now hidden and navigating to /extensions/explore returns a 404. Also removes the legacy APPS_MARKETPLACE_API_URL env variable and its orphaned getAppsConfig() function, which was never called anywhere. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 8740a7f The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR makes the “Explore Extensions” experience conditional on EXTENSIONS_API_URL being configured, and removes the legacy APPS_MARKETPLACE_API_URL configuration wiring across build, runtime, docs, and CI/CD workflows.
Changes:
- Gate the Explore Extensions route and sidebar menu item behind a new
hasExtensionsApiUrl()check. - Remove
APPS_MARKETPLACE_API_URLfrom injected runtime config, types, test setup, Docker/build scripts, Storybook, and GitHub workflows. - Update documentation and
.env.templateto reflect the new/optional Explore Extensions configuration.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
vite.config.js |
Stops loading/injecting removed APPS_MARKETPLACE_API_URL env var. |
types.d.ts |
Removes APPS_MARKETPLACE_API_URL from window.__SALEOR_CONFIG__ typings. |
testUtils/setup.ts |
Removes APPS_MARKETPLACE_API_URL from test config fixture. |
src/index.html |
Removes APPS_MARKETPLACE_API_URL from runtime config injection. |
src/extensions/index.tsx |
Routes /explore to NotFound when EXTENSIONS_API_URL is unset. |
src/config.ts |
Removes getAppsConfig; adds hasExtensionsApiUrl(). |
src/components/Sidebar/menu/hooks/useMenuStructure.tsx |
Hides “Explore extensions” sidebar item when URL is unset. |
nginx/replace-env-vars.sh |
Removes runtime replacement for APPS_MARKETPLACE_API_URL. |
docs/docker.md |
Removes APPS_MARKETPLACE_API_URL from Docker examples. |
docs/configuration.md |
Removes marketplace config and updates EXTENSIONS_API_URL description. |
Dockerfile |
Removes marketplace build args/env; keeps Extensions API default (see comment). |
.storybook/preview-head.html |
Removes APPS_MARKETPLACE_API_URL from Storybook config. |
.github/workflows/*.yml / .yaml |
Removes marketplace env vars and legacy API_URI wiring in workflows. |
.github/actions/run-pw-tests/action.yml |
Removes legacy API_URI env wiring for Playwright action. |
.env.template |
Removes marketplace var; comments out EXTENSIONS_API_URL by default. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6391 +/- ##
==========================================
+ Coverage 43.13% 43.15% +0.01%
==========================================
Files 2524 2525 +1
Lines 44009 44023 +14
Branches 10011 10438 +427
==========================================
+ Hits 18983 18997 +14
+ Misses 24985 23704 -1281
- Partials 41 1322 +1281 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…nd remove Dockerfile default Address review feedback: - Hide "Explore" option in AddExtensionDropdown when EXTENSIONS_API_URL is unset - Hide "Go to explore extensions" action in Navigator Search when unset - Remove default EXTENSIONS_API_URL value from Dockerfile so self-hosted Docker builds don't implicitly enable the explore feature Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
.changeset/fiery-pigs-kiss.md:6
- Release note grammar/clarity: consider adding a period and naming the env var (
EXTENSIONS_API_URL) explicitly so readers know what "not configured" means.
When App Store is not configured (env variable not set), Dashboard will no longer render sidebar "Explore" button, which is Cloud only feature
...xtensions/views/InstalledExtensions/components/AddExtensionDropdown/AddExtensionDropdown.tsx
Outdated
Show resolved
Hide resolved
When EXTENSIONS_API_URL is not provided as a build arg, Vite's loadEnv returns undefined, and the EJS template renders the literal string "undefined" into index.html — which is truthy. Fix at two levels: - vite.config.js: default inject data to "" instead of undefined - config.ts: hasExtensionsApiUrl() also rejects the string "undefined" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| ## backward compatibility for older versions | ||
| API_URI: ${{ inputs.API_URL }} |
There was a problem hiding this comment.
some 100 years old legacy, cleaned that up
The Explore page was previously hidden entirely when EXTENSIONS_API_URL was not configured. This was too aggressive — self-hosted users still need to see available extensions. Changes: - Remove hasExtensionsApiUrl() gating from sidebar, dropdown, navigator search, and route — Explore is now always accessible - Add Zod schema (schema.ts) for extensions data validation with discriminated union on type field, supporting PARTNER kind - When EXTENSIONS_API_URL is not set, fall back to bundled extensions.json instead of showing an error - Show info banner for self-hosted users: "Apps are available for Saleor Cloud users. Most of them are available to self host." - Make ExtensionsGroups a flexible Record<string, ...> to support dynamic categories like "agentic-commerce" - Remove unused hasExtensionsApiUrl function from config.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…r-dashboard into hide-extensions-self-hosted
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| extensions.json contain static list of plugins and apps to be displayed in "explore" page. | ||
|
|
||
| This is fallback list for open source. For Saleor Cloud all extensions (apps and plugins) are listed via EXTENSIONS_API_URL endpoint | ||
|
|
||
| This list should be synced with App Store in case of new apps are available there |
There was a problem hiding this comment.
This README has several grammar issues (e.g. "extensions.json contain" -> "extensions.json contains", missing articles/punctuation). Please correct the wording so it reads cleanly in docs.
| When App Store is not configured (env variable not set), Dashboard will not longer crash. Instead it will load | ||
| local catalog of apps and plugins to render them as a fallback |
There was a problem hiding this comment.
Typo/grammar in changeset text: "will not longer crash" -> "will no longer crash" (and consider using "an environment variable" / add punctuation to the sentence).
- Make sed pattern whitespace-agnostic in replace-env-vars.sh so it works even if index.html is minified (use [[:space:]]* instead of literal space) - Move schema import to top of types.ts with other imports to satisfy simple-import-sort/imports rule Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Static JSON fallback with extensions.json bundled catalog
Zod schema validation for extensions data
Info banner for self-hosted users
Removal of legacy APPS_MARKETPLACE_API_URL
Cleanup of env vars across Docker, CI workflows, docs