Repository navigation
feat: add memory file system - #188
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 793f959 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds an in-memory FileSystem implementation and integrates it into a new apply-preview flow so dry runs can optionally display the full generated file contents via a --show-files CLI flag.
Changes:
- Introduces
MemoryFileSystem(POSIX-like, watchable, supports copy/rename/glob/temp resources). - Adds
ApplyPreviewServiceto runApplyServiceagainst an in-memory volume and return generated file contents. - Extends CLI/TUI to support
--show-filesduring--dry-run, wiring results into the dry-run preview renderer.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/scaffold/src/service/memoryFileSystem.ts | New in-memory FileSystem backend with path resolution, descriptors, globbing, and watch support. |
| packages/scaffold/src/service/memoryFileSystem.test.ts | Basic coverage for providing the in-memory FileSystem and isolating volumes/layers. |
| packages/scaffold/src/service/apply/ApplyPreviewService.ts | New service that seeds a virtual workspace, runs apply in-memory, and returns generated file contents. |
| packages/scaffold/src/service/apply/ApplyPreviewService.test.ts | Tests preview behavior (greenfield, isolation, composition, Windows host path behavior, skipping conflicts). |
| packages/scaffold/src/index.ts | Re-exports MemoryFileSystem and ApplyPreviewService types/API. |
| packages/scaffold/src/MemoryFileSystem.ts | Public facade for make/layer exports. |
| apps/cli/src/service/ScaffoldPipeline.ts | Adds showFiles handling and uses ApplyPreviewService when enabled. |
| apps/cli/src/service/ScaffoldPipeline.test.ts | Verifies pipeline uses memory-backed preview when showFiles is enabled. |
| apps/cli/src/index.ts | Registers ApplyPreviewService.layer in CLI main layer. |
| apps/cli/src/flags.ts | Adds --show-files flag and validation requiring --dry-run. |
| apps/cli/src/flags.test.ts | Tests --show-files help docs and validation behavior. |
| apps/cli/src/components/DryRunPreview.ts | Renders an optional “Generated Files” panel with wrapped file contents. |
| apps/cli/src/components/DryRunPreview.test.ts | Tests conditional rendering and wrapping behavior. |
| apps/cli/src/commands/init.ts | Adds showFiles flag + validation and passes it to pipeline. |
| apps/cli/src/commands/create.ts | Adds showFiles flag + validation and passes it to pipeline. |
| apps/cli/src/commands/add.ts | Adds showFiles flag + validation and passes it to pipeline. |
| .changeset/calm-files-preview.md | Documents the new --show-files behavior as a minor release change. |
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.
Description
Added
MemoryFileSystemto support an in-memory file system implementation.Introduced memory-backed apply previews to enable dry-run previewing without touching the real file system.
Enhanced CLI dry-run output to display the generated files.