Skip to content

Redirect to app redirect landing page in admin#7031

Draft
dmerand wants to merge 1 commit intomainfrom
dlm-dev-redirect-admin-landing
Draft

Redirect to app redirect landing page in admin#7031
dmerand wants to merge 1 commit intomainfrom
dlm-dev-redirect-admin-landing

Conversation

@dmerand
Copy link
Contributor

@dmerand dmerand commented Mar 17, 2026

What

Route the CLI preview URL through the admin-web preflight entrypoint instead of linking directly into the app redirect flow.

Use the same preview entry URL shape for local stores, with admin.shop.dev as the unified admin host.

Why

Pressing p from shopify app dev should reopen Dev Console through the UI layer that owns that state.

Sending the browser directly to Core's redirect flow gets the app installed or redirected, but it does not reliably restore Dev Console for all app shapes. Moving the entrypoint to admin-web keeps the Dev Console concern in admin-web instead of threading it through OAuth and callback URLs.

How

  • update buildAppURLForWeb to generate /store/<store>/extensions-dev/preview?client_id=...
  • keep the production host on admin.shopify.com
  • map local stores to the same admin-web path on admin.shop.dev
  • use that builder for local store preview URLs in setup-dev-processes
  • add coverage for the local payload path that also surfaces app.url

Testing

Manual verification:

  • Verified with the apps-platform rig in local development
  • Confirmed the preview flow restores Dev Console for embedded app flows after entering through admin-web preflight

Additional checks:

  • Run shopify app dev against a production-like store and press p
  • Run SHOPIFY_SERVICE_ENV=local shopify app dev against a local store and confirm the preview URL uses https://admin.shop.dev/store/<store>/extensions-dev/preview?...
  • Open the preview URL and verify the flow enters admin-web before continuing to the existing app redirect flow

Copy link
Contributor Author

dmerand commented Mar 17, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 77.24% 14564/18855
🟡 Branches 70.86% 7223/10194
🟡 Functions 76.21% 3700/4855
🟡 Lines 78.73% 13769/17488

Test suite run success

3797 tests passing in 1467 suites.

Report generated by 🧪jest coverage report action from 5d9d9d4

@dmerand dmerand force-pushed the dlm-dev-redirect-admin-landing branch from 8792dc6 to 5d9d9d4 Compare March 17, 2026 15:51
@dmerand
Copy link
Contributor Author

dmerand commented Mar 17, 2026

One implementation note: this PR intentionally does not change globally.\n\nThe bug here is specifically about the preview-entry URL for , so the change is scoped to store-aware preview URL building and local-store preview wiring. That fixes the user-facing flow without changing the broader local admin host convention repo-wide.\n\nThere is still a separate local-dev consistency question around vs for generic admin host helpers. If we want to clean that up, I think it should be a follow-up that audits current callers and decides whether they want a generic admin host or a store-scoped unified admin URL.

@dmerand
Copy link
Contributor Author

dmerand commented Mar 17, 2026

Follow-up on the note above — reposting with formatting fixed:

This PR intentionally does not change adminFqdn() globally.

The bug here is specifically about the preview-entry URL for shopify app dev, so the change is scoped to store-aware preview URL building and local-store preview wiring. That fixes the user-facing flow without changing the broader local admin host convention repo-wide.

There is still a separate local-dev consistency question around admin.my.shop.dev vs admin.shop.dev for generic admin host helpers. If we want to clean that up, I think it should be a follow-up that audits current adminFqdn() callers and decides whether they want a generic admin host or a store-scoped unified admin URL.

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.

1 participant