Skip to content

Add non-mutating theme account alias support#7859

Open
GeorgiZhelev wants to merge 1 commit into
Shopify:mainfrom
GeorgiZhelev:codex/theme-account-alias
Open

Add non-mutating theme account alias support#7859
GeorgiZhelev wants to merge 1 commit into
Shopify:mainfrom
GeorgiZhelev:codex/theme-account-alias

Conversation

@GeorgiZhelev

Copy link
Copy Markdown
Contributor

What changed

  • Added non-mutating account-session selection in cli-kit auth via an explicit sessionId option.
  • Exposed a public findSessionIdByAlias(alias) helper for resolving account aliases without changing the current global session.
  • Added shared --alias / SHOPIFY_FLAG_AUTH_ALIAS support to Shopify theme commands.
  • Wired theme commands through the selected account session, including theme duplicate, theme metafields pull, silent metafields pull from theme dev, and dev-server session refreshes.
  • Added a patch changeset for @shopify/cli-kit and @shopify/theme.

Why

Theme commands could only use the globally selected CLI account session. This allows commands like:

shopify theme pull --store example.myshopify.com --alias work

without mutating the user's current global CLI session.

Validation

  • pnpm vitest run packages/cli-kit/src/private/node/session.test.ts packages/cli-kit/src/public/node/session.test.ts packages/theme/src/cli/utilities/theme-command.test.ts packages/theme/src/cli/utilities/theme-environment/dev-server-session.test.ts packages/theme/src/cli/services/metafields-pull.test.ts passed: 5 files, 98 tests.
  • pnpm nx run theme:lint passed.
  • pnpm nx run cli-kit:lint passed.
  • git diff --check passed.

Notes:

  • pnpm nx run cli-kit:type-check, pnpm nx run theme:type-check, and pnpm refresh-manifests currently stop in the existing cli-kit GraphiQL build/type resolution errors for h3, react-dom/server, @shopify/polaris, and @shopify/polaris-icons before reaching this change's surface.
  • A sandboxed run of the metafields tests failed only because the tests write local-storage state under ~/Library/Preferences; rerunning with filesystem access passed.

@GeorgiZhelev GeorgiZhelev force-pushed the codex/theme-account-alias branch from d4133d5 to 98c5dc8 Compare June 18, 2026 17:56
@GeorgiZhelev GeorgiZhelev marked this pull request as ready for review June 18, 2026 18:10
@GeorgiZhelev GeorgiZhelev requested review from a team as code owners June 18, 2026 18:10
@GeorgiZhelev GeorgiZhelev changed the title [codex] Add non-mutating theme account alias support Add non-mutating theme account alias support Jun 18, 2026
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.

1 participant