Skip to content

Share dev preview helpers between app dev and future commands - #9026

Draft
nickwesselman wants to merge 1 commit into
nickw/fix-app-dev-store-token-accessfrom
nickw/dev-preview-helpers
Draft

nickwesselman wants to merge 1 commit into
nickw/fix-app-dev-store-token-accessfrom
nickw/dev-preview-helpers

Conversation

@nickwesselman

@nickwesselman nickwesselman commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Middle of a stack: on PR 9015 (automation token scopes) and under PR 9016 (app dev push).

WHY are these changes introduced?

app dev holds a few pieces of logic that a finite "push a dev preview and exit" command also needs: rewriting app URLs for a dev origin, uploading a compressed bundle to a signed URL, and building the admin preview link. Extracting them first keeps the command PR limited to new files.

WHAT is this pull request doing?

Refactor only; app dev, deploy, and the app loader behave exactly as before.

  • generateApplicationURLsForApp() replaces three copies of the same callback-path/app-proxy lookup in dev.ts, dev-push-to-be, and loader.ts.
  • uploadDevBundle() and devBundlePath() (new dev/dev-bundle.ts) replace the signed-URL-then-upload sequence in dev-session.ts.
  • buildAppURLForAdmin() gains a {devConsole: false} option.
  • uploadToGCS() and devSessionCreate() accept an optional AbortSignal; without one, requests are unchanged.
  • storeContext() gains ensureUserAccess (default true) so remote-only commands can skip user-access provisioning; blockIfMigrationIncomplete() only requires the fields it reads.

No changeset: nothing user-facing changes.

How to manually test your changes?

  1. Run pnpm shopify app dev against a dev store with --url-style tunnelling as usual; the preview and OAuth callback URLs should be identical to before.
  2. Edit an extension while app dev is running; the preview should update as before (this exercises the extracted upload helper).
  3. Run pnpm shopify app deploy; bundle upload is unchanged.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing and includes a minor changeset.

PR authored by Qlaw

@nickwesselman
nickwesselman added this pull request to stack #9027 October 27, 2026 15:54
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Oct 27, 2026
Extract URL rewriting, bundle upload, and admin preview link helpers; add optional cancellation to bundle upload and dev session creation; let store selection skip user-access provisioning. No behavior change for existing commands.

Co-authored-by: Qlaw <noreply@qlaw.quick.shopify.io>
@nickwesselman
nickwesselman removed this pull request from stack #9027 October 28, 2026 14:44
@nickwesselman
nickwesselman force-pushed the nickw/dev-preview-helpers branch from 2ef12cf to f694035 Compare October 28, 2026 14:44
@nickwesselman
nickwesselman changed the base branch from main to nickw/fix-app-dev-store-token-access October 28, 2026 14:44
@nickwesselman
nickwesselman added this pull request to stack #9036 October 28, 2026 14:44
@github-actions github-actions Bot added Area: @shopify/cli @shopify/cli package issues and removed no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. labels Oct 28, 2026

This branch has not been deployed

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

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant