Skip to content

Fix theme editor sync not reloading on schema changes#6833

Closed
kdaviduik wants to merge 1 commit into
mainfrom
kd-theme-editor-sync-bug
Closed

Fix theme editor sync not reloading on schema changes#6833
kdaviduik wants to merge 1 commit into
mainfrom
kd-theme-editor-sync-bug

Conversation

@kdaviduik
Copy link
Copy Markdown
Contributor

@kdaviduik kdaviduik commented Feb 9, 2026

WHY are these changes introduced?

Closes https://github.com/Shopify/developer-tools-team/issues/1033.

When using shopify theme dev --theme-editor-sync, making schema changes to section files (e.g., adding/modifying settings in {% schema %} blocks) did not trigger the theme customizer to reload. Users had to manually refresh the customizer to see schema updates.

This is a regression since version 3.88.1.

WHAT is this pull request doing?

Bumps @shopify/theme-hot-reload from ^0.0.18 to ^0.0.22.

Root cause: The hot-reload client was only checking javascriptTag changes to trigger full page reloads, but ignored schemaTag changes that the server was already sending.

The fix existed upstream in v0.0.20+ (commit 4785747 in the theme-hot-reload package), which adds:

if (event.payload?.updatedFileParts?.javascriptTag ||
    event.payload?.updatedFileParts?.schemaTag) {
    return fullPageReload(event.key);
}

How to test your changes?

Note: I'm currently having 1Password issues so I'm locked out of the admin and haven't been able to manually test these myself

  1. Run shopify theme dev --theme-editor-sync in a theme directory
  2. Open the theme customizer in your browser
  3. Edit a section's {% schema %} block (e.g., add a new setting)
  4. Save the file
  5. Expected: The customizer reloads automatically and shows the new schema setting
  6. Before fix: No reload occurred; manual refresh was required

Measuring impact

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

The `--theme-editor-sync` flag was not triggering a reload in the theme
customizer when making schema changes to section files. Users had to
manually refresh the customizer to see schema updates.

Root cause: The `@shopify/theme-hot-reload` client (v0.0.18) was only
checking for `javascriptTag` changes to trigger full page reloads, but
was ignoring `schemaTag` changes that the server was sending.

The fix already existed upstream in v0.0.20+ (commit 4785747) which adds
schemaTag handling. This bumps the dependency from ^0.0.18 to ^0.0.22.

Regression introduced in: 3.88.1
@kdaviduik kdaviduik marked this pull request as ready for review February 10, 2026 07:24
@kdaviduik kdaviduik requested review from a team as code owners February 10, 2026 07:24
@github-actions
Copy link
Copy Markdown
Contributor

This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

@graygilmore
Copy link
Copy Markdown
Contributor

/snapit

@github-actions
Copy link
Copy Markdown
Contributor

🫰✨ Thanks @graygilmore! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260313175328

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@graygilmore
Copy link
Copy Markdown
Contributor

🤔 I was unable to 🎩 this. Maybe a rebase with main would help? I'm getting some CORS errors in the network tab when communicating from the Admin to localhost.

Copy link
Copy Markdown
Contributor

@aswamy aswamy left a comment

Choose a reason for hiding this comment

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

Tophatted. Same issue as Gray.


Access to resource at 'http://localhost:9292/' from origin 'https://online-store-web.shopifyapps.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

@github-actions
Copy link
Copy Markdown
Contributor

This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants