Skip to content

feat: migrate Aspen to Hydrogen 2026.10 and Weaverse v6 - #22

Merged
hta218 merged 11 commits into
mainfrom
feat/migrate-aspen-hydrogen
Nov 24, 2026
Merged

hta218 merged 11 commits into
mainfrom
feat/migrate-aspen-hydrogen

Conversation

@thanh251

Copy link
Copy Markdown
Contributor

Summary

Migrate Aspen to Hydrogen 2026.10 and @weaverse/hydrogen 6, following Pilot's migration approach.

  • Update Storefront queries, cart handlers, Customer Account OAuth, analytics and Weaverse integration to the new APIs.
  • Preserve Aspen's presentation and commerce behavior, including inventory limits, subscriptions, discounts, gift cards and order notes.
  • Retain the latest main fixes for merchant blog identity, Studio routing, search and product quantity controls.
  • Update regression fixtures and document migration, setup and verification results.

Validation

  • Typecheck, GraphQL validation and production build pass.
  • 186 TypeScript unit tests, 52 blog/CMS/route tests and 22 product quantity/stock browser tests pass.
  • Oxygen Preview build, upload and routability verification pass after merging main, including the cart-link fixes.
  • Live French OAuth: OTP, callback, session persistence after reload, localized logout and subsequent sign-in requirement pass.
  • Live cart: add, inventory-limit locking, persistence after reload and removal pass; the test item was removed and no order was placed.
  • Studio draft editing, saving, revalidation and reload persistence were verified locally against the migrated checkout.

Oxygen Preview

Release follow-up

An Unreleased changelog entry is included. The date-based version bump, tag and GitHub Release will follow in a separate release change after merge. Live Spanish OTP remains unverified.

Closes #11.

Port request handling, typed GraphQL, cart/account flows, product selection,
collection browsing, analytics and Weaverse integration while preserving
Aspen theme settings and presentation. Add regression coverage for collection
sorting, category filters, cursor recovery and transient account failures.

Validation: 179 unit tests, focused browser checks, typecheck, build and Biome.
Oxygen deployment and live customer OTP verification are deferred; no release.

Refs #11
@thanh251 thanh251 added the enhancement New feature or request label Nov 13, 2026
@thanh251
thanh251 requested a review from hta218 November 13, 2026 07:46

@hta218 hta218 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the combined-listing target regression and migrate its regression suite before merging. The selected Red child can produce a CTA to the Blue child. The existing suite currently fails at import; connecting it to the new production adapter exposes two failures out of four cases.

Validation: migration 8/8, customer-auth 11/11 and collection 4/4 tests passed. Isolated combined-listing probes used the committed production adapter. Build and live browser/checkout were not rechecked; local Node is 26, outside the supported range.

Comment thread app/components/product/product-form.tsx Resolved
Comment thread package.json Resolved
@thanh251
thanh251 requested a review from hta218 November 13, 2026 09:45

@hta218 hta218 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the full migration against base 3f0887d at head 5b1a079, including server lifecycle, cart, customer sessions, product selection, collections/search, caching and compatibility helpers. The two previous combined-listing findings are fixed. Please address the two new issues noted inline before merging.

Validation on Node 24: typecheck, GraphQL validation and production build pass; TypeScript unit tests pass 184/186, with both failures in the migrated Studio schema fixture described inline; combined-listing tests pass 6/6. JavaScript unit tests pass 62/66; the four failures are in the unchanged MiniOxygen security suite with the same dependency version as base, so they are not attributed to this PR. The checkout finding was verified through source and a mocked cart-read probe; live authenticated checkout and browser flows were not exercised.

Comment thread app/.server/cart.ts Resolved
@thanh251
thanh251 requested a review from hta218 November 16, 2026 04:50
@hta218

hta218 commented Nov 22, 2026

Copy link
Copy Markdown
Member

