Summary
The appService.Stop and appService.Restart commands execute immediately with no confirmation dialog. In contrast, Delete and Swap Slots both confirm. Given that Stop/Restart cause user-facing downtime, they warrant the same protection — a mis-click in the tree view (Stop is directly adjacent to Restart in the context menu) can take a production site down.
Current behavior
src/commands/stopWebApp.ts and src/commands/restartWebApp.ts execute without prompting the user.
stopWebApp.ts calls client.stop() directly.
restartWebApp.ts chains appService.Stop → appService.Start.
No context.ui.showWarningMessage(..., DialogResponses.yes, DialogResponses.cancel) gate.
Proposed behavior
Wrap both commands with a warning-modal confirmation, matching the pattern already used in deleteWebApp.ts / swapSlots.ts:
const message = localize('confirmStop', 'Stop web app "{0}"? Traffic will be interrupted.', node.site.fullName);
await context.ui.showWarningMessage(message, { modal: true }, DialogResponses.yes, DialogResponses.cancel);
Optional: gate only on Production slot (skip prompt for staging/dev slots) to reduce friction while keeping the safety net where it matters.
Rationale
- Parity with existing destructive-action UX (Delete, Swap Slots)
- Prevents accidental production outages from mis-clicks in the tree context menu
- Matches Azure Portal, which also confirms Stop / Restart
Happy to open a PR if the team agrees on the shape (unconditional prompt vs. production-slot-only).
Summary
The
appService.StopandappService.Restartcommands execute immediately with no confirmation dialog. In contrast,DeleteandSwap Slotsboth confirm. Given that Stop/Restart cause user-facing downtime, they warrant the same protection — a mis-click in the tree view (Stop is directly adjacent to Restart in the context menu) can take a production site down.Current behavior
src/commands/stopWebApp.tsandsrc/commands/restartWebApp.tsexecute without prompting the user.stopWebApp.tscallsclient.stop()directly.restartWebApp.tschainsappService.Stop→appService.Start.No
context.ui.showWarningMessage(..., DialogResponses.yes, DialogResponses.cancel)gate.Proposed behavior
Wrap both commands with a warning-modal confirmation, matching the pattern already used in
deleteWebApp.ts/swapSlots.ts:Optional: gate only on Production slot (skip prompt for staging/dev slots) to reduce friction while keeping the safety net where it matters.
Rationale
Happy to open a PR if the team agrees on the shape (unconditional prompt vs. production-slot-only).