Fix multiple-installation-warning snapshot padding after 4.0.0 bump#7603
Merged
craigmichaelmartin merged 1 commit intoMay 22, 2026
Merged
Conversation
The inline snapshots in this test interpolate `${CLI_KIT_VERSION}`
into a UI box rendered by cli-kit's `info` renderer. The box auto-pads
trailing whitespace to keep the box rectangular, so when CLI_KIT_VERSION
shortened from 3.94.3 (6 chars) to 4.0.0 (5 chars), the renderer added
one extra trailing space. The snapshot's literal whitespace did not
follow, breaking main CI as soon as 4.0.0 landed.
Adds one trailing space before the closing `│` on the three affected
snapshot lines. Keeps the `${CLI_KIT_VERSION}` template literal rather
than inlining `v4.0.0` so future same-length version bumps don't trip
this again.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alfonso-noriega
approved these changes
May 22, 2026
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.
WHY are these changes introduced?
Main CI started failing immediately after the 4.0.0 release was merged: https://github.com/Shopify/cli/actions/runs/26248300903
The
showMultipleCLIWarningIfNeededtest uses inline snapshots that interpolate${CLI_KIT_VERSION}into a UI info box rendered by cli-kit. The box auto-pads trailing whitespace to keep itself rectangular, so whenCLI_KIT_VERSIONshortened from3.94.3(6 chars) to4.0.0(5 chars), the renderer added one extra trailing space on the affected line. The snapshot's literal whitespace did not follow, so all three affected tests fail with a one-character mismatch:WHAT is this pull request doing?
Adds one trailing space before the closing
│on the three affected snapshot lines (33, 65, 98) inpackages/cli-kit/src/public/node/plugins/multiple-installation-warning.test.ts.The
${CLI_KIT_VERSION}template literal is preserved deliberately.vitest --updatewould inlinev4.0.0, but keeping the template means future bumps that don't change the rendered length (the common case) won't re-break the test.This snapshot remains brittle to any future change in the length of
CLI_KIT_VERSION(e.g. 4.0.0 → 4.10.0 will break it again). A more robust fix would be to assert on the inner content only and not on the box geometry — out of scope for this PR but worth a follow-up.How to test your changes?
cd packages/cli-kit pnpm vitest run src/public/node/plugins/multiple-installation-warning.test.tsAll 5 tests pass.
Checklist
🤖 Generated with Claude Code