Skip to content

sync integrations/makeswift with canary#2991

Open
jorgemoya wants to merge 11 commits intointegrations/makeswiftfrom
sync-integrations-makeswift
Open

sync integrations/makeswift with canary#2991
jorgemoya wants to merge 11 commits intointegrations/makeswiftfrom
sync-integrations-makeswift

Conversation

@jorgemoya
Copy link
Copy Markdown
Contributor

Summary

Merges the latest canary into integrations/makeswift. Brings in the following from canary:

Conflict resolutions

  • core/app/layout.tsx — Canary moved <html>/<body> ownership out of the root layout into app/[locale]/layout.tsx (see fix(core): restore locale-aware lang attribute on html #2989). Makeswift-specific wiring (getSiteVersion(), MakeswiftProvider, SiteTheme, and the ~/lib/makeswift/components registration import) was preserved and now wraps {children} at the root level. MakeswiftProvider is a client Context and SiteTheme renders <style> tags that React 19 hoists to <head>, so they work correctly without owning the <html> element.

Changeset cleanup

Removed 5 changesets that targeted @bigcommerce/catalyst-core (not @bigcommerce/catalyst-makeswift):

  • correlation-id-header.md
  • fix-hidden-fields-d35665be.md
  • fix-html-lang-locale.md
  • translations-patch-d3abeec7.md
  • translations-patch-e3d3b994.md

Package metadata (verified unchanged)

  • core/package.json name: @bigcommerce/catalyst-makeswift
  • core/package.json version: 1.6.3 (matches latest published tag)
  • core/CHANGELOG.md latest entry: ## 1.6.3

Do not squash or rebase-and-merge this PR. Use a true merge commit or rebase locally to preserve the merge base between canary and integrations/makeswift.

jorgemoya and others added 10 commits March 30, 2026 17:45
* fix: split regression-tests workflow into two separate flows

* fix: merge back to a single file

* use deployments.ref for PRs
* feat(other): LOCAL-1444 delivery translation

* chore(core): create translations patch

---------

Co-authored-by: bc-svc-local <bc-svc-local@users.noreply.github.com>
* chore: add deployment for native hosting

* chore: fix native hosting workflow for alpha CLI

- Remove pull_request trigger (no preview deployments)
- Add concurrency group to prevent parallel deploys
- Remove jq package.json mutation, use pnpm exec directly
- Add separate generate step for GraphQL types
- Fix env vars to CATALYST_* namespace for CLI commands
- Remove --framework flag (removed in alpha)
- Add --prebuilt to deploy (skip redundant build)
- Add BIGCOMMERCE_API_HOST for integration API

---------

Co-authored-by: Matthew Volk <matt.volk@bigcommerce.com>
…ityId (#2963)

The DynamicFormField switch statement had no case for 'hidden' field types,
causing hidden inputs (pageId, pagePath) to never render in the DOM. On form
submission, these missing values produced undefined, which Number() converted
to NaN, failing Zod validation.

Refs: TRAC-292

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(core): add X-Correlation-ID header to all GraphQL requests

Each page render gets a stable UUID (via React.cache) that persists
across all fetches within the same render, enabling easier request
tracing in server logs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(core): wrap correlation-id import in try/catch for config resolution

The dynamic import of correlation-id.ts fails during next.config.ts
resolution because React.cache is unavailable in that context. Wrap
in try/catch to match the existing pattern for next-intl/server.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: change correlation-id changeset to patch

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… config (#2983)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The spec files for the `build`, `dev`, and `start` CLI commands asserted
that execa was called with `'node_modules/.bin/next'` (and
`'.bigcommerce/wrangler.jsonc'` in the OpenNext case) using POSIX
separators. Production code builds these paths via Node's `path.join`,
which returns `\`-separated paths on Windows, so the assertions fail on
`CLI Tests (windows-latest)`.

Import `join` in each spec and build the expected path the same way the
production code does, so the assertions match regardless of OS.

Fixes LTRAC-594

Co-authored-by: Claude <noreply@anthropic.com>
The root <html> tag was hardcoded to lang="en" for all locales because
a new root app/layout.tsx to enable the branded /404 page. That fix
solved the 404 but regressed the lang attribute.

Adopt next-intl's documented pattern:
- app/layout.tsx is now a passthrough (returns children) — required by
  Next.js but owns no markup.
- app/[locale]/layout.tsx owns <html lang={locale}> and <body> again,
  so localized pages get the correct language.
- app/not-found.tsx owns its own <html>/<body>, fonts, and global CSS
  so the branded 404 still renders for non-localized requests.

Verified parity with canary on runtime 404 behavior (both serve the
Next.js error-fallback shell for dynamic 404s) and clean output in the
prerendered _not-found.html static file.

Fixes LTRAC-578



LTRAC-578: chore - Bump changeset to minor

Restructures <html>/<body> ownership across root layout, [locale]
layout, and not-found — customers who customized these files will need
to migrate, so a minor bump is more appropriate than patch.

Refs LTRAC-578



LTRAC-578: docs - Add TODO for rootParams migration

Note that the passthrough root layout is a workaround — once
Next.js `rootParams` (16.2+) is available on Native Hosting, we
should move <html>/<body> back here and derive `lang` from rootParams.

Refs LTRAC-578

Co-authored-by: Claude <noreply@anthropic.com>
* feat(other): LOCAL-1444 delivery translation

* chore(core): create translations patch

---------

Co-authored-by: bc-svc-local <bc-svc-local@users.noreply.github.com>
@jorgemoya jorgemoya requested a review from a team as a code owner April 24, 2026 20:33
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment Apr 24, 2026 9:55pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 24, 2026

⚠️ No Changeset found

Latest commit: 9dff9d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Bundle Size Report

Comparing against baseline from 5a3ec0b (2026-04-24).

Metric Baseline Current Delta
Total JS 607.1 kB 698.1 kB +91 kB (+15%) ⚠️

Per-Route First Load JS

Route Baseline Current Delta
/(default)/[...rest]/page 599.9 kB 599.6 kB -0.3 kB (-0.1%)
/(default)/blog/[blogId]/page 599.9 kB 599.6 kB -0.3 kB (-0.1%)
/(default)/gift-certificates/page 599.9 kB 599.6 kB -0.3 kB (-0.1%)
/(default)/page 599.9 kB 599.6 kB -0.3 kB (-0.1%)

Threshold: 5% increase. Routes with ⚠️ exceed the threshold.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Unlighthouse Performance Comparison — Vercel

Comparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores.

Summary Score

Aggregate score across all categories as reported by Unlighthouse.

Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Score 86 90 90 93

Category Scores

Category Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Performance 63 78 70 70
Accessibility 91 91 95 95
Best Practices 95 100 95 100
SEO 89 89 100 100

Core Web Vitals

Metric Prod Desktop Prod Mobile Preview Desktop Preview Mobile
LCP 6.8 s 5.9 s 5.0 s 5.9 s
CLS 0.11 0 0.051 0.19
FCP 1.1 s 1.1 s 1.1 s 1.2 s
TBT 70 ms 10 ms 40 ms 50 ms
Max Potential FID 110 ms 80 ms 90 ms 100 ms
Time to Interactive 6.8 s 6.2 s 6.1 s 6.1 s

Full Unlighthouse report →

Comment thread core/app/layout.tsx Outdated
</head>
<body className="flex min-h-screen flex-col">{children}</body>
</html>
<SiteTheme />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We're currently not passing the current locale to MakeswiftProvider, but we really should.

With that in mind, I think we should go back to the arrangement we had prior to this back & forth change and have <MakeswiftProvider> live in the locale-specific root layout: https://github.com/bigcommerce/catalyst/blame/91d8da7a30afe6fe2e6d8aca41bcb2d061ecf048/core/app/%5Blocale%5D/layout.tsx#L149

If we want <SiteTheme /> to be applied to the 404 page, we can do it explicitly there:

<MakeswiftProvider siteVersion={siteVersion}>
    <SiteTheme />
</MakeswiftProvider>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point — addressed in 9dff9d8.

  • MakeswiftProvider now lives in app/[locale]/layout.tsx and receives locale (threaded through to ReactRuntimeProvider).
  • Root app/layout.tsx is back to canary's pass-through.
  • app/not-found.tsx wraps its own tree with <MakeswiftProvider siteVersion={siteVersion}><SiteTheme /></MakeswiftProvider> so the 404 still picks up the theme tokens (no locale there since we're outside [locale]).

Addresses review feedback on #2991: `MakeswiftProvider` needs the active
`locale` (per Makeswift ReactRuntimeProvider docs), so move the provider
into `app/[locale]/layout.tsx` where `locale` is available and forward it
through. Root `app/layout.tsx` stays as canary's pass-through. The 404
page (`app/not-found.tsx`) wraps its own tree with `MakeswiftProvider` +
`<SiteTheme />` explicitly so the branded theme still applies outside
`[locale]`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@agurtovoy agurtovoy left a comment

Choose a reason for hiding this comment

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

🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants