Skip to content

[Website] Create blueprint.json for editable Blueprints that have none - #4052

Merged
adamziel merged 2 commits into
trunkfrom
ensure-blueprint-json
Jul 14, 2026
Merged

[Website] Create blueprint.json for editable Blueprints that have none#4052
adamziel merged 2 commits into
trunkfrom
ensure-blueprint-json

Conversation

@adamziel

@adamziel adamziel commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

This PR creates a minimal blueprint.json when an editable Blueprint has none.

The Blueprint editor always reads /blueprint.json. An editable Blueprint with no declaration or a bundle with no file leaves the editor with nothing to open.

Create a minimal blueprint.json when an editable filesystem does not have one. Do not write the file when reading a stored, read-only bundle.

This gives the Blueprint editor a file to open when it moves into the Dock in #3965.

Verified with npm exec nx test playground-website --output-style=static and npm exec nx typecheck playground-website --output-style=static.

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Seeds editable Blueprint bundles with a minimal blueprint.json so the Blueprint editor always has a file to open, while avoiding mutation of persisted/read-only bundles during inspection.

Changes:

  • Added a minimal stub blueprint.json and logic to ensure it exists for editable/in-memory filesystems.
  • Updated filesystem creation to optionally seed missing blueprint.json depending on caller/read-only context.
  • Added Vitest coverage for readSiteBlueprintJson seeding and non-mutation behavior.

Reviewed changes

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

File Description
packages/playground/website/src/components/blueprint-editor/SiteBlueprintBundleEditor.tsx Adds stub blueprint seeding + optional behavior to avoid mutating persisted bundles when reading.
packages/playground/website/src/components/blueprint-editor/SiteBlueprintBundleEditor.spec.ts Adds tests validating stub seeding and that reading doesn’t write into a filesystem backend.

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

@adamziel adamziel changed the title [Website] Seed editable Blueprint bundles with blueprint.json Jul 14, 2026
@adamziel
adamziel merged commit 2ae6b84 into trunk Jul 14, 2026
53 checks passed
@adamziel
adamziel deleted the ensure-blueprint-json branch July 14, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment