Skip to content

Default allowed_domains to empty array when not configured#7312

Merged
melissaluu merged 2 commits into
mainfrom
ml-default-empty-allowed-domains
Apr 15, 2026
Merged

Default allowed_domains to empty array when not configured#7312
melissaluu merged 2 commits into
mainfrom
ml-default-empty-allowed-domains

Conversation

@melissaluu

Copy link
Copy Markdown
Contributor

When allowed_domains is not set in the app toml, the websocket payload now sends [] instead of omitting the field. This makes it easier for clients to handle the field without null checks.

Changes

  • getAdminConfig() in store.ts: allowed_domains ?? [] instead of bare allowed_domains
  • Updated test expectation from toBeUndefined() to toStrictEqual([])

Copilot AI review requested due to automatic review settings April 15, 2026 14:54
@melissaluu melissaluu requested a review from a team as a code owner April 15, 2026 14:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the dev extensions websocket payload so app.allowedDomains is consistently an array when an admin extension exists, simplifying client handling of the field.

Changes:

  • Default allowedDomains to [] when admin.allowed_domains is not configured.
  • Update a unit test to expect [] instead of undefined when admin config removes allowed domains.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/app/src/cli/services/dev/extension/payload/store.ts Defaults allowedDomains to an empty array in admin config mapping.
packages/app/src/cli/services/dev/extension/payload/store.test.ts Updates expectation for cleared allowed domains to [].

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/app/src/cli/services/dev/extension/payload/store.ts
Comment thread packages/app/src/cli/services/dev/extension/payload/store.test.ts
@melissaluu melissaluu added this pull request to the merge queue Apr 15, 2026
Merged via the queue into main with commit 55b53c7 Apr 15, 2026
24 of 25 checks passed
@melissaluu melissaluu deleted the ml-default-empty-allowed-domains branch April 15, 2026 15:24
MitchLillie added a commit that referenced this pull request Apr 29, 2026
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project).

The hosted app project is being discontinued. This PR removes:
- The admin extension specification (static_root, allowed_domains)
- The HOSTED_APPS environment variable and template switching
- Web build execution during deploy
- Template application_url preservation during app creation
- Admin-specific dev server asset serving

What's preserved:
- Asset upload infrastructure (include_assets client step) - used by other extension types
- admin_link specification - separate extension type for admin links with intents
- Client steps system - general build pipeline infrastructure
- devSessionWatchConfig - general watch path infrastructure

Reverted PRs:
- #7027 - Add admin hosted app local spec
- #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set
- #7208 - Run web build commands during deploy for hosted apps
- #7225 - Preserve template application_url during app creation
- #7227 - notify extension dev server of app assets updates (admin parts only)
- #7312 - Default allowed_domains to empty array when not configured
MitchLillie added a commit that referenced this pull request Apr 29, 2026
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project).

The hosted app project is being discontinued. This PR removes:
- The admin extension specification (static_root, allowed_domains)
- The HOSTED_APPS environment variable and template switching
- Web build execution during deploy
- Template application_url preservation during app creation
- Admin-specific dev server asset serving

What's preserved:
- Asset upload infrastructure (include_assets client step) - used by other extension types
- admin_link specification - separate extension type for admin links with intents
- Client steps system - general build pipeline infrastructure
- devSessionWatchConfig - general watch path infrastructure

Reverted PRs:
- #7027 - Add admin hosted app local spec
- #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set
- #7208 - Run web build commands during deploy for hosted apps
- #7225 - Preserve template application_url during app creation
- #7227 - notify extension dev server of app assets updates (admin parts only)
- #7312 - Default allowed_domains to empty array when not configured
MitchLillie added a commit that referenced this pull request May 7, 2026
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project).

The hosted app project is being discontinued. This PR removes:
- The admin extension specification (static_root, allowed_domains)
- The HOSTED_APPS environment variable and template switching
- Web build execution during deploy
- Template application_url preservation during app creation
- Admin-specific dev server asset serving

What's preserved:
- Asset upload infrastructure (include_assets client step) - used by other extension types
- admin_link specification - separate extension type for admin links with intents
- Client steps system - general build pipeline infrastructure
- devSessionWatchConfig - general watch path infrastructure

Reverted PRs:
- #7027 - Add admin hosted app local spec
- #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set
- #7208 - Run web build commands during deploy for hosted apps
- #7225 - Preserve template application_url during app creation
- #7227 - notify extension dev server of app assets updates (admin parts only)
- #7312 - Default allowed_domains to empty array when not configured
MitchLillie added a commit that referenced this pull request May 7, 2026
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project).

