Skip to content

Skip manifest generation when bundle dir matches local output#7413

Open
isaacroldan wants to merge 1 commit intomainfrom
04-28-skip_manifest_generation_when_bundle_dir_matches_local_output
Open

Skip manifest generation when bundle dir matches local output#7413
isaacroldan wants to merge 1 commit intomainfrom
04-28-skip_manifest_generation_when_bundle_dir_matches_local_output

Conversation

@isaacroldan
Copy link
Copy Markdown
Contributor

@isaacroldan isaacroldan commented Apr 28, 2026

WHY are these changes introduced?

When the local output directory and the bundle output directory resolve to the same path, there is no need to copy files or generate an assets manifest. Previously, the early return only skipped the file copy but still allowed manifest generation to proceed in some code paths.

WHAT is this pull request doing?

When the resolved local and bundle output directories are identical, the function now returns early before both the file copy and any manifest generation. This ensures that manifest generation is also skipped in this case, not just the file copy.

A test has been added to verify that neither copyFile nor createOrUpdateManifestFile is called when the two paths resolve to the same location.

How to test your changes?

  1. Run the updated test suite for bundle-ui-step:
    pnpm test packages/app/src/cli/services/build/steps/bundle-ui-step.test.ts
    
  2. Verify the new test case passes, confirming that both copyFile and createOrUpdateManifestFile are skipped when the local and bundle output directories resolve to the same path.

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
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

The same-path guard previously only skipped the copy and still let manifest generation run. With the comment now explicitly stating both behaviors, lock that in with a test that verifies createOrUpdateManifestFile is not called when localOutputDir === bundleOutputDir, even with generatesAssetsManifest: true.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@isaacroldan isaacroldan marked this pull request as ready for review April 28, 2026 12:51
@isaacroldan isaacroldan requested a review from a team as a code owner April 28, 2026 12:51
Copilot AI review requested due to automatic review settings April 28, 2026 12:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the bundle_ui build step to fully short-circuit when the “local build output” and “bundle output” directories resolve to the same path, preventing unnecessary work and avoiding manifest generation in that scenario.

Changes:

  • Return early when resolvePath(localOutputDir) === resolvePath(bundleOutputDir) to skip both copy and manifest generation.
  • Simplify copy logic to a single unconditional copyFile call after the early-return guard.
  • Add a unit test asserting neither copyFile nor createOrUpdateManifestFile is invoked when both paths resolve to the same location.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/app/src/cli/services/build/steps/bundle-ui-step.ts Adds an early return to skip copy + assets manifest generation when output dirs resolve to the same path.
packages/app/src/cli/services/build/steps/bundle-ui-step.test.ts Adds coverage ensuring manifest generation is also skipped in the “same resolved dir” scenario.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@isaacroldan isaacroldan enabled auto-merge April 28, 2026 13:42
@isaacroldan isaacroldan added this pull request to the merge queue Apr 28, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 28, 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.

5 participants