Explain why store delete prompts for an organization - #8469
Merged
Conversation
When only a store domain is given, `store delete` infers the owning organization from the Destinations API and silently drops into an organization picker whenever that inference comes up empty. The picker gives no hint about why it appeared, so a typo'd domain looks identical to a store the CLI legitimately can't see. Render an info banner ahead of the picker that names the domain the developer typed and points at `--organization-id`. Echoing the domain back surfaces typos, while the picker still serves the real cases — org owners deleting a store a teammate created, inactive stores that the destinations search filters out, and transient BP failures. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Assisted-By: devx/24c9b352-4ee9-4e6b-93da-ffee608999b1
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to the interactive prompt fallback, includes focused test coverage, and doesn’t alter non-interactive behavior.
Pull request overview
Adds an explanatory info banner to the interactive fallback path of shopify store delete when the CLI can’t infer the owning organization from the provided store domain, so users understand why they’re being prompted to pick an organization (and can more easily spot typos).
Changes:
- Render an
infobanner (stderr) immediately before the organization picker when org inference fails in interactive mode. - Add tests to verify the banner appears only on the prompt fallback path and stays silent when inference succeeds.
- Add a changeset to publish the user-facing output change in
@shopify/store.
File summaries
| File | Description |
|---|---|
| packages/store/src/cli/utilities/store-lookup/organization.ts | Renders an info banner explaining the org picker when inference fails interactively. |
| packages/store/src/cli/utilities/store-lookup/organization.test.ts | Adds output-capture assertions for the new banner and confirms quiet behavior when inference succeeds. |
| .changeset/store-delete-organization-prompt-notice.md | Publishes the new user-facing notice in release notes. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
dmerand
approved these changes
Sep 3, 2026
It's going to go out along with the command being shipped, no need for a separate changeset
amcaplan
enabled auto-merge
September 3, 2026 18:23
nickwesselman
approved these changes
Sep 3, 2026
5 tasks
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?
Follow-up to a discussion with @nickwesselman on
shopify store delete.When you pass only
--store, the command infers the owning organization from the Destinations API and, if that inference comes up empty, silently drops you into an organization picker. The picker says nothing about why it appeared, so a typo'd domain looks exactly like a store the CLI legitimately can't see.The non-interactive path already explains itself (
Could not determine which organization owns …+ a--organization-idnext step); the interactive path just prompts.Requiring
--organization-idunconditionally would remove the ambiguity but is burdensome day to day, and the picker is not dead weight — it's the only way through for several real cases:shop_usersrow for you; delete permission only needs org ownership. A dev store a teammate created is invisible to your destinations search yet perfectly deletable — not exotic on a team org.status: active, while the delete's own lookup has no status filter, so a paused or frozen dev store is unfindable but still addressable.undefined, so any Business Platform hiccup lands you in the picker on a store that would have deleted fine.You can't cheaply tell a typo from an org owner without shop access, so rather than guessing, say why you're being asked.
WHAT is this pull request doing?
Renders an info banner before the organization picker, naming the domain you typed:
Echoing the domain back covers the typo case, and the
--organization-idpointer covers the people who hit this repeatedly.packages/store/src/cli/utilities/store-lookup/organization.tsis the only place that needs to change — the banner sits with the prompt it explains, matching the pattern used for the empty-organization notice inapp dev. Nothing changes for the--organization-id, successful-inference, or non-interactive paths.The banner renders at info level, which goes to stderr, so
--jsonoutput on stdout is unaffected.How to test your changes?
shopify store delete --store some-store-that-does-not-existzzz.myshopify.comshopify store delete --store <a store you own> --force— no banner, inference still resolves the org directly.Post-release steps
None.
Measuring impact