Skip to content

Conversation

dmerand
Copy link
Contributor

@dmerand dmerand commented Sep 4, 2025

WHY are these changes introduced?

When a developer uninstalls an app while shopify app dev is running, the CLI continues trying to update the dev session, resulting in repeated error messages "The app isn't installed on the specified store" on every file change. This creates a confusing experience where the dev session appears to continue but is actually broken.

WHAT is this pull request doing?

This PR detects when an app has been uninstalled from the store and gracefully shuts down the dev session, similar to when a user presses 'q'.

When the uninstall error is detected:

  1. Messages are displayed to the user
  2. The dev session status is updated to show it's shutting down
  3. The process exits cleanly with status 0

How to test your changes?

  1. Start a dev session with shopify app dev
  2. While dev is running, go to the store admin and uninstall the app
  3. Make a file change to trigger a dev session update
  4. Observe that the CLI now gracefully shuts down with clear messaging instead of showing repeated errors

Post-release steps

None required.

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

Copy link
Contributor Author

dmerand commented Sep 4, 2025

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

Copy link
Contributor

github-actions bot commented Sep 4, 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/common/version.d.ts
@@ -1 +1 @@
-export declare const CLI_KIT_VERSION = "3.84.0";
\ No newline at end of file
+export declare const CLI_KIT_VERSION = "3.84.1";
\ No newline at end of file

Copy link
Contributor

github-actions bot commented Sep 4, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.55% (+0.02% 🔼)
13494/17178
🟡 Branches
72.57% (+0.05% 🔼)
6555/9033
🟡 Functions
78.82% (+0.01% 🔼)
3506/4448
🟡 Lines
78.91% (+0.03% 🔼)
12757/16166

Test suite run success

3230 tests passing in 1358 suites.

Report generated by 🧪jest coverage report action from 6400230

@dmerand dmerand marked this pull request as ready for review September 4, 2025 20:12
@dmerand dmerand requested a review from a team as a code owner September 4, 2025 20:12
Copy link
Contributor

github-actions bot commented Sep 4, 2025

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@dmerand dmerand marked this pull request as draft September 4, 2025 20:48
Comment on lines 222 to +227
} else if (result.status === 'remote-error' || result.status === 'unknown-error') {
await this.logger.logUserErrors(result.error, event?.app.allExtensions ?? [])

// Check for app uninstallation error
if (result.status === 'remote-error') {
const errors = result.error
Copy link
Contributor

Choose a reason for hiding this comment

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

If remote-error and unknown-error no longer do the same thing (so you need this extra if here), let's split them in different else-ifs, that way you don't need to check for remote-error twice

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.

2 participants