Skip to content

Add confirmation webview to "Deploy to Container App..." command with copilot support#897

Merged
motm32 merged 14 commits intomainfrom
feat/confirmationView
Jul 8, 2025
Merged

Add confirmation webview to "Deploy to Container App..." command with copilot support#897
motm32 merged 14 commits intomainfrom
feat/confirmationView

Conversation

@motm32
Copy link
Copy Markdown
Contributor

@motm32 motm32 commented Jun 30, 2025

Most of this code has already been reviewed in previous PR's see: #896, #887, #886

Here is how the view looks:
image

Here is how the copilot button looks like: image

Todo:

  • Fix bug when closing the view using the "x" button the command continues to deploy. It should just dispose of the view

motm32 and others added 2 commits June 27, 2025 10:20
* initial commit

* small changes

* requested changes to commonChannel

* small changes and revert previous commit

* remove line

* prod changes

* Rename confirmationViewController.ts to ConfirmationViewController.ts
* initial commit

* small changes

* add deploy changes

* requested changes to commonChannel

* cancel bug fix

* small changes and revert previous commit

* remove line

* prod changes

* Rename confirmationViewController.ts to ConfirmationViewController.ts

* Implement utils changes (#890)

* change copilot button location

* small changes after merge

* pass in view description

* Add functionality to copilot button (#896)

* initial

* small changes

* requested changes

* small change

---------

Co-authored-by: Alex Weininger <alex.weininger@live.com>
@motm32 motm32 requested a review from a team as a code owner June 30, 2025 16:38
Comment thread package.json Outdated
"@microsoft/vscode-azext-github": "^1.0.2",
"@microsoft/vscode-azext-utils": "^3.1.4",
"@microsoft/vscode-azureresources-api": "^2.0.2",
"@swc/core-linux-x64-gnu": "^1.12.9",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably need to move this into the azure-pipelines since we can't run npm install with this

}
wizardContext.telemetry.properties.revisionMode = item.containerApp.revisionsMode;

const confirmationViewTitle: string = localize('confirmAndDeploy', 'Confirm + Deploy')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Deployment Summary" or "Deployment Overview" maybe?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Deployment Summary" is alright but I don't like "Deployment Overview". Any opinions @alexweininger?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either of those is good. I like "Deployment Summary"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After trying it out Nathan and I thought Summary looked better. Any thoughts @alexweininger?
image

Comment thread gulpfile.ts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

Comment thread main.js Outdated
Object.defineProperty(exports, "__esModule", { value: true });

const extension = require('./out/src/extension');
const extension = require('./dist/extension.bundle');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're gonna wanna change this back.

@@ -0,0 +1,24 @@
.confirmationView {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing header license.

Comment thread gulpfile.ts
}

async function installSwcCore(): Promise<void> {
if (process.platform === 'linux') {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a comment explaining why we need to have this would be helpful. I have a feeling we'll only have a vague recollection in the future.

Comment thread package.json
"@azure/ms-rest-azure-env": "^2.0.0",
"@microsoft/eslint-config-azuretools": "^0.2.2",
"@microsoft/vscode-azext-dev": "^2.1.0",
"@swc/core": "^1.7.36",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, do you know how much bigger the vsix is after adding all of these dependencies?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked offline but the size doesn't change too much with the dependencies.


const wizard: AzureWizard<ContainerAppDeployContext> = new AzureWizard(wizardContext, {
title: localize('deployContainerAppTitle', 'Deploy image to container app'),
title: title,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Is it possible to have the title and the editor tab title to be different?
{593E4551-7631-4915-BEAE-9AF573BE079B}
While I prefer summary for the header title, I think it just saying "Summary" in the VS Code tab doesn't look as good.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, could we have the text here (and maybe the header) based on the command? Ex: "Deploy image to container app - Summary"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I can make them different. Any ideas what we want there @nturinski . Or does alex's suggestion "summary" in the tab and the header being longer make sense?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think Alex's suggestion makes sense for the tab title, but I think it'll look very cluttered in the header. I'd mess around with it, but I think leaving that as Summary would be my preference.

return {
name: localize('environmentVariables', 'Environment Variables'),
value: context.envPath ?? localize('useExisting', 'Use existing configuration'),
contextPropertyName: 'envPath'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a future thing, but I was thinking that we should make this type a key of the context. That way the only accepted values would be properties that actually exist on the context and prevent any typos, would provide auto-complete, etc.

Similar to how we do that with nonNullProp

@motm32 motm32 merged commit 7ddd75d into main Jul 8, 2025
2 checks passed
@motm32 motm32 deleted the feat/confirmationView branch July 8, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants