Skip to content

Conversation

@karreiro
Copy link
Contributor

@karreiro karreiro commented Nov 14, 2025

WHY are these changes introduced?

This pull request updates the shopify theme init to consistently use AGENTS.md files. For consistency and compatibility, we are keeping symlinks with each editor standard.

image

Additionally, this pull request introduces a new "All" option to create symlinks for all editors:

image

WHAT is this pull request doing?

This pull request:

  • Updates the init theme service to handle the feature mentioned above
  • Updates cli-kit to expose the symlink creation API

How to test your changes?

  • Run shopify theme init

Post-release steps

None

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g., a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

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

@karreiro karreiro requested a review from aswamy November 14, 2025 16:41
@karreiro karreiro requested review from a team as code owners November 14, 2025 16:41
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.14% (-0.08% 🔻)
13817/17458
🟡 Branches
73.08% (-0.03% 🔻)
6739/9221
🟡 Functions
79.31% (-0.06% 🔻)
3546/4471
🟡 Lines
79.51% (-0.07% 🔻)
13058/16423
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / admin-as-app.ts
100% 100% 100% 100%
🟢
... / bulk-operation-run-mutation.ts
100% 100% 100% 100%
🟢
... / bulk-operation-run-query.ts
100% 100% 100% 100%
🟢
... / get-bulk-operation-by-id.ts
100% 100% 100% 100%
🟢
... / staged-uploads-create.ts
100% 100% 100% 100%
🔴
... / status.ts
0% 100% 0% 0%
🔴
... / pull.ts
0% 100% 0% 0%
🔴
... / pull.ts
0% 0% 0% 0%
🟢
... / bulk-operation-status.ts
96% 85.71% 100% 100%
🟢
... / download-bulk-operation-results.ts
100% 100% 100% 100%
🟢
... / execute-bulk-operation.ts
90.91% 80.56% 100% 92.31%
🟢
... / format-bulk-operation-status.ts
100% 100% 100% 100%
🟢
... / run-mutation.ts
100% 100% 100% 100%
🟢
... / run-query.ts
100% 100% 100% 100%
🟡
... / stage-file.ts
72.73% 62.5% 83.33% 71.88%
🟢
... / watch-bulk-operation.ts
100% 100% 100% 100%
🔴
... / promiseWithResolvers.ts
33.33% 50% 50% 33.33%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / execute.ts
0%
0% (-100% 🔻)
0% 0%
🟢
... / extension-instance.ts
84.8% (+0.23% 🔼)
77.6% (-0.91% 🔻)
92.06% (+0.13% 🔼)
85.11% (+0.24% 🔼)
🟡
... / specification.ts
69.09%
75.61% (+2.44% 🔼)
76.47% (-1.31% 🔻)
68.75%
🟢
... / ui_extension.ts
85.38% (-9.44% 🔻)
72.34% (-8.91% 🔻)
84% (-16% 🔻)
88% (-8.46% 🔻)
🟢
... / developer-platform-client.ts
84.62% (-1.5% 🔻)
73.68% (+3.1% 🔼)
81.82% (+1.82% 🔼)
90.63% (-2.71% 🔻)
🟢
... / api.ts
87.07% (-0.43% 🔻)
76.71% (-0.1% 🔻)
100%
86.49% (-0.43% 🔻)
🟢
... / ConcurrentOutput.tsx
98.36% (-1.64% 🔻)
92% (-4% 🔻)
100%
98.33% (-1.67% 🔻)
🔴
... / ui.tsx
50.82% (-0.79% 🔻)
42.86% (-5.53% 🔻)
54.55% (+1.42% 🔼)
50% (-0.82% 🔻)
🟢
... / console.ts
81.82% (+15.15% 🔼)
75% (-25% 🔻)
100% (+33.33% 🔼)
81.82% (+15.15% 🔼)
🔴
... / dev.ts
14.29% (+0.95% 🔼)
3.13% (+0.18% 🔼)
50% (-7.14% 🔻)
14.29% (+0.95% 🔼)
🟢
... / init.ts
88% (-0.89% 🔻)
71.43% (+4.76% 🔼)
86.67% (+4.85% 🔼)
88% (-0.89% 🔻)
🟡
... / theme-polling.ts
67.12% (-0.93% 🔻)
68.75% 78.57%
66.67% (-0.98% 🔻)

Test suite run success

3442 tests passing in 1395 suites.

Report generated by 🧪jest coverage report action from 313b9bf

@karreiro karreiro force-pushed the themes-agents.md branch 2 times, most recently from ff2d07b to 0275d5c Compare November 14, 2025 17:00
@aswamy
Copy link
Contributor

aswamy commented Nov 14, 2025

/snapit

Copy link
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.

Two optional changes, but looks good. I tophatted it on MacOS. I snapped it to test symlinks on Windows. Will report async when it's done.

@github-actions
Copy link
Contributor

🫰✨ Thanks @aswamy! 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/[email protected]

Caution

After installing, validate the version by running just shopify 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.

Copy link
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.

🚨 Tophat issue: The snap fails on Windows when creating the symlinks, but works on MacOS

image

@karreiro
Copy link
Contributor Author

/snapit

@Shopify Shopify deleted a comment from github-actions bot Nov 21, 2025
@github-actions
Copy link
Contributor

🫰✨ Thanks @karreiro! 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/[email protected]

Caution

After installing, validate the version by running just shopify 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.

@karreiro karreiro force-pushed the themes-agents.md branch 2 times, most recently from e583f79 to e5e7460 Compare November 21, 2025 12:26
@karreiro karreiro requested a review from aswamy November 21, 2025 12:30
@karreiro
Copy link
Contributor Author

Thanks a lot for the review, @aswamy!

Windows require some specific permissions to create symbolic links, that's the reason we faced some errors. Now, we've update this PR to fallback to file creation (with a warning) when symbolic links can't be created:

Screenshot 2025-11-21 at 13 02 55

This PR is ready for re-review. Thanks again for the review!

Copy link
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.

Code looks great! Tiny type changes requested. Did not tophat on Windows - seems like my VM is having issues.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Differences in type declarations

We 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:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/fs.d.ts
@@ -126,6 +126,13 @@ export declare function removeFile(path: string): Promise<void>;
  * @param to - New path for the file.
  */
 export declare function renameFile(from: string, to: string): Promise<void>;
+/**
+ * Creates a symbolic link.
+ *
+ * @param target - Path that the symlink points to.
+ * @param path - Path where the symlink will be created.
+ */
+export declare function symlink(target: string, path: string): Promise<void>;
 /**
  * Synchronously removes a file at the given path.
  *

@karreiro karreiro enabled auto-merge December 2, 2025 12:45
@karreiro
Copy link
Contributor Author

karreiro commented Dec 2, 2025

👋 @Shopify/app-inner-loop could you please take a look when you have a moment?

Copy link
Contributor

@gonzaloriestra gonzaloriestra left a comment

Choose a reason for hiding this comment

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

Cool!

@karreiro karreiro added this pull request to the merge queue Dec 2, 2025
Merged via the queue into main with commit ffc6646 Dec 2, 2025
25 checks passed
@karreiro karreiro deleted the themes-agents.md branch December 2, 2025 12:58
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.

3 participants