diff --git a/packages/extension/CHANGELOG.md b/packages/extension/CHANGELOG.md index 94f5e927..f157b657 100644 --- a/packages/extension/CHANGELOG.md +++ b/packages/extension/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 0.10.1 + +- "Customize Template" now opens the created `template.json` after + success, instead of only showing a notification and silently + refreshing the tree — found via live testing: the tree refresh alone + gave no visible feedback unless "Project" was already expanded. + ## 0.10.0 - Added "Delete Project Template" to the Templates view, scoped to diff --git a/packages/extension/package.json b/packages/extension/package.json index 7abe3bd2..14391a49 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -3,7 +3,7 @@ "displayName": "OpenSpec Workbench", "description": "Native OpenSpec workflow with lifecycle controls, VS Code Chat, persistent processes, checkpoints, and conflict-safe rollback.", "publisher": "openspec-ui", - "version": "0.10.0", + "version": "0.10.1", "icon": "media/icon.png", "license": "MIT", "repository": { diff --git a/packages/extension/src/commands.test.ts b/packages/extension/src/commands.test.ts index 227ecdfa..3a177cfe 100644 --- a/packages/extension/src/commands.test.ts +++ b/packages/extension/src/commands.test.ts @@ -383,7 +383,7 @@ describe("registerCommands", () => { }, }; - it("customizes a built-in template and refreshes the templates tree", async () => { + it("customizes a built-in template, refreshes the templates tree, and opens the created manifest", async () => { customizeTemplateMock.mockResolvedValue({}); const deps = makeDeps(); registerCommands(makeContext() as unknown as import("vscode").ExtensionContext, deps); @@ -392,6 +392,9 @@ describe("registerCommands", () => { expect(customizeTemplateMock).toHaveBeenCalledWith("/workspace/repo", "seed"); expect(deps.refreshTemplatesTree).toHaveBeenCalled(); + const manifestPath = path.join("/workspace/repo", "openspec", "templates", "seed", "template.json"); + expect(vscodeMock.workspace.openTextDocument).toHaveBeenCalledWith(expect.objectContaining({ fsPath: manifestPath })); + expect(vscodeMock.window.showTextDocument).toHaveBeenCalled(); }); it("reports an already-customized template as a warning, not an error", async () => { diff --git a/packages/extension/src/commands.ts b/packages/extension/src/commands.ts index 0a8e6313..a1650f40 100644 --- a/packages/extension/src/commands.ts +++ b/packages/extension/src/commands.ts @@ -340,6 +340,15 @@ export function registerCommands(context: vscode.ExtensionContext, deps: Command try { await customizeTemplate(workspaceRoot, item.template.manifest.id); deps.refreshTemplatesTree(); + // Open the created manifest as visible proof — a toast notification + // alone is easy to miss/dismiss, and the tree refresh isn't visible + // unless "Project" happens to already be expanded (found via live + // testing: the command silently succeeds with no other feedback). + const manifestUri = vscode.Uri.file( + path.join(workspaceRoot, "openspec", "templates", item.template.manifest.id, "template.json"), + ); + const manifestDocument = await vscode.workspace.openTextDocument(manifestUri); + await vscode.window.showTextDocument(manifestDocument, { preview: false }); void vscode.window.showInformationMessage(`OpenSpec UI: customized "${item.template.manifest.title}".`); } catch (error) { if (error instanceof TemplateAlreadyExistsError) {