Skip to content

Fix bundling for multiple UI extension should-render targets - #8862

Draft
one20 wants to merge 1 commit into
mainfrom
ca/cli-multi-should-render
Draft

one20 wants to merge 1 commit into
mainfrom
ca/cli-multi-should-render

Conversation

@one20

@one20 one20 commented Oct 9, 2026 •

Copy link
Copy Markdown

WHY are these changes introduced?

When a UI extension declares should_render for multiple targets, the CLI replaces each condition entry with the next one. The generated conditions bundle registers only the last target, so earlier targets cannot use their declared conditions.

WHAT is this pull request doing?

  • Bundles every declared should_render registration into one conditions asset, with distinct generated import names for each target.
  • Rejects inconsistent conditions output filenames rather than silently using the first one.
  • Adds regression coverage for shared and distinct condition modules, unconditioned targets, older API versions, and filename mismatches.
  • Adds an @shopify/app patch changeset.

How to manually test your changes?

  1. Use the local CLI to preview an app with a single UI extension that declares two render targets, each with a should_render module.
  2. Confirm each target uses its associated condition to control visibility.
  3. Repeat with both targets referencing the same condition module, then with separate condition modules.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • This is a user-facing bug fix; I've selected a patch bump and added a changeset.

@github-actions github-actions Bot added the Area: @shopify/app @shopify/app package issues label Oct 9, 2026
@one20
one20 force-pushed the ca/cli-multi-should-render branch from 5046d58 to a98e34f Compare October 9, 2026 22:16

This branch has not been deployed

No deployments
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.

1 participant