Skip to content

'Not Now' on the add-launch-configuration notification is not remembered #320

Open

Description

Follow-up from #283.

Problem: On activation in a WinApp workspace without a type: winapp launch configuration, the extension shows "This looks like a WinApp project, but there is no launch configuration… Add one?" with Yes / Not Now / Don't Ask Again. Only Don't Ask Again is persisted (global winapp.launchConfigNotificationDismissed), so choosing Not Now brings the prompt back on every window reload/activation.

Repro

  1. Open a folder with a WinApp manifest and no .vscode/launch.json.
  2. Choose Not Now on the notification.
  3. Reload the window → the notification reappears.

Where:

* WinApp configuration exists yet, and the user hasn't dismissed the offer.
*/
export async function offerLaunchConfiguration(context: vscode.ExtensionContext): Promise<void> {
const folders = vscode.workspace.workspaceFolders ?? [];
const shouldOffer = await shouldOfferLaunchConfiguration({
dismissed: context.globalState.get<boolean>(DISMISSED_KEY) === true,
folderConfigurations: folders.map(readEffectiveConfigurations),
// A thunk, so the workspace scan only runs once the cheap conditions
// have already passed.
hasManifest: looksLikeWinAppWorkspace
});
if (!shouldOffer) {
return;
}
const yes = 'Yes';
const notNow = 'Not Now';
const never = "Don't Ask Again";
const choice = await vscode.window.showInformationMessage(
'This looks like a WinApp project, but there is no launch configuration to build and debug it. Add one?',
yes,
notNow,
never
);
if (choice === never) {
await context.globalState.update(DISMISSED_KEY, true);
return;
}

Possible fix: Persist Not Now per workspace (context.workspaceState), optionally with a cooldown, and keep Don't Ask Again global. Add a unit test for the dismissal state.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions