Skip to content

Merge shop_scopes back into access_scopes.scopes when pulling app config - #8977

Merged
maael merged 1 commit into
mainfrom
fix-app-access-shop-scopes
Oct 22, 2026
Merged

maael merged 1 commit into
mainfrom
fix-app-access-shop-scopes

Conversation

@maael

@maael maael commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

The platform stores Shop scopes in a separate shop_scopes field on the app_access module. The CLI's remote-to-local conversion only mapped scopes, so it dropped them. As a result, config link wrote TOMLs without Shop scopes, and the next deploy removed them, which can delete the app's Shop Server client on release. The deploy and release previews also hid the removal. This merges shop_scopes into access_scopes.scopes on the way down; the way up is unchanged.

@maael maael self-assigned this Oct 21, 2026
@maael
maael marked this pull request as ready for review October 21, 2026 16:43
@maael
maael requested a review from a team as a code owner October 21, 2026 16:43
@github-actions github-actions Bot added the Area: @shopify/app @shopify/app package issues label Oct 21, 2026
@maael
maael force-pushed the fix-app-access-shop-scopes branch from 18fb773 to 5b347e7 Compare October 21, 2026 16:46
Comment thread .changeset/app-access-shop-scopes.md Outdated
const AppAccessTransformConfig: CustomTransformationConfig = {
forward: (content) => appConfigTransform(content, AppAccessFieldMapping),
reverse: (content) =>
appConfigTransform(mergeShopScopesIntoScopes(content as {[key: string]: unknown}), AppAccessFieldMapping, true),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

probably best to do the casting inside mergeShopScopesIntoScopes, but it's ok

@maael
maael force-pushed the fix-app-access-shop-scopes branch from 5b347e7 to f95c113 Compare October 22, 2026 11:51
@maael
maael enabled auto-merge October 22, 2026 11:52
@maael
maael added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit bbde00e Oct 22, 2026
28 of 29 checks passed
@maael
maael deleted the fix-app-access-shop-scopes branch October 22, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/app @shopify/app package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants