Repository navigation
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
- Open a folder with a WinApp manifest and no
.vscode/launch.json. - Choose Not Now on the notification.
- Reload the window → the notification reappears.
Where:
WinAppVSCE/src/launch-assets.ts
Lines 120 to 150 in 9dcbaad
| * 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.
Metadata
Metadata
Assignees
Labels
No labels
Activity