Skip to content

Add non-interactive app dev prompt bypasses#7632

Open
gonzaloriestra wants to merge 5 commits into
cli-interactivity/app-config-validatefrom
cli-interactivity/app-dev-flags
Open

Add non-interactive app dev prompt bypasses#7632
gonzaloriestra wants to merge 5 commits into
cli-interactivity/app-config-validatefrom
cli-interactivity/app-dev-flags

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented May 25, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Related to https://github.com/shop/issues-develop/issues/22868

The interactivity audit found several app dev paths that still required prompts or manual recovery in automation:

  • URL update confirmation for linked dev-session apps.
  • mkcert installation when running with localhost certificates.
  • Storefront password entry for theme app extension preview on password-protected storefronts.

The transfer-disabled store conversion prompt is removed since the CLI only allows using dev stores now that should already be transfer-disabled.

WHAT is this pull request doing?

  • Adds explicit app dev flags for non-interactive flows:
    • --install-mkcert / SHOPIFY_FLAG_INSTALL_MKCERT controls localhost certificate installation.
    • --store-password / SHOPIFY_FLAG_STORE_PASSWORD supplies the storefront password needed by theme app extensions.
  • Defaults linked dev-session apps to automatically_update_urls_on_dev = true, avoiding the app dev URL prompt for that flow.
  • Removes the transfer-disabled store conversion prompt from app dev; transfer-enabled dev stores now fail with an actionable error instead of prompting to mutate the store.
  • Redacts --store-password and SHOPIFY_FLAG_STORE_PASSWORD values from analytics payloads.

How to test your changes?

  • shopify app dev --use-localhost --install-mkcert
  • Add a theme app extension and run: shopify app dev --store-password yourpassword

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, so I've added a changelog entry with pnpm changeset add

gonzaloriestra commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label May 25, 2026
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch 2 times, most recently from ea50335 to 3948ce1 Compare May 26, 2026 15:22
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from 51b7815 to 63fab66 Compare June 1, 2026 11:43
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch 2 times, most recently from 2014ea3 to 59259d8 Compare June 1, 2026 11:58
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch 2 times, most recently from 4bd2cf5 to 986b2a7 Compare June 1, 2026 12:20
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from 59259d8 to 1f26176 Compare June 1, 2026 12:20
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from 1f26176 to b0606fb Compare June 1, 2026 12:45
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from 986b2a7 to 872015f Compare June 1, 2026 12:45
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from b0606fb to c22f504 Compare June 15, 2026 10:53
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from 872015f to 81fed1d Compare June 15, 2026 10:53
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch 2 times, most recently from 155a4b3 to bc9aaca Compare June 16, 2026 08:58
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from 81fed1d to 950e211 Compare June 16, 2026 08:58
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from bc9aaca to b1b95a3 Compare June 16, 2026 11:26
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch 2 times, most recently from 9c5a91a to 8cfe2a7 Compare June 16, 2026 12:03
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from b1b95a3 to 2237293 Compare June 16, 2026 12:03
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from 8cfe2a7 to e2500b0 Compare June 16, 2026 13:14
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from 2237293 to 9471955 Compare June 16, 2026 13:34
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from 9471955 to 8d194da Compare July 1, 2026 14:10
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from e2500b0 to 3913769 Compare July 1, 2026 14:10
@gonzaloriestra gonzaloriestra requested a review from a team as a code owner July 2, 2026 13:03
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from 2dd690e to 847afd2 Compare July 2, 2026 13:41
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from 02fc84c to 278d226 Compare July 2, 2026 13:41
Comment thread packages/app/src/cli/commands/app/dev.ts
Comment thread packages/app/src/cli/utilities/mkcert.ts Outdated
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from 847afd2 to f25a459 Compare July 7, 2026 11:02
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch 3 times, most recently from f3e0e23 to 6a3739f Compare July 9, 2026 09:54
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from f25a459 to 1ad8032 Compare July 9, 2026 09:54
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from 65d4a29 to c8f3233 Compare July 9, 2026 10:12
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from 1ad8032 to 6d26b55 Compare July 9, 2026 10:12
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from c8f3233 to 21d20b2 Compare July 9, 2026 11:30
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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/private/node/constants.d.ts
@@ -6,6 +6,7 @@ export declare const environmentVariables: {
     doctor: string;
     enableCliRedirect: string;
     env: string;
+    firstPartyDev: string;
     noAnalytics: string;
     optOutInstrumentation: string;
     appAutomationToken: string;
packages/cli-kit/dist/public/node/context/local.d.ts
@@ -63,6 +63,13 @@ export declare function alwaysLogAnalytics(env?: NodeJS.ProcessEnv): boolean;
  * @returns True if SHOPIFY_CLI_ALWAYS_LOG_METRICS is truthy.
  */
 export declare function alwaysLogMetrics(env?: NodeJS.ProcessEnv): boolean;
+/**
+ * Returns true if the CLI User is 1P.
+ *
+ * @param env - The environment variables from the environment of the current process.
+ * @returns True if SHOPIFY_CLI_1P is truthy.
+ */
+export declare function firstPartyDev(env?: NodeJS.ProcessEnv): boolean;
 /**
  * Returns true if the CLI can run the "doctor-release" command.
  *

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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

Test the snapshot by installing your package globally:

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

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.

@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from 21d20b2 to 722bab8 Compare July 13, 2026 11:22
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from 6d26b55 to 86468f6 Compare July 13, 2026 11:22
Comment thread packages/app/src/cli/services/app/config/link.ts Outdated
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from 722bab8 to ea966f3 Compare July 13, 2026 11:31
conversionMode: 'prompt-first' | 'never',
): Promise<boolean> {
if (store.transferDisabled) return true
export function ensureTransferDisabledStore(store: OrganizationStore): void {

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 probably need to evaluate if we even need this, for dev dash dev stores if the store is a valid dev store, that's all we need no?

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.

New dev stores are always transfer disabled. But I found there are a few old cases where they are development and also transfer enabled. I'm leaving this for them to show a better error.

@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from ea966f3 to eb2c7e6 Compare July 13, 2026 12:07
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-config-validate branch from 86468f6 to fdb6f29 Compare July 14, 2026 08:02
@gonzaloriestra gonzaloriestra force-pushed the cli-interactivity/app-dev-flags branch from eb2c7e6 to 84b78ef Compare July 14, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/app @shopify/app package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants