Is there an existing issue for this?
Describe the bug
The Aspire pane's Create with Aspire… action (aspire-vscode.createWithAspire) always offers both Create a new Aspire app and Add Aspire to this workspace, even when the workspace already has an AppHost. Offering aspire init again in that case doesn't make sense — Aspire is already set up.
Confirmed on origin/main (extension/src/commands/createWithAspire.ts): the quick-pick items array is built unconditionally with both entries and never checks whether an AppHost already exists in the workspace before showing them.
This was called out as an explicit acceptance criterion in #19499 ("Initialization is only offered for applicable workspace folders without an AppHost") but was never implemented when that feature shipped in #19539. The PR's own E2E test (workspaceTargetProof.e2e.test.ts) only exercises a 3-folder workspace where two folders lack an AppHost, so the always-both-options behavior went unnoticed.
Expected Behavior
Add Aspire to this workspace should be hidden from the picker when every workspace folder already contains an AppHost. It should remain visible when the workspace is empty, or when at least one folder (in a multi-root workspace) still lacks an AppHost.
Steps To Reproduce
- Open a workspace/folder that already has an AppHost (e.g. run
aspire new first).
- Open the Aspire pane and click Create with Aspire… (or run "Aspire: Create with Aspire..." from the Command Palette).
- Observe that Add Aspire to this workspace is still offered alongside Create a new Aspire app, even though the workspace already has Aspire set up.
Additional context
Is there an existing issue for this?
Describe the bug
The Aspire pane's Create with Aspire… action (
aspire-vscode.createWithAspire) always offers both Create a new Aspire app and Add Aspire to this workspace, even when the workspace already has an AppHost. Offeringaspire initagain in that case doesn't make sense — Aspire is already set up.Confirmed on
origin/main(extension/src/commands/createWithAspire.ts): the quick-pick items array is built unconditionally with both entries and never checks whether an AppHost already exists in the workspace before showing them.This was called out as an explicit acceptance criterion in #19499 ("Initialization is only offered for applicable workspace folders without an AppHost") but was never implemented when that feature shipped in #19539. The PR's own E2E test (
workspaceTargetProof.e2e.test.ts) only exercises a 3-folder workspace where two folders lack an AppHost, so the always-both-options behavior went unnoticed.Expected Behavior
Add Aspire to this workspace should be hidden from the picker when every workspace folder already contains an AppHost. It should remain visible when the workspace is empty, or when at least one folder (in a multi-root workspace) still lacks an AppHost.
Steps To Reproduce
aspire newfirst).Additional context
extension/src/commands/createWithAspire.ts,extension/src/activation/registerCliCommands.ts)ellahathaway-hide-init-when-apphost-exists: hides the "Add Aspire to this workspace" option by checking each workspace folder's AppHost status viaAspireEditorCommandProvider.getAppHostPath()before building the quick-pick items.