diff --git a/package.json b/package.json index cb6e630..a084e03 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "activationEvents": [ "onView:fallout.build", "onView:fallout.buildExplorer", + "onView:fallout.deployment", "workspaceContains:**/.fallout/temp/build-graph.json", "workspaceContains:**/.nuke/temp/build-graph.json" ], @@ -52,6 +53,12 @@ "name": "Build", "icon": "media/fallout.svg", "contextualTitle": "Fallout" + }, + { + "id": "fallout.deployment", + "name": "Deployment", + "icon": "media/fallout.svg", + "contextualTitle": "Fallout" } ], "explorer": [ @@ -72,6 +79,10 @@ { "view": "fallout.buildExplorer", "contents": "No Fallout build graph found in this workspace.\nRun the build once to generate `build-graph.json`, then refresh.\n[Plan build (dry run)](command:fallout.planTarget)" + }, + { + "view": "fallout.deployment", + "contents": "No deployment graph yet.\nThe continuous-delivery model (channels → environments → targets) is emitted by a later Fallout build (ADR-0009). This view lights up once the framework writes a `deployment-graph.json`." } ], "commands": [ @@ -115,7 +126,7 @@ }, { "command": "fallout.refreshTargets", - "when": "view == fallout.build || view == fallout.buildExplorer", + "when": "view == fallout.build || view == fallout.buildExplorer || view == fallout.deployment", "group": "navigation@2" } ], diff --git a/src/extension.ts b/src/extension.ts index 93b4f51..f802055 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -105,6 +105,21 @@ class FalloutTargetsProvider implements vscode.TreeDataProvider { } } +/** + * Placeholder for the Deployment view. The continuous-delivery graph (channels → + * environments → targets, ADR-0009) is not emitted by the framework yet, so this + * returns nothing and the view shows its welcome content. It becomes real once the + * build writes a deployment-graph.json. + */ +class DeploymentProvider implements vscode.TreeDataProvider { + getTreeItem(element: vscode.TreeItem): vscode.TreeItem { + return element; + } + getChildren(): vscode.ProviderResult { + return []; + } +} + function runInTerminal(root: string, args: string): void { const existing = vscode.window.terminals.find(t => t.name === 'Fallout'); const terminal = existing ?? vscode.window.createTerminal({ name: 'Fallout', cwd: root }); @@ -145,6 +160,7 @@ export function activate(context: vscode.ExtensionContext): void { // mirrored Explorer dock — one graph, two homes; refresh() updates both. vscode.window.registerTreeDataProvider('fallout.build', provider), vscode.window.registerTreeDataProvider('fallout.buildExplorer', provider), + vscode.window.registerTreeDataProvider('fallout.deployment', new DeploymentProvider()), watcher, vscode.commands.registerCommand('fallout.refreshTargets', refreshAll), vscode.commands.registerCommand('fallout.runTarget', (item?: TargetItem) => {