From a21d2e584bd4ac65e44e886cd79540d284f7f3aa Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Tue, 30 Jun 2026 21:27:26 +0300 Subject: [PATCH] Suggest `shopify store open` for previewing created preview store Assisted-By: devx/e0c644e1-15e4-4763-9754-d6a4d1b34ad9 --- .../services/store/create/preview/result.test.ts | 13 ++++--------- .../src/cli/services/store/create/preview/result.ts | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/packages/store/src/cli/services/store/create/preview/result.test.ts b/packages/store/src/cli/services/store/create/preview/result.test.ts index 93edf444812..5e540f2b63f 100644 --- a/packages/store/src/cli/services/store/create/preview/result.test.ts +++ b/packages/store/src/cli/services/store/create/preview/result.test.ts @@ -26,7 +26,7 @@ const result = { } describe('preview store create result presenter', () => { - test('writes JSON output with the storefront URL', () => { + test('writes JSON output with the next steps', () => { writeCreatePreviewStoreResult(result, 'json') expect(outputResult).toHaveBeenCalledWith( @@ -43,7 +43,7 @@ describe('preview store create result presenter', () => { storefrontUrl: 'https://x12y45z.myshopify.com/?foo=bar', }, next_steps: [ - 'Open your store (https://x12y45z.myshopify.com/?foo=bar) to preview the storefront.', + 'Use `shopify store open --store x12y45z.myshopify.com` to preview the storefront.', 'Use `shopify store execute --store x12y45z.myshopify.com` to add products, collections, pages, and more.', 'Use `shopify theme pull --store x12y45z.myshopify.com` and `shopify theme push --store x12y45z.myshopify.com` to edit your store design.', ], @@ -70,13 +70,8 @@ describe('preview store create result presenter', () => { list: { items: [ [ - 'Open ', - { - link: { - label: 'your store', - url: 'https://x12y45z.myshopify.com/?foo=bar', - }, - }, + 'Use ', + {command: 'shopify store open --store x12y45z.myshopify.com'}, ' to preview the storefront.', ], [ diff --git a/packages/store/src/cli/services/store/create/preview/result.ts b/packages/store/src/cli/services/store/create/preview/result.ts index 491f3f895e4..bf167aa2e48 100644 --- a/packages/store/src/cli/services/store/create/preview/result.ts +++ b/packages/store/src/cli/services/store/create/preview/result.ts @@ -32,8 +32,8 @@ function serializeAsJson(result: CreatePreviewStoreResult) { function previewStoreNextSteps(result: CreatePreviewStoreResult): PreviewStoreNextStep[] { return [ { - json: `Open your store (${result.store.storefrontUrl}) to preview the storefront.`, - text: ['Open ', {link: {label: 'your store', url: result.store.storefrontUrl}}, ' to preview the storefront.'], + json: `Use \`shopify store open --store ${result.store.subdomain}\` to preview the storefront.`, + text: ['Use ', {command: `shopify store open --store ${result.store.subdomain}`}, ' to preview the storefront.'], }, { json: `Use \`shopify store execute --store ${result.store.subdomain}\` to add products, collections, pages, and more.`,