[Blueprints][installTheme step] Honor ifAlreadyInstalled for directory themes - #3855
Merged
Merged
Conversation
adamziel
force-pushed
the
add/theme-directory-if-already-installed
branch
5 times, most recently
from
July 1, 2026 18:17
fea5c7f to
c83ea32
Compare
adamziel
marked this pull request as ready for review
July 1, 2026 18:30
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the installTheme blueprint step so directory-based theme installs honor the ifAlreadyInstalled collision behavior (matching zip-based installs), and adds a test covering skip/overwrite/error.
Changes:
- Apply
ifAlreadyInstalledsemantics when installing directory theme resources (skip, overwrite, error). - Add a spec that exercises the new directory-theme collision behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/playground/blueprints/src/lib/steps/install-theme.ts | Adds collision handling before writing directory theme files to honor ifAlreadyInstalled. |
| packages/playground/blueprints/src/tests/steps/install-theme.spec.ts | Adds coverage for directory-theme installs respecting skip/overwrite/error. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamziel
force-pushed
the
add/theme-directory-if-already-installed
branch
from
July 1, 2026 18:36
c83ea32 to
5d9a7aa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Makes directory-based
installThemeresources honor the existingifAlreadyInstalledoption.ifAlreadyInstalledoverwriteskiperrorRationale
Zip-based theme installs already respect
ifAlreadyInstalled, but directory resources always rewrote the target directory throughwriteFiles(..., { rmRoot: true }).Blueprint v2 lowering uses directory resources, so it needs the same collision semantics as zip resources before the runner can rely on this step consistently.
Implementation
Before writing directory-resource theme files,
installTheme()now checks whether the target directory already exists and applies the sameifAlreadyInstalledrule used by zip installs.This PR intentionally does not add path validation or symlink hardening. Those are separate behaviors and should stay reviewable on their own.
Testing instructions
Validated locally: