Skip to content

Confirm before Stop / Restart on production web apps - #2903

Draft
Alex Weininger (alexweininger) with Copilot wants to merge 2 commits into
mainfrom
copilot/add-confirmation-prompt-stop-restart
Draft

Confirm before Stop / Restart on production web apps#2903
Alex Weininger (alexweininger) with Copilot wants to merge 2 commits into
mainfrom
copilot/add-confirmation-prompt-stop-restart

Conversation

Copilot AI commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

appService.Stop and appService.Restart executed immediately, so a mis-click in the tree context menu (Stop sits next to Restart) could take a production site down with no confirmation—unlike Delete and Swap Slots, which already gate on a warning modal.

Changes

  • stopWebApp.ts: On the production slot (!node.site.isSlot), show a { modal: true } warning gated with DialogResponses.yes/cancel before calling client.stop(). Staging/dev slots are unaffected.
  • restartWebApp.ts: Same production-only gate with a restart-specific message. Reworked to run client.stop()client.start() inline (previously chained the appService.Stop/appService.Start commands) so restart shows a single prompt instead of inheriting Stop's dialog.
if (!node.site.isSlot) {
    const confirmMessage = localize('confirmStop', 'Stop web app "{0}"? Traffic will be interrupted.', node.site.fullName);
    await context.ui.showWarningMessage(confirmMessage, { modal: true, stepName: 'confirmStop' }, DialogResponses.yes, DialogResponses.cancel);
}

Note: isSlot === false is the production site; deployment slots (staging/dev) have isSlot === true, matching the existing convention in ResolvedWebAppResource.ts.

Copilot AI changed the title [WIP] Add confirmation prompt before Stop/Restart on production web apps Confirm before Stop / Restart on production web apps Jul 15, 2026
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.

Add confirmation prompt before Stop / Restart on production web apps

2 participants