@thanh251 this PR has merge conflicts with main (which now includes the Biome → Vite+ switch and #25). Could you merge or rebase main into this branch, resolve the conflicts and re-run CI? I'll review it once it's mergeable. Note that #12, #23 and #24 also touch overlapping files, so you may want to coordinate the order.

@hta218 hta218 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the follow-up at 8f4a0e3 against previously reviewed 5b1a079, including the connected cart consumers and Studio fixtures. The Studio runtime fixture is fixed, and the combined-listing regression remains fixed. The authenticated checkout handoff is still incomplete for mutation responses; please address the inline finding before merging.

Validation on supported Node 24 with the committed lockfile: checkout handoff 5/5, Studio schema 10/10 and combined-listing 6/6 tests pass; typecheck, GraphQL validation and production build pass. An independent mocked probe using the production gateway and baseline selector confirms that a signed-in note mutation drops logged_in=true from the checkout URL used by the UI. Vite-node emitted EMFILE watcher warnings, but all assertions completed.

The branch still conflicts with main; please resolve those conflicts and rerun checks. Live OAuth, checkout, Studio and Oxygen deployment were not rerun.

Comment thread app/.server/cart-gateway.ts Resolved
@thanh251
thanh251 requested a review from hta218 November 23, 2026 09:47
@thanh251
thanh251 requested review from hta218 and removed request for hta218 November 23, 2026 11:57

@hta218 hta218 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing this through. The migration follows Pilot's 2026.10 layout closely and the earlier review threads hold up. The combined-listing fix is in, and every gateway cart path (create, line add/update/remove, discounts, note, buyer identity, gift cards) now gets logged_in=true from a token resolved before the writes. #25's recordCompletedCartAdd flow also made it through the merge intact.

One real problem is left: Hydrogen 2026.10's CSP builder throws on invalid sources, and getWeaverseCsp still puts the raw ?weaverseHost= query value into the policy, so anyone can turn any page into a 500. Beyond that there's an extra Storefront round trip on every add, plus a set of nits: dead code, leftover Pilot references and a stale lint directive.

One more thing outside the diff: vite.config.ts CHECK_IGNORES still lists the deleted storefront-api.generated.d.ts / customer-account-api.generated.d.ts. Please swap them for the gitignored storefront-graphql-env.d.ts / customer-account-graphql-env.d.ts.

Comment thread app/entry.server.tsx Resolved
Comment thread app/.server/cart-gateway.ts Resolved
Comment thread app/.server/cart-gateway.ts Resolved
Comment thread app/utils/root.server.ts Resolved
Comment thread app/utils/root.server.ts Resolved
Comment thread app/components/pagination.tsx Resolved
Comment thread app/utils/customer-account.ts Resolved
Comment thread app/.server/storefront.ts Resolved
Comment thread app/.server/customer-account.ts Resolved
Comment thread README.md Resolved
@hta218

hta218 commented Nov 24, 2026

Copy link
Copy Markdown
Member

@thanh251 heads-up: #12 (Themivo wishlist) just landed, so this PR conflicts with main again. That's about 15 files, mainly the wishlist components, root.tsx, server.ts, env.d.ts, ci.yml, plus modify/delete on codegen.ts and the *.generated.d.ts files. When you address the review above, please merge main in as well. A few things to carry over into the 2026.10 setup:

  • Integrate Themivo Wishlist & Alerts into Aspen #12's readThemivoAppearance(..., context) now uses createWithCache with context.cache/waitUntil, so make sure the new context still provides both.
  • Keep the Themivo unit-test steps in ci.yml.
  • Re-run codegen against the new gql.tada setup instead of keeping the old generated files.

@thanh251

thanh251 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Addressed the latest review in 85ae6c2 and merged current main (b1d415e, including #12). The branch is mergeable again.

  • Sanitized preview CSP origins so malformed weaverseHost values cannot cause storefront 500s; added real CSP-builder regression coverage.
  • Removed the duplicate identity sync for existing-cart adds and return the synchronized cart when creating a cart. Kept the intentional pre-write customer/market binding and the authenticated checkout handoff.
  • Applied the requested fragment composition, metadata ordering, unused-code/type cleanup, Aspen wording, warning deduplication and lint/config cleanup. CHECK_IGNORES now uses the gql.tada environment filenames.
  • Preserved Themivo's cache/waitUntil context and CI suites, migrated its queries/cache integration to the v6 APIs, and removed the obsolete generated files.
  • Fixed a merge regression in private-wishlist analytics: cart reconciliation remains active while route/cart tracking and persistent GTM callbacks are suppressed on private URLs. Tracking resumes without replaying private cart additions. Added browser regressions for client navigation, localized URLs and direct private-page loads, and included them in CI.

Local validation on Node 24: typecheck/GraphQL validation, production build, static checks (no errors), all 37 TypeScript unit suites, combined-listing tests, 21 existing targeted browser tests, the 2 new private-wishlist analytics browser tests, and the worker/SSR/client optimizer runtime probe passed.

This follow-up did not rerun live OAuth/checkout or deploy a new Oxygen preview. The new browser regressions use the production components and SDK cart tracker with fixture transport/store boundaries.

CI passed on this commit: https://github.com/Weaverse/aspen/actions/runs/45327199213

@thanh251
thanh251 requested a review from hta218 November 24, 2026 04:36

@hta218 hta218 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 85ae6c2 against 34c4e64. I separated your fixes from the merge of #12 with git show --remerge-diff. All 16 threads from the last round are addressed: the CSP host is sanitized, the cart add no longer double-syncs, the fragments are composed, the charset now comes first, and the dead code is gone. The Themivo merge resolution (analytics opt-out, Oxygen-Cache-Control, SessionData, the login path) also looks right.

One regression came in with the merge: the Themivo queries lost their market context. See inline. The rest are nits.

Validation on Node 24.20: npm run check (0 errors), format:check, typecheck (including hydrogen gql check) and the production build all pass. Every CI regression suite passes: checkout handoff 40/40, CSP 7/7, layout fragments 1/1, customer auth 12/12, Studio schema 10/10, Themivo wishlist 22/22, products 6/6, appearance 9/9 and combined listing 6/6. I did not run the private-wishlist Playwright suite.

Comment thread app/utils/themivo-products.server.ts Resolved
Comment thread app/utils/themivo-products.server.ts Resolved
Comment thread app/.server/storefront.ts Resolved
Comment thread vite.config.ts Resolved
@thanh251
thanh251 requested a review from hta218 November 24, 2026 09:42

@hta218 hta218 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All four follow-ups verified at 14db276: Themivo queries carry market context again, the locale copy is gone, and the config files are formatting-only changes. Re-ran on Node 24.20: typecheck (incl. hydrogen gql check), check, format:check and build pass; themivo-products 10/10, customer-auth 12/12, checkout handoff 40/40, CSP 7/7 and themivo-wishlist 22/22.

@hta218
hta218 merged commit 9bbdc25 into main Nov 24, 2026
1 check passed
@hta218
hta218 deleted the feat/migrate-aspen-hydrogen branch November 24, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Aspen to Hydrogen 2026.10 and @weaverse/hydrogen 6

2 participants