Skip to content

Resolve discount app intents after save or cancel - #78

Open
iphipps wants to merge 2 commits into
Shopify:loic/react-router-discount-app-intentfrom
iphipps:iphipps/resolve-discount-intents
Open

Resolve discount app intents after save or cancel#78
iphipps wants to merge 2 commits into
Shopify:loic/react-router-discount-app-intentfrom
iphipps:iphipps/resolve-discount-intents

Conversation

@iphipps

@iphipps iphipps commented Aug 11, 2026

Copy link
Copy Markdown

Why

Follow-up to #75. The registered React Router discount intent links currently save or navigate without resolving the intent, leaving Sidekick or another invoker waiting for the declared output.

What changed

  • return the authoritative discountId from create and update mutations
  • resolve successful intent saves with shopify.intents.response.ok({id})
  • resolve intent cancellation with shopify.intents.response.closed()
  • preserve existing navigation when the page was not opened as an intent
  • upgrade App Bridge types so the request and response APIs are typed
  • add source tags for the associated shopify.dev tutorial

Validation

  • pnpm exec tsc --noEmit
  • targeted ESLint
  • targeted Prettier
  • env -u HOST -u SHOPIFY_APP_URL pnpm run build
  • git diff --check

Dependency for shop/world#919168.

@iphipps

iphipps commented Aug 11, 2026

Copy link
Copy Markdown
Author

@loic-d Could you review and merge this into the #75 branch? It addresses the valid Binks finding on shop/world#919168 and is required before the docs PR can land.

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