Modernize React Router template runtime - #3965
Draft
fredericoo wants to merge 3 commits into
Draft
Conversation
Assisted-By: devx/46c44251-bc51-4b95-afdc-6afd5afa0f89
Assisted-By: devx/9ef896b5-6509-4da0-8c15-a4b7db693ff2
fredericoo
marked this pull request as draft
August 21, 2026 13:14
fredericoo
force-pushed
the
fb-rr-template-runtime-foundation
branch
from
August 21, 2026 13:27
5909cab to
a444250
Compare
Assisted-By: devx/9ef896b5-6509-4da0-8c15-a4b7db693ff2
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.
TL;DR: Establishes the current Oxygen and React Router runtime foundation before the discovery and purchase-flow template updates. This follows #3961.
Before
The template mixed legacy context fields with Router Context, did not provide Oxygen cache/
waitUntilto the Storefront client, used static shop identity, and had no Customer Account route or persistent account session.After
Middleware owns the Hydrogen request lifecycle using request-scoped Storefront and Customer Account clients, typed Worker contexts, Oxygen cache, encrypted account sessions, dynamic shop identity, and buyer-safe error handling.
What this changes
waitUntilthrough Router Context./account.Developer impact
No changeset. This updates the standalone React Router template and repo-local maintainer guidance without changing a published package API.
UX impact
The storefront displays its real shop name, provides a working Account destination, and retains the existing visual system. Customer Accounts remain disabled with setup guidance in mock mode.
Out of scope
Risk
How to Test
pnpm --filter @shopify/hydrogen build.pnpm --filter @shopify/hydrogen-template-react-router dev./,/collections,/search,/cart, and/accountwith no.env; confirm mock.shop content renders.pnpm --filter @shopify/hydrogen-template-react-router previewand repeat the route checks..env.example, then runnpm run https:devand accept the first-run certificate prompt.