Feature/#840 integrate new file functionality#844
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements the “New File” workflow for the QuickMock VS Code extension by making the toolbar New button trigger a command that creates a real .qm file on disk, then opens it in the custom editor (closing #840).
Changes:
- Added a new
qm:new-filebridge message and wired the web toolbar New button to send it when running inside VS Code. - Implemented
quickmock.newWireframeto prompt for a save location, write an initial.qmtemplate, and open it viavscode.openWith. - Added a shared template helper for generating the initial QuickMock file content.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/vscode-extension/src/editor/template.ts | Adds initial .qm file content template + constants. |
| packages/vscode-extension/src/editor/index.ts | Re-exports the new template module. |
| packages/vscode-extension/src/editor/handlers.ts | Handles NEW_FILE app message by executing the VS Code command. |
| packages/vscode-extension/src/commands/new-wireframe/new-wireframe.id.ts | Defines the command ID constant. |
| packages/vscode-extension/src/commands/new-wireframe/new-wireframe.handler.ts | Implements the “Create QuickMock File” workflow (save dialog → write → open). |
| packages/vscode-extension/src/commands/new-wireframe/new-wireframe.command.ts | Registers the new wireframe command. |
| packages/vscode-extension/src/commands/new-wireframe/index.ts | Barrel exports for the new-wireframe command module. |
| packages/vscode-extension/src/commands/new-wireframe.ts | Removes the old placeholder implementation. |
| packages/bridge-protocol/src/model.ts | Extends AppMessage union to include NEW_FILE. |
| packages/bridge-protocol/src/constant.ts | Adds APP_MESSAGE_TYPE.NEW_FILE. |
| apps/web/src/pods/toolbar/components/new-button/new-button.tsx | Sends NEW_FILE to the extension when in VS Code; otherwise clears the canvas. |
| .changeset/wise-hornets-post.md | Documents the behavior change for the VS Code extension workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+9
to
+13
| { | ||
| version: TEMPLATE_VERSION, | ||
| pages: [{ id: 'page-1', name: 'Page 1', shapes: [] }], | ||
| customColors: [], | ||
| size: DEFAULT_CANVAS_SIZE, |
Comment on lines
+26
to
+33
| export const handleNewWireframe = async (): Promise<void> => { | ||
| const target = await pickSaveTarget(); | ||
| if (!target) return; | ||
|
|
||
| try { | ||
| await writeFile(target, createEmptyQuickMockContent()); | ||
| } catch (error) { | ||
| const message = error instanceof Error ? error.message : 'Unknown error'; |
…wireframe template
manudous
approved these changes
May 12, 2026
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.
Closes #840