Skip to content

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

Merged
one20 merged 1 commit into
mainfrom
ca/cli-multi-should-render
Oct 14, 2026
Merged

one20 merged 1 commit into
mainfrom
ca/cli-multi-should-render

Conversation

@one20

@one20 one20 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

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
@one20
one20 marked this pull request as ready for review October 13, 2026 14:18
@one20
one20 requested a review from a team as a code owner October 13, 2026 14:18

@melissaluu melissaluu left a comment

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.

🎩 and code looks good.

This PR should also be reviewed by the dev platform team as well since they own the CLI.

@one20
one20 added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit 46778a4 Oct 14, 2026
140 of 155 checks passed
@one20
one20 deleted the ca/cli-multi-should-render branch October 14, 2026 14:21
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.

3 participants