Skip to content

Friendlier auto-upgrade messaging (version range + success banner)#7547

Merged
alfonso-noriega merged 2 commits into
mainfrom
fonso/friendlier-autoupgrade-message
May 15, 2026
Merged

Friendlier auto-upgrade messaging (version range + success banner)#7547
alfonso-noriega merged 2 commits into
mainfrom
fonso/friendlier-autoupgrade-message

Conversation

@alfonso-noriega

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Today the auto-upgrade flow prints a single, easy-to-miss line and then nothing else (until the next prompt) when it's done:

Upgrading Shopify CLI by running: `pnpm add -g @shopify/cli@latest`...

There's no acknowledgement of why it's running, no version context, and no confirmation when it finished — a side-effect ran on the user's machine and we leave them guessing.

WHAT is this pull request doing?

Two minimal, additive changes in packages/cli-kit/src/public/node/upgrade.ts (runCLIUpgrade only, and only on the global path — local-project upgrades are unchanged):

1. Friendlier pre-message with the version range.

✨ New version of Shopify CLI available! (3.94.3 → 3.95.0)
   Now upgrading by running: `pnpm add -g @shopify/cli@latest`...

The version range is derived from checkForCachedNewVersion, which is already populated by versionToAutoUpgrade() upstream — it's a synchronous cache read, no extra network call, no signature change.

2. Green renderSuccess banner after a successful upgrade.

╭─ success ──────────────────────────────╮
│  Shopify CLI upgraded                  │
│                                        │
│  You're now on version 3.95.0.         │
╰────────────────────────────────────────╯

Reuses renderSuccess from @shopify/cli-kit/node/ui — the same banner used elsewhere in the CLI for deploy confirmations, so no new visual primitives.

Diff

packages/cli-kit/src/public/node/upgrade.ts — +17 / -1.

How to test your changes?

cd packages/cli-kit
pnpm vitest run src/public/node/upgrade.test.ts
pnpm type-check

End-to-end (snapshot-based, same as the bug bash setup):

pnpm install -g @shopify/cli@<older-snapshot>
SHOPIFY_CLI_FORCE_AUTO_UPGRADE=1 shopify version

You should see the new pre-message with the version range, the package-manager output, then the green success banner.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows) — pure messaging change, no platform calls
  • I've considered possible documentation changes — N/A
  • I've considered analytics changes to measure impact — none required; existing env_auto_upgrade_success metadata is unchanged
  • No user-visible behaviour change → no changeset (cosmetic message change only; happy to add a patch changeset if preferred)

Before:
  Upgrading Shopify CLI by running: `pnpm add -g @shopify/cli@latest`...

After:
  ✨ New version of Shopify CLI available! (3.94.3 → 3.95.0)
     Now upgrading by running: `pnpm add -g @shopify/cli@latest`...
  [package manager output]
  ╭─ success ──────────────────────────────╮
  │  Shopify CLI upgraded                  │
  │                                        │
  │  You're now on version 3.95.0.         │
  ╰────────────────────────────────────────╯

- Pre-message now states *what just happened* ("new version
  available") and shows the version range when known.
- Adds a `renderSuccess` banner after a successful upgrade so users
  get explicit confirmation instead of silence.
- The version range comes from `checkForCachedNewVersion`, which
  is already populated by `versionToAutoUpgrade()` upstream — no
  extra network call.
@alfonso-noriega alfonso-noriega requested a review from a team as a code owner May 14, 2026 13:29
@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 14, 2026
@nickwesselman

Copy link
Copy Markdown
Contributor

/snapit

@github-actions

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @nickwesselman! 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-20260514141436

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.

@nickwesselman

Copy link
Copy Markdown
Contributor

Nice!!

image

@alfonso-noriega alfonso-noriega added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit c1511f6 May 15, 2026
26 of 28 checks passed
@alfonso-noriega alfonso-noriega deleted the fonso/friendlier-autoupgrade-message branch May 15, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants