Skip to content

Show Explore Extensions for self-hosted with static JSON fallback; remove legacy APPS_MARKETPLACE_API_URL#6391

Open
lkostrowski wants to merge 23 commits intomainfrom
hide-extensions-self-hosted
Open

Show Explore Extensions for self-hosted with static JSON fallback; remove legacy APPS_MARKETPLACE_API_URL#6391
lkostrowski wants to merge 23 commits intomainfrom
hide-extensions-self-hosted

Conversation

@lkostrowski
Copy link
Member

@lkostrowski lkostrowski commented Mar 2, 2026

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

…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>
Copilot AI review requested due to automatic review settings March 2, 2026 13:59
@changeset-bot
Copy link

changeset-bot bot commented Mar 2, 2026

🦋 Changeset detected

Latest 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

@lkostrowski lkostrowski changed the title Hide Explore extensions page when EXTENSIONS_API_URL is not set Hide Explore extensions page when EXTENSIONS_API_URL is not set; remove legacy APPS_MARKETPLACE_API_URL Mar 2, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_URL from injected runtime config, types, test setup, Docker/build scripts, Storybook, and GitHub workflows.
  • Update documentation and .env.template to 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
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 91.42857% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.15%. Comparing base (e640f8c) to head (8740a7f).

Files with missing lines Patch % Lines
...ions/views/ExploreExtensions/ExploreExtensions.tsx 0.00% 2 Missing ⚠️
...s/ExploreExtensions/hooks/useAppStoreExtensions.ts 95.65% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

lkostrowski and others added 2 commits March 2, 2026 15:21
…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>
Copilot AI review requested due to automatic review settings March 2, 2026 14:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

lkostrowski and others added 2 commits March 2, 2026 19:06
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>
Copilot AI review requested due to automatic review settings March 2, 2026 18:51
@lkostrowski lkostrowski marked this pull request as ready for review March 2, 2026 18:52
@lkostrowski lkostrowski requested a review from a team as a code owner March 2, 2026 18:52
@lkostrowski lkostrowski requested a review from witoszekdev March 2, 2026 18:52
Comment on lines -111 to -112
## backward compatibility for older versions
API_URI: ${{ inputs.API_URL }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some 100 years old legacy, cleaned that up

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.

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>
@lkostrowski lkostrowski added the test deployment Deploy Pull Request to *.saleor.rocks environment label Mar 3, 2026
@lkostrowski lkostrowski requested a review from witoszekdev March 3, 2026 07:15
Copilot AI review requested due to automatic review settings March 3, 2026 07:16
Copilot AI review requested due to automatic review settings March 5, 2026 08:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 31 changed files in this pull request and generated 7 comments.

Copilot AI review requested due to automatic review settings March 9, 2026 10:13
lkostrowski and others added 2 commits March 9, 2026 11:16
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@lkostrowski lkostrowski requested a review from witoszekdev March 9, 2026 10:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 31 changed files in this pull request and generated 7 comments.

Comment on lines +1 to +5
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
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +6
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
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo/grammar in changeset text: "will not longer crash" -> "will no longer crash" (and consider using "an environment variable" / add punctuation to the sentence).

Copilot uses AI. Check for mistakes.
witoszekdev
witoszekdev previously approved these changes Mar 9, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 31 changed files in this pull request and generated 5 comments.

Copilot AI review requested due to automatic review settings March 10, 2026 11:56
witoszekdev
witoszekdev previously approved these changes Mar 10, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 31 changed files in this pull request and generated 1 comment.

- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test deployment Deploy Pull Request to *.saleor.rocks environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants