Teach Hydrogen templates and skills about mock.shop's store catalog - #3986
Open
BobbyNguye wants to merge 7 commits into
Open
Teach Hydrogen templates and skills about mock.shop's store catalog#3986BobbyNguye wants to merge 7 commits into
BobbyNguye wants to merge 7 commits into
Conversation
mock.shop serves many stores, each on its own host (pets.mock.shop, ...), and none of them renders cart permalinks. The checkout interceptor only special-cased the bare mock.shop host, so a storefront pointed at a per-store host sent buyers to a 404. Treat every *.mock.shop host the same way and redirect to demostore.mock.shop. Assisted-By: devx/c47f963e-a81e-4fb1-b892-875281ad7726
Mock mode hard-coded the default store at mock.shop. mock.shop is a catalog of stores on their own hosts, so let a mock.shop host in PUBLIC_STORE_DOMAIN select that store's catalog (and imply mock mode). Document the directory at https://mock.shop/llms.txt in .env.example, the README, and AGENTS.md so developers and agents know they can choose. Assisted-By: devx/c47f963e-a81e-4fb1-b892-875281ad7726
Same change as the React Router template: a mock.shop host in NEXT_PUBLIC_STORE_DOMAIN selects that store's catalog and keeps the app in mock mode (no Customer Accounts, well-known mock token). The warning now names the store in use and points at the directory. Assisted-By: devx/c47f963e-a81e-4fb1-b892-875281ad7726
The storefront-client and setup skills described mock.shop as a single tokenless endpoint. Teach agents to read https://mock.shop/llms.txt, pick the store whose categories match what the user is building, and use its host as storeDomain. Assisted-By: devx/c47f963e-a81e-4fb1-b892-875281ad7726
… host The homepage notice now says how to pick another mock.shop store, and the isShopLinked gate keeps showing it for per-store hosts such as pets.mock.shop, which are still mock data. Adds a mockShopStore e2e env and smoke spec that boots the example against pets.mock.shop. Assisted-By: devx/c47f963e-a81e-4fb1-b892-875281ad7726
Content review: "many stores" is vague. The directory lists more than 100 sample stores, so say so in both AGENTS guides and the example homepage notice. Assisted-By: devx/c47f963e-a81e-4fb1-b892-875281ad7726
fredericoo
approved these changes
Sep 4, 2026
fredericoo
left a comment
Contributor
There was a problem hiding this comment.
very good! works fine for several mock shops
mock.shop now serves a mock checkout on each store's storefront host: no payment is taken and no real order is placed. The templates said checkout doesn't work, which would steer an agent away from a flow it can build and demo.
BobbyNguye
force-pushed
the
bobby/mock-shop-store-catalog-preview
branch
from
September 8, 2026 14:43
74ef3ef to
b48738e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preview-branch version of #3984 and #3985. Those target
main, which is frozen; this re-does the work for Hydrogen 3, where there is no scaffolding CLI, so the change lives in the templates, the packaged skills, the checkout interceptor, and the example app.TL;DR: mock.shop is not one store. It is a catalog of fictional stores, each on its own host, listed at https://mock.shop/llms.txt. Hydrogen treated it as a single endpoint, so anyone building without a store always got the default apparel catalog and no agent knew there was a choice. This PR lets developers pick a store with the store-domain env var they already have, and teaches agents that the catalog exists.
Before
In mock mode
PUBLIC_STORE_DOMAINwas ignored. The skills described mock.shop only as "all tokenless access supports".After
What this changes
demostore.mock.shopfor every*.mock.shophost, not only the baremock.shop. Per-store hosts do not render/cart/..., so the old check sent buyers to a 404.PUBLIC_STORE_DOMAINselects that store and implies mock mode..env.example, the README, andAGENTS.md("No store yet?") explain the directory.NEXT_PUBLIC_STORE_DOMAIN. The mock-mode warning names the store in use and points at the directory.hydrogen-storefront-clientandhydrogen-setupexplain that mock.shop is a catalog and how to pick a store whose categories match what the user is building.isShopLinkedgate keeps showing it for per-store hosts (still mock data), and amockShopStoree2e env plus smoke spec boot the example againstpets.mock.shop.Developer impact
Includes a patch changeset for
@shopify/hydrogen: the checkout interceptor fix and the skill guidance. No new exports and no runtime contract changes. Templates are in the changesetignorelist, so their changes carry no bump.One behaviour change in the React Router template:
PUBLIC_STORE_DOMAIN=<store>.mock.shoptogether with a private token now runs in mock mode (mock buyer IP, no storefront ID, well-known mock token) instead of real-store mode..myshopify.comdomains are unaffected.UX impact
The example app's homepage notice has new copy and links to https://mock.shop/llms.txt. The templates have no visible change unless a store is chosen.
Out of scope
previewhas noinit, so choosing a store is an env-var edit guided by docs and skills. Let init pick a mock.shop store #3985 has no equivalent here.Risk
.mock.shop, duplicated in core and both templates instead of exported from core, to keep templates dependency-light.mockShopStoresmoke spec depends onpets.mock.shopstaying published with a collection image and product images. It has both today.How to Test
pnpm install && pnpm build:pkgs.templates/react-router, runcp .env.example .env, setPUBLIC_STORE_DOMAIN=pets.mock.shop, and runpnpm dev.PUBLIC_STORE_DOMAINand reload. The default apparel catalog is back.templates/nextjs, runcp .env.example .env, setNEXT_PUBLIC_STORE_DOMAIN=pets.mock.shop, and runpnpm dev. Openhttp://localhost:3000. The server log saysRunning against mock.shop (pets.mock.shop)and the catalog is the pet store.examples/hydrogen, runpnpm e2e:smoke -g "mock.shop store". The spec boots the example againstpets.mock.shop, sees the notice with the directory link, and finds products.