Skip to content

Add --standard-events-inspector flag to theme preview.#7822

Open
frandiox wants to merge 9 commits into
mainfrom
fd-standard-events
Open

Add --standard-events-inspector flag to theme preview.#7822
frandiox wants to merge 9 commits into
mainfrom
fd-standard-events

Conversation

@frandiox

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

We are releasing standard storefront events and actions.

WHAT is this pull request doing?

Add a new flag to inject UI during development that helps debug events and actions.

How to test your changes?

Run shopify theme dev --standard-events-inspector in Horizon v4. You should see a floating window like the following:

image

Post-release steps

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

frandiox and others added 9 commits March 21, 2026 20:41
Add the --standard-events flow to theme dev and wire the option through the dev server context.

Prepare assets/standard-events.d.ts in the background, refresh it when possible, create assets/global.d.ts when missing, and create or update assets/jsconfig.json so the new type files are wired in without clobbering unrelated config.

Rewrite standard-events runtime URLs to use the dev bundle in HTML and JS content, inject the events inspector at the start of the head element with defer, and cover proxy, local asset, startup, and error-page paths with tests.

Also make jsconfig wiring robust when existing configs exclude *.d.ts files by forcing the new definitions through the files list.

Co-authored-by: Codex <codex@openai.com>
Use the standard events dev bundle by default in theme dev, while making inspector injection and local type setup explicit opt-in features. Keep the type setup asynchronous so server startup is not blocked.

Co-authored-by: OpenAI Codex <codex@openai.com>
Only treat the inspector as already injected when an actual inspector script tag is present, and add a regression test for plain URL strings in inline scripts.

Co-authored-by: OpenAI Codex <codex@openai.com>
Remove the --standard-events-types flag and all associated logic
(d.ts download, global.d.ts creation, jsconfig.json wiring) from
theme dev. This feature was too intrusive for the dev command.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts:
#	packages/theme/src/cli/commands/theme/dev.ts
#	packages/theme/src/cli/services/dev.test.ts
#	packages/theme/src/cli/utilities/theme-environment/proxy.test.ts
#	packages/theme/src/cli/utilities/theme-environment/theme-environment.test.ts
Remove merge-era mock setup from the theme dev service test now that the Standard Events assertions use the existing dev command test harness. This keeps the test focused on the new option plumbing without duplicating unrelated setup.

Co-authored-by: OpenAI Codex <codex@openai.com>
@frandiox frandiox requested review from a team as code owners June 16, 2026 05:14
@github-actions github-actions Bot added the Area: @shopify/theme @shopify/theme package issues label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/theme @shopify/theme package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant