Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserDataSyncr contributions do not dispose Action #241886

Closed
benibenj opened this issue Feb 25, 2025 · 0 comments · Fixed by #242541
Closed

UserDataSyncr contributions do not dispose Action #241886

benibenj opened this issue Feb 25, 2025 · 0 comments · Fixed by #242541
Assignees
Labels
insiders-released Patch has been released in VS Code Insiders
Milestone

Comments

@benibenj
Copy link
Contributor

benibenj commented Feb 25, 2025

Came across this code. Seems like it is not disposing the Action it is creating:

new Action('reset', localize('reset', "Reset Synced Data"), undefined, true, () => this.userDataSyncWorkbenchService.resetSyncedData()),

UserDataSyncWorkbenchContribution (multiple cases in this class)

primary: [
new Action('reset', localize('reset', "Clear Data in Cloud..."), undefined, true, () => this.userDataSyncWorkbenchService.resetSyncedData()),
new Action('show synced data', localize('show synced data action', "Show Synced Data"), undefined, true, () => this.userDataSyncWorkbenchService.showSyncActivity())
]

UserDataSyncReportIssueContribution (multiple cases in this class)

primary: [
new Action('Show Sync Logs', localize('show sync logs', "Show Log"), undefined, true, () => this.commandService.executeCommand(SHOW_SYNC_LOG_COMMAND_ID)),
new Action('Restart', isWeb ? localize('reload', "Reload") : localize('restart', "Restart"), undefined, true, () => this.hostService.restart())
]

AbstractUserDataProfileElement

openAction: new Action('_openChild', localize('open', "Open to the Side"), ThemeIcon.asClassName(Codicon.goToFile), true, async () => {
if (child.parent.type === ProfileResourceType.Extensions) {
await this.commandService.executeCommand('extension.open', child.handle, undefined, true, undefined, true);
} else if (child.resourceUri) {
await this.commandService.executeCommand(API_OPEN_EDITOR_COMMAND_ID, child.resourceUri, [SIDE_GROUP], undefined);
}
}),

openAction: new Action('_openChild', localize('open', "Open to the Side"), ThemeIcon.asClassName(Codicon.goToFile), true, async () => {
if (child.parent.type === ProfileResourceType.Extensions) {
await this.commandService.executeCommand('extension.open', child.handle, undefined, true, undefined, true);
} else if (child.resourceUri) {
await this.commandService.executeCommand(API_OPEN_EDITOR_COMMAND_ID, child.resourceUri, [SIDE_GROUP], undefined);
}
}),

UserDataProfilesEditor (multiple cases in this class)

getActions: () => {
const actions: IAction[] = [];
if (this.templates.length) {
actions.push(new SubmenuAction('from.template', localize('from template', "From Template"), this.getCreateFromTemplateActions()));
actions.push(new Separator());
}
actions.push(new Action('importProfile', localize('importProfile', "Import Profile..."), undefined, true, () => this.importProfile()));
return actions;
}

UpdateContribution

new Action('', nls.localize('learn more', "Learn More"), undefined, undefined, () => {
this.openerService.open('https://aka.ms/vscode-windows-setup');
})

@benibenj benibenj changed the title UserDataSyncActivityViewDataProvider does not dispose Action UserDataSyncActivityViewDataProvider and others do not dispose Action Feb 25, 2025
@benibenj benibenj changed the title UserDataSyncActivityViewDataProvider and others do not dispose Action UserDataSyncr contributions do not dispose Action Feb 25, 2025
sandy081 added a commit that referenced this issue Mar 4, 2025
@sandy081 sandy081 mentioned this issue Mar 4, 2025
@vs-code-engineering vs-code-engineering bot added the unreleased Patch has not yet been released in VS Code Insiders label Mar 4, 2025
@vs-code-engineering vs-code-engineering bot added this to the March 2025 milestone Mar 4, 2025
@vs-code-engineering vs-code-engineering bot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
insiders-released Patch has been released in VS Code Insiders
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants