Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 4 additions & 1 deletion packages/extension/src/commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 () => {
Expand Down
9 changes: 9 additions & 0 deletions packages/extension/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading