Repository navigation
Add typed JSON output to theme preview - #8919
Merged
Merged
Conversation
gonzaloriestra
added this pull request to stack #8925
October 15, 2026 12:34
gonzaloriestra
marked this pull request as ready for review
October 15, 2026 12:42
gonzaloriestra
force-pushed
the
gonzalo/json-theme-preview
branch
from
October 15, 2026 13:33
b5af4e9 to
521e3b6
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-preview
branch
2 times, most recently
from
October 15, 2026 14:10
64f1e55 to
453d107
Compare
isaacroldan
reviewed
Oct 15, 2026
isaacroldan
left a comment
Contributor
There was a problem hiding this comment.
There is a regression in the single-environment store fallback.
🤖 Generated by the review-pr skill
gonzaloriestra
force-pushed
the
gonzalo/json-theme-preview
branch
2 times, most recently
from
October 16, 2026 08:15
eda59e0 to
33122e9
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-preview
branch
from
October 16, 2026 10:37
33122e9 to
5e3146c
Compare
isaacroldan
reviewed
Oct 16, 2026
gonzaloriestra
force-pushed
the
gonzalo/json-theme-preview
branch
from
October 16, 2026 11:08
5e3146c to
b2bed2c
Compare
Contributor
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/themes/theme-manager.d.ts@@ -11,5 +11,12 @@ export declare abstract class ThemeManager {
findOrCreate(name?: string, role?: Role): Promise<Theme>;
fetch(name?: string, role?: Role): Promise<Theme | undefined>;
generateThemeName(context: string): string;
- create(themeRole?: Role, themeName?: string): Promise<Theme>;
+ create(themeRole?: Role, themeName?: string): Promise<{
+ createdAtRuntime: boolean;
+ id: number;
+ name: string;
+ processing: boolean;
+ role: string;
+ src?: string;
+ }>;
}
\ No newline at end of file
|
gonzaloriestra
force-pushed
the
gonzalo/json-theme-preview
branch
from
October 16, 2026 14:20
b2bed2c to
44cc4db
Compare
Contributor
|
| Changeset | Package |
|---|---|
theme-preview-json-contract.md |
'@shopify/cli': major |
karreiro
approved these changes
Oct 19, 2026
karreiro
left a comment
Contributor
There was a problem hiding this comment.
Thank you, @gonzaloriestra!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original PR and review history: #8645.
WHY are these changes introduced?
Fixes https://github.com/shop/issues-develop/issues/23695
Preview JSON should expose a stable resource and wait for browser diagnostics.
WHAT is this pull request doing?
Return a strict preview resource with an opaque string ID and validated URL. Keep the native service compatibility adapter, await browser warnings before final output, and retain explicit environment batches. Validate required inputs before authentication and preserve successful results when another environment fails.
The public output follows
docs/cli/json-output.md; explicitly named environments use one{environments: [...]}object.How to manually test your changes?
To test a batch, configure
stagingandproductioninshopify.theme.tomlwithstore,password,theme, andoverrides, then runshopify theme preview --json -e staging -e production.Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add