Skip to content

feat: add memory file system - #188

Merged
lloydrichards merged 3 commits into
mainfrom
feat/memory-file-system
Aug 6, 2026
Merged

lloydrichards merged 3 commits into
mainfrom
feat/memory-file-system

Conversation

@lloydrichards

Copy link
Copy Markdown
Owner

Description

Added MemoryFileSystem to support an in-memory file system implementation.

@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 793f959

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stack-effect Minor

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

@lloydrichards
lloydrichards requested a balanced review from Copilot August 6, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown

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.

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 ApplyPreviewService to run ApplyService against an in-memory volume and return generated file contents.
  • Extends CLI/TUI to support --show-files during --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.

@lloydrichards
lloydrichards merged commit 27c5d1b into main Aug 6, 2026
1 check failed
@lloydrichards
lloydrichards deleted the feat/memory-file-system branch August 6, 2026 18:58
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.

Virtual File Tree / In-Memory Generation

2 participants