From 464e75e9e9b879b02ceeb2a70f33f5814caa451b Mon Sep 17 00:00:00 2001 From: Chrison Simtian Date: Sat, 15 Aug 2026 11:21:44 +1200 Subject: [PATCH] Add the Deployment view as a declared placeholder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Registers `fallout.deployment` with a provider that returns nothing, so the view renders its welcome content explaining what will appear there. Deliberately shipped empty rather than held back. The continuous-delivery model — channels → environments → targets (ADR-0009) — is emitted by the framework, not derived here, so there is nothing to render until a Fallout build writes a `deployment-graph.json`. Declaring the view now fixes its id and its place in the container, so filling it in later is a provider change rather than another user-visible reshuffle of the kind #9 just made. Refresh applies to it too, so it picks up a deployment graph the moment one appears without needing a window reload. Closes #11 Co-Authored-By: Claude Opus 5 --- package.json | 13 ++++++++++++- src/extension.ts | 16 ++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) 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) => {