Skip to content

Revert hosted app project changes#7361

Draft
MitchLillie wants to merge 2 commits intomainfrom
cx-revert-hosted-app
Draft

Revert hosted app project changes#7361
MitchLillie wants to merge 2 commits intomainfrom
cx-revert-hosted-app

Conversation

@MitchLillie
Copy link
Copy Markdown
Contributor

Hosted App Revert Plan

Summary

Reverts all changes from the hosted app project (Admin Extensibility → "hosted app" sub-project) while preserving asset upload infrastructure used by other extension types.


PRs Reverted (Merged)

PR Title Merged Action
#7027 Add admin hoted app local spec Mar 30 Full revert
#7096 Switch app init template to hosted app when HOSTED_APPS env var is set Apr 1 Full revert
#7208 Run web build commands during deploy for hosted apps Apr 13 Full revert
#7225 Preserve template application_url during app creation Apr 14 Full revert
#7227 notify extension dev server of app assets updates Apr 14 Partial revert - remove admin/allowed_domains parts only
#7312 Default allowed_domains to empty array when not configured Apr 15 Full revert

PRs KEPT (Asset Upload Infrastructure)

PR Title Reason
#6965 Create abstract client steps infrastructure Core infrastructure for include_assets step
#6867 Refactor extension build process to use modular build steps Used by ui_extension, channel, flow_template, etc.
#6966 Add client steps implementation Implements include_assets step for asset uploads
#7334 Remove buildConfig from specifications Cleanup refactor - all specs migrated to clientSteps
#7132 Support assets for admin links Creates admin_link spec (different from hosted app admin)
#7134 Support intents for ui extensions UI extension intents (not hosted-app specific)
#7137 Fix admin URL for local core Not hosted-app specific
#7220 Extract custom watch paths to specifications Not hosted-app specific

Open PRs to Close (manually)

PR Title
#7197 Remove HOSTED_APPS env var, make extension-only template the default
#7320 Fix web/extension build ordering for deploy and dev
#7337 Diagnostic tracing and levers for dev session hot reload
#7338 Update CLI option for serverless app home

Detailed File Changes

Deleted Files

  • packages/app/src/cli/models/extensions/specifications/admin.ts

Modified Files

cli-kit package

  • packages/cli-kit/src/private/node/constants.ts - Remove hostedApps: 'HOSTED_APPS'
  • packages/cli-kit/src/public/node/context/local.ts - Remove isHostedAppsMode() function
  • packages/cli-kit/src/public/node/context/local.test.ts - Remove tests

app package - Init/Templates

  • packages/app/src/cli/prompts/init/init.ts - Remove hosted app template switching, restore static none template
  • packages/app/src/cli/prompts/init/init.test.ts - Remove tests

app package - Extension Specifications

  • packages/app/src/cli/models/extensions/load-specifications.ts - Remove admin spec import and registration
  • packages/app/src/cli/models/extensions/extension-instance.ts - Remove default case in UID generation

app package - Deploy

  • packages/app/src/cli/services/deploy/bundle.ts - Remove web build during deploy
  • packages/app/src/cli/services/deploy/bundle.test.ts - Remove tests

app package - App Creation

  • packages/app/src/cli/utilities/developer-platform-client.ts - Remove applicationUrl, redirectUrls, staticRoot from CreateAppOptions
  • packages/app/src/cli/utilities/developer-platform-client/partners-client.ts - Use default URLs
  • packages/app/src/cli/utilities/developer-platform-client/partners-client.test.ts - Remove test
  • packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts - Use default URLs, remove admin module
  • packages/app/src/cli/utilities/developer-platform-client/app-management-client.test.ts - Remove tests
  • packages/app/src/cli/models/app/loader.ts - Remove URL extraction from template config
  • packages/app/src/cli/models/app/loader.test.ts - Remove tests
  • packages/app/src/cli/models/app/app.ts - Remove URLs from creationDefaultOptions()

app package - Dev Server

  • packages/app/src/cli/services/dev/extension/payload/store.ts - Remove admin config, app assets, allowed_domains
  • packages/app/src/cli/services/dev/extension/payload/store.test.ts - Remove tests
  • packages/app/src/cli/services/dev/extension/payload/models.ts - Remove allowedDomains and assets from payload
  • packages/app/src/cli/services/dev/extension/server.ts - Remove app assets middleware
  • packages/app/src/cli/services/dev/extension/server/middlewares.ts - Remove getAppAssetsMiddleware
  • packages/app/src/cli/services/dev/extension.ts - Remove app assets and admin config handling
  • packages/app/src/cli/services/dev/extension.test.ts - Remove tests

Test plan

  1. Run pnpm test - all existing tests pass
  2. Run shopify app init - extension-only template uses shopify-app-template-none
  3. Run shopify app deploy - web build does NOT run
  4. Verify admin_link extensions still work correctly

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
@github-actions github-actions Bot added the devtools-gardener Post the issue or PR to Slack for the gardener label Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/private/node/constants.d.ts
@@ -34,7 +34,6 @@ export declare const environmentVariables: {
     skipNetworkLevelRetry: string;
     maxRequestTimeForNetworkCalls: string;
     disableImportScanning: string;
-    hostedApps: string;
 };
 export declare const defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com";
 export declare const systemEnvironmentVariables: {
packages/cli-kit/dist/public/node/context/local.d.ts
@@ -25,13 +25,6 @@ export declare function isDevelopment(env?: NodeJS.ProcessEnv): boolean;
  * @returns True if SHOPIFY_FLAG_VERBOSE is truthy or the flag --verbose has been passed.
  */
 export declare function isVerbose(env?: NodeJS.ProcessEnv): boolean;
-/**
- * Returns true if the hosted apps mode is enabled.
- *
- * @param env - The environment variables from the environment of the current process.
- * @returns True if HOSTED_APPS is truthy.
- */
-export declare function isHostedAppsMode(env?: NodeJS.ProcessEnv): boolean;
 /**
  * Returns true if the environment in which the CLI is running is either
  * a local environment (where dev is present).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devtools-gardener Post the issue or PR to Slack for the gardener

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant