Skip to content

Commit 10b964c

Browse files
committed
Merge main and preserve merchant blog identity with canonical routing
2 parents 7cdb8bc + ceb90c8 commit 10b964c

22 files changed

Lines changed: 983 additions & 86 deletions

‎CHANGELOG.md‎

Lines changed: 76 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,81 @@
11
# @weaverse/aspen
22

3-
## Unreleased
4-
5-
### Technical baseline refresh
6-
7-
- Aligned Hydrogen, React Router, React, TypeScript, Tailwind CSS, Vite, Shopify
8-
CLI/Oxygen tooling, Biome, and Weaverse SDK versions with Pilot's July 2026
9-
baseline.
10-
- Migrated route declarations from `@react-router/fs-routes` to React Router's
11-
programmatic route config while preserving existing public URLs.
12-
- Replaced `@shopify/remix-oxygen` application imports with current
13-
`react-router` and `@shopify/hydrogen/oxygen` entry points.
14-
- Migrated Weaverse component schema keys from deprecated `inspector` to
15-
`settings`, removed duplicate component registrations, and updated the
16-
Hydrogen router context integration.
17-
- Upgraded React Player to v3 and excluded its browser-only media stack from
18-
the Oxygen worker bundle while preserving lazy client-side loading.
19-
- Node.js 22.12 or newer is now required.
20-
21-
### Follow-up
22-
23-
- The approved React Router 7.16 baseline and an upstream GraphQL Codegen
24-
dependency currently retain high-severity npm advisories. Moving React Router
25-
to 7.18.2 or newer requires a separately approved baseline update; the Lodash
26-
advisory requires an upstream-compatible Codegen release.
27-
- Hydrogen/Vite currently emit upstream deprecation warnings for `envFile` and
28-
`transformWithEsbuild`; neither API is configured directly by Aspen.
29-
- The homepage dev smoke test still reports legacy missing-schema/unknown DOM
30-
property warnings from existing section data and prop forwarding. These do
31-
not block rendering (HTTP 200) but should be cleaned up section by section in
32-
a separate, behavior-focused change.
3+
## 2026.11.12
4+
5+
This release brings together the Aspen updates since `v2026.6.12`, with a
6+
refreshed storefront, more flexible page sections, and improvements to product
7+
discovery and cart reliability.
8+
9+
### Storefront design and page building
10+
11+
- Refreshed the header, navigation, footer, product cards, and customer account
12+
layouts, with improved spacing and behavior on mobile and tablet screens.
13+
- Added an Aspen 2026 design preset, with a Custom option for stores that want
14+
to use their own theme design settings.
15+
- Expanded Weaverse Studio controls for section backgrounds, image fit and
16+
alignment, borders, corner radii, and responsive layouts. Fixed cases where
17+
saved settings, cleared colors, or older section defaults were not respected.
18+
- Improved slideshows, promotion grids, featured collections, image-with-text,
19+
hotspots, testimonials, countdowns, scrolling text, and before-and-after
20+
sections, including smoother transitions and more consistent navigation.
21+
- Added consistent placeholder content for sections and storefront image
22+
selection for Instagram cards to make page setup easier.
23+
24+
### Product discovery and shopping
25+
26+
- Updated predictive search and the search results page with clearer result
27+
tabs, empty states, filters, and pagination. Search filter counts now reflect
28+
visible listings, and hidden listings are excluded from filter facets.
29+
- Improved collection sorting, filter drawers, layout controls, and mobile
30+
toolbars so shoppers can browse more comfortably across screen sizes.
31+
- Fixed product image stretching, gallery navigation, variant controls, and
32+
quick-view transitions. Standardized color swatches, badges, and sale prices,
33+
including price ranges for combined product listings.
34+
- Improved sold-out product handling and purchase availability, including
35+
adding products from quick shop when the cart is empty.
36+
37+
### Cart and checkout
38+
39+
- Refreshed the cart page and drawer with clearer order summaries, inline order
40+
notes, discount and gift-card feedback, and more consistent quantity controls.
41+
- Improved cart synchronization and rapid quantity updates to reduce stale
42+
counts and conflicting changes. Shared inventory limits are respected across
43+
cart lines, with clearer add-to-cart loading and availability feedback.
44+
- Improved drawer transitions, keyboard focus behavior, and the handoff from
45+
search and quick shop to the cart.
46+
47+
### Customer engagement
48+
49+
- Added customer wishlists on product cards and product pages, saved to the
50+
signed-in customer's account after the required Shopify metafield setup.
51+
- Added Klaviyo back-in-stock signup for unavailable variants and contact form
52+
submissions recorded as Klaviyo events when the integration is configured.
53+
- Added LoyaltyLion points hints on product pages and in the cart for signed-in
54+
customers when the integration is configured.
55+
- Improved account, address, and order views, plus review and subscription
56+
purchase controls.
57+
58+
### Languages and store content
59+
60+
- Expanded translatable storefront text and locale-aware links, prices, and
61+
customer-facing messages.
62+
- Fixed translation precedence so merchant-authored section content and saved
63+
theme text are preserved. Improved country and language selection behavior.
64+
- Improved merchant navigation links, blog and article links, sharing controls,
65+
and footer rich-text handling.
66+
67+
### Setup and upgrade notes
68+
69+
- Updated the Shopify Hydrogen and Weaverse foundation and supporting tools.
70+
Local development now requires Node.js `^22.18.0 || ^24.11.0`; use `npm ci`
71+
with the committed lockfile.
72+
- Added setup, section, integration, and customer wishlist guides in `docs/`.
73+
Wishlist, Klaviyo, and LoyaltyLion features require their documented setup;
74+
installing a Shopify app alone does not enable every headless integration.
75+
- Existing development/preview limitations remain documented in
76+
[Node validation](docs/node-support-validation.md) and the
77+
[upstream security comparison](docs/node-upstream-security.md), including
78+
MiniOxygen behavior, Studio reconnect checks, and CLI lockfile retention.
3379

3480
## 5.1.8
3581

‎app/routes/($locale).account.$.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { type LoaderFunctionArgs, redirect } from "react-router";
2+
import { prefixPathWithLocale } from "~/utils/locale";
23

34
// fallback wild card for all unauthenticated routes in account section
45
export async function loader({ context }: LoaderFunctionArgs) {
56
await context.customerAccount.handleAuthStatus();
67

7-
return redirect("/account");
8+
return redirect(
9+
prefixPathWithLocale("/account", context.localization.selectedLocale),
10+
);
811
}

‎app/routes/($locale).account_.login.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
import { type LoaderFunctionArgs, redirect } from "react-router";
22
import { isAccountPreviewRequest } from "~/utils/account-preview.server";
3+
import { prefixPathWithLocale } from "~/utils/locale";
34
import { safeReturnTo } from "~/utils/return-to";
45

56
export async function loader({ context, request }: LoaderFunctionArgs) {
67
// Customer Account OAuth cannot run on localhost. Stay on the current page
78
// (or account preview) instead of returning the tunnel 400/error screen.
89
if (isAccountPreviewRequest(request)) {
9-
return redirect(safeReturnTo(request, "/account"));
10+
return redirect(
11+
safeReturnTo(
12+
request,
13+
prefixPathWithLocale("/account", context.localization.selectedLocale),
14+
),
15+
);
1016
}
1117

1218
return context.customerAccount.login();

‎app/routes/($locale).api.predictive-search.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
} from "~/utils/combined-listings";
2121
import { skipPageRevalidationForStorefrontActions } from "~/utils/revalidation";
2222
import { normalizeSearchStyledText } from "~/utils/search-highlight";
23+
import { shopifyPagePath } from "~/utils/storefront-path";
2324

2425
export const shouldRevalidate = skipPageRevalidationForStorefrontActions;
2526

@@ -319,7 +320,7 @@ function normalizePredictiveSearchResults(
319320
id: page.id,
320321
image: undefined,
321322
title: page.title,
322-
url: `${localePrefix}/pages/${page.handle}${createSearchParams(page)}`,
323+
url: `${localePrefix}${shopifyPagePath(page.handle)}${createSearchParams(page)}`,
323324
})),
324325
];
325326

‎app/routes/($locale).cart.add.$variantId.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { LoaderFunctionArgs } from "react-router";
22
import { data } from "react-router";
3+
import { prefixPathWithLocale } from "~/utils/locale";
34

45
export async function loader({ params, context }: LoaderFunctionArgs) {
56
const { cart, session } = context;
@@ -23,7 +24,10 @@ export async function loader({ params, context }: LoaderFunctionArgs) {
2324
session.set("cartId", cartId);
2425
const headers = new Headers();
2526
headers.set("Set-Cookie", await session.commit());
26-
headers.set("Location", "/cart");
27+
headers.set(
28+
"Location",
29+
prefixPathWithLocale("/cart", context.localization.selectedLocale),
30+
);
2731

2832
const { cart: cartResult, errors, userErrors } = result;
2933

‎app/routes/($locale).collections.$collectionHandle.tsx‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,25 @@ import {
3232
} from "~/utils/sale-pagination.server";
3333
import { seoPayload } from "~/utils/seo.server";
3434
import { localizedSeoMeta } from "~/utils/seo-translation";
35+
import { canonicalStorefrontPathname } from "~/utils/storefront-path";
3536
import { WeaverseContent } from "~/weaverse";
3637

3738
export const headers = routeHeaders;
3839
export const shouldRevalidate = skipPageRevalidationForStorefrontActions;
3940

4041
export async function loader({ params, request, context }: LoaderFunctionArgs) {
42+
const requestUrl = new URL(request.url);
43+
const canonicalPath = canonicalStorefrontPathname(
44+
requestUrl.pathname,
45+
requestUrl.searchParams,
46+
);
47+
if (
48+
params.collectionHandle === "all" &&
49+
canonicalPath !== requestUrl.pathname
50+
) {
51+
throw redirect(`${canonicalPath}${requestUrl.search}`, 301);
52+
}
53+
4154
const paginationVariables = getPaginationVariables(request, {
4255
pageBy: PAGINATION_SIZE,
4356
});

‎app/routes/($locale).discount.$code.tsx‎

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { type LoaderFunctionArgs, redirect } from "react-router";
2+
import { prefixPathWithLocale } from "~/utils/locale";
3+
import { canonicalStorefrontPathname } from "~/utils/storefront-path";
24

35
/**
46
* Automatically applies a discount found on the url
@@ -19,18 +21,41 @@ export async function loader({ request, context, params }: LoaderFunctionArgs) {
1921

2022
const url = new URL(request.url);
2123
const searchParams = new URLSearchParams(url.search);
22-
let redirectParam =
23-
searchParams.get("redirect") || searchParams.get("return_to") || "/";
24-
25-
if (redirectParam.includes("//")) {
26-
// Avoid redirecting to external URLs to prevent phishing attacks
27-
redirectParam = "/";
24+
const fallback = prefixPathWithLocale(
25+
"/",
26+
context.localization.selectedLocale,
27+
);
28+
const redirectParam =
29+
searchParams.get("redirect") || searchParams.get("return_to") || fallback;
30+
let destination = new URL(fallback, url.origin);
31+
// Only accept local paths, including when URL parsing normalizes backslashes
32+
// or control characters into a different origin.
33+
if (redirectParam.startsWith("/") && !redirectParam.startsWith("//")) {
34+
try {
35+
const candidate = new URL(redirectParam, url.origin);
36+
if (
37+
candidate.origin === url.origin &&
38+
!candidate.pathname.startsWith("//")
39+
) {
40+
destination = candidate;
41+
}
42+
} catch {
43+
// Keep the localized home page for an invalid destination.
44+
}
2845
}
2946

3047
searchParams.delete("redirect");
3148
searchParams.delete("return_to");
3249

33-
const redirectUrl = `${redirectParam}?${searchParams}`;
50+
for (const [key, value] of searchParams) {
51+
destination.searchParams.append(key, value);
52+
}
53+
destination.pathname = prefixPathWithLocale(
54+
canonicalStorefrontPathname(destination.pathname, destination.searchParams),
55+
context.localization.selectedLocale,
56+
);
57+
const redirectUrl =
58+
destination.pathname + destination.search + destination.hash;
3459

3560
if (!code) {
3661
return redirect(redirectUrl);

‎app/routes/($locale).pages.$pageHandle.tsx‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import type { SeoConfig } from "@shopify/hydrogen";
22
import type { RouteLoaderArgs } from "@weaverse/hydrogen";
3-
import type { MetaFunction } from "react-router";
3+
import { type MetaFunction, redirect } from "react-router";
44
import type { PageDetailsQuery } from "storefront-api.generated";
55
import invariant from "tiny-invariant";
66
import { routeHeaders } from "~/utils/cache";
77
import { redirectIfHandleIsLocalized } from "~/utils/redirect";
88
import { skipPageRevalidationForStorefrontActions } from "~/utils/revalidation";
99
import { seoPayload } from "~/utils/seo.server";
1010
import { localizedSeoMeta } from "~/utils/seo-translation";
11+
import { canonicalStorefrontPathname } from "~/utils/storefront-path";
1112
import { WeaverseContent } from "~/weaverse";
1213

1314
export const headers = routeHeaders;
@@ -16,12 +17,12 @@ export const shouldRevalidate = skipPageRevalidationForStorefrontActions;
1617
export async function loader({ request, params, context }: RouteLoaderArgs) {
1718
invariant(params.pageHandle, "Missing page handle");
1819
const requestUrl = new URL(request.url);
19-
const contactPagePath = requestUrl.pathname.match(
20-
/^\/(?:(?<locale>[^/]+)\/)?pages\/contact\/?$/,
21-
);
22-
23-
if (params.pageHandle === "contact" && contactPagePath) {
24-
throw new Response(null, { status: 404 });
20+
const canonicalPath = canonicalStorefrontPathname(requestUrl.pathname);
21+
if (
22+
params.pageHandle === "contact" &&
23+
canonicalPath !== requestUrl.pathname
24+
) {
25+
throw redirect(`${canonicalPath}${requestUrl.search}`, 301);
2526
}
2627

2728
const { storefront } = context.weaverse;

‎app/routes/($locale).sitemap.$type.$page[.xml].tsx‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { getSitemap, type Storefront } from "@shopify/hydrogen";
22
import type { LoaderFunctionArgs } from "react-router";
33
import { articlePath, blogPath } from "~/utils/blog-path";
44
import { qualifyArticleSitemapItems } from "~/utils/blog-sitemap.server";
5+
import { localeCode } from "~/utils/locale";
6+
import { canonicalStorefrontPathname } from "~/utils/storefront-path";
57

68
type SitemapQueryData = {
79
sitemap?: {
@@ -12,7 +14,7 @@ type SitemapQueryData = {
1214
export async function loader({
1315
request,
1416
params,
15-
context: { storefront },
17+
context: { storefront, localization },
1618
}: LoaderFunctionArgs) {
1719
const storefrontClient: Storefront = storefront;
1820
const sitemapStorefront = {
@@ -44,20 +46,25 @@ export async function loader({
4446
storefront: sitemapStorefront,
4547
request,
4648
params,
47-
locales: ["EN-US", "EN-CA", "FR-CA"],
49+
locales: localization.availableLocales.map((locale) =>
50+
localeCode(locale).toUpperCase(),
51+
),
4852
getLink: ({ type, baseUrl, handle, locale }) => {
49-
const prefix = locale ? `/${locale.toLowerCase()}` : "";
53+
const prefix =
54+
localization.availableLocales.find(
55+
(candidate) => localeCode(candidate) === locale?.toLowerCase(),
56+
)?.pathPrefix ?? "";
5057
if (type === "blogs") {
5158
return `${baseUrl}${prefix}${blogPath(handle)}`;
5259
}
5360
if (type === "articles") {
5461
const [blogHandle, ...articleHandle] = handle.split("/");
5562
return `${baseUrl}${prefix}${articlePath(articleHandle.join("/"), blogHandle)}`;
5663
}
57-
if (!locale) {
58-
return `${baseUrl}/${type}/${handle}`;
59-
}
60-
return `${baseUrl}/${locale}/${type}/${handle}`;
64+
const pathname = canonicalStorefrontPathname(
65+
`${prefix}/${type}/${handle}`,
66+
);
67+
return `${baseUrl}${pathname}`;
6168
},
6269
});
6370

‎app/sections/countdown/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export const schema = createSchema({
282282
type: "button--countdown",
283283
text: "DISCOVER NOW",
284284
style2Text: "Shop Now",
285-
to: "/collections/all",
285+
to: "/products",
286286
alignment: "left",
287287
style2Alignment: "center",
288288
variant: "custom",

0 commit comments

Comments
 (0)