The hosted app project is being discontinued. This PR removes:
- The admin extension specification (static_root, allowed_domains)
- The HOSTED_APPS environment variable and template switching
- Web build execution during deploy
- Template application_url preservation during app creation
- Admin-specific dev server asset serving

What's preserved:
- Asset upload infrastructure (include_assets client step) - used by other extension types
- admin_link specification - separate extension type for admin links with intents
- Client steps system - general build pipeline infrastructure
- devSessionWatchConfig - general watch path infrastructure

Reverted PRs:
- #7027 - Add admin hosted app local spec
- #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set
- #7208 - Run web build commands during deploy for hosted apps
- #7225 - Preserve template application_url during app creation
- #7227 - notify extension dev server of app assets updates (admin parts only)
- #7312 - Default allowed_domains to empty array when not configured
MitchLillie added a commit that referenced this pull request May 7, 2026
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project).

The hosted app project is being discontinued. This PR removes:
- The admin extension specification (static_root, allowed_domains)
- The HOSTED_APPS environment variable and template switching
- Web build execution during deploy
- Template application_url preservation during app creation
- Admin-specific dev server asset serving

What's preserved:
- Asset upload infrastructure (include_assets client step) - used by other extension types
- admin_link specification - separate extension type for admin links with intents
- Client steps system - general build pipeline infrastructure
- devSessionWatchConfig - general watch path infrastructure

Reverted PRs:
- #7027 - Add admin hosted app local spec
- #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set
- #7208 - Run web build commands during deploy for hosted apps
- #7225 - Preserve template application_url during app creation
- #7227 - notify extension dev server of app assets updates (admin parts only)
- #7312 - Default allowed_domains to empty array when not configured
MitchLillie added a commit that referenced this pull request May 7, 2026
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project).

The hosted app project is being discontinued. This PR removes:
- The admin extension specification (static_root, allowed_domains)
- The HOSTED_APPS environment variable and template switching
- Web build execution during deploy
- Template application_url preservation during app creation
- Admin-specific dev server asset serving

What's preserved:
- Asset upload infrastructure (include_assets client step) - used by other extension types
- admin_link specification - separate extension type for admin links with intents
- Client steps system - general build pipeline infrastructure
- devSessionWatchConfig - general watch path infrastructure

Reverted PRs:
- #7027 - Add admin hosted app local spec
- #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set
- #7208 - Run web build commands during deploy for hosted apps
- #7225 - Preserve template application_url during app creation
- #7227 - notify extension dev server of app assets updates (admin parts only)
- #7312 - Default allowed_domains to empty array when not configured
MitchLillie added a commit that referenced this pull request May 8, 2026
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project).

The hosted app project is being discontinued. This PR removes:
- The admin extension specification (static_root, allowed_domains)
- The HOSTED_APPS environment variable and template switching
- Web build execution during deploy
- Template application_url preservation during app creation
- Admin-specific dev server asset serving

What's preserved:
- Asset upload infrastructure (include_assets client step) - used by other extension types
- admin_link specification - separate extension type for admin links with intents
- Client steps system - general build pipeline infrastructure
- devSessionWatchConfig - general watch path infrastructure

Reverted PRs:
- #7027 - Add admin hosted app local spec
- #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set
- #7208 - Run web build commands during deploy for hosted apps
- #7225 - Preserve template application_url during app creation
- #7227 - notify extension dev server of app assets updates (admin parts only)
- #7312 - Default allowed_domains to empty array when not configured
MitchLillie added a commit that referenced this pull request May 8, 2026
This reverts most changes from the hosted app project (Admin Extensibility → "hosted app" sub-project).

The hosted app project is being discontinued. This PR removes:
- The `admin` extension specification (`admin.ts` with `static_root`, `allowed_domains`)
- Web build execution during deploy
- Template `application_url`/`redirect_urls` preservation during app creation
- Admin-specific dev server asset serving (`getAppAssets`, `allowedDomains` in payload)

What is preserved:
- `HOSTED_APPS` environment variable and `isHostedAppsMode()` function
- `buildNoneTemplate()` with conditional template selection (uses extension-only template when `HOSTED_APPS=1`)
- Asset upload infrastructure (`include_assets` client step) - used by other extension types
- `admin_link` specification - separate extension type for admin links with intents
- `assetResolvers` in dev server store - per-extension URL→path mapping
- Client steps system - general build pipeline infrastructure

Reverted PRs:
- #7027 - Add admin hosted app local spec
- #7096 - Switch app init template (partially - kept template switching, removed other hosted app setup)
- #7208 - Run web build commands during deploy for hosted apps
- #7225 - Preserve template application_url during app creation
- #7227 - Notify extension dev server of app assets updates (admin parts only)
- #7312 - Default allowed_domains to empty array when not configured
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants