Skip to content

Feature/#840 integrate new file functionality - #844

Merged
manudous merged 4 commits into
devfrom
feature/#840-integrate-new-file-functionality
May 12, 2026
Merged

Feature/#840 integrate new file functionality#844
manudous merged 4 commits into
devfrom
feature/#840-integrate-new-file-functionality

Conversation

@Ivanruii

Copy link
Copy Markdown
Collaborator

Closes#840

CopilotAI 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

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-file bridge message and wired the web toolbar New button to send it when running inside VS Code.
  • Implemented quickmock.newWireframe to prompt for a save location, write an initial .qm template, and open it via vscode.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
FileDescription
packages/vscode-extension/src/editor/template.tsAdds initial .qm file content template + constants.
packages/vscode-extension/src/editor/index.tsRe-exports the new template module.
packages/vscode-extension/src/editor/handlers.tsHandles NEW_FILE app message by executing the VS Code command.
packages/vscode-extension/src/commands/new-wireframe/new-wireframe.id.tsDefines the command ID constant.
packages/vscode-extension/src/commands/new-wireframe/new-wireframe.handler.tsImplements the “Create QuickMock File” workflow (save dialog → write → open).
packages/vscode-extension/src/commands/new-wireframe/new-wireframe.command.tsRegisters the new wireframe command.
packages/vscode-extension/src/commands/new-wireframe/index.tsBarrel exports for the new-wireframe command module.
packages/vscode-extension/src/commands/new-wireframe.tsRemoves the old placeholder implementation.
packages/bridge-protocol/src/model.tsExtends AppMessage union to include NEW_FILE.
packages/bridge-protocol/src/constant.tsAdds APP_MESSAGE_TYPE.NEW_FILE.
apps/web/src/pods/toolbar/components/new-button/new-button.tsxSends NEW_FILE to the extension when in VS Code; otherwise clears the canvas.
.changeset/wise-hornets-post.mdDocuments 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';
@manudous
manudous self-requested a review May 12, 2026 07:44
@manudous
manudous merged commit 937f09a into devMay 12, 2026
3 checks passed
@manudous
manudous deleted the feature/#840-integrate-new-file-functionality branch May 12, 2026 07:54
Sign up for freeto 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.

[VSCode Extension] Integrate new file functionality

3 participants

@Ivanruii@manudous