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

Report Issue for Remote extensions doesn't work #174404

Closed
sbatten opened this issue Feb 14, 2023 · 8 comments · Fixed by #176518
Closed

Report Issue for Remote extensions doesn't work #174404

sbatten opened this issue Feb 14, 2023 · 8 comments · Fixed by #176518
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders remote-explorer Remote explorer view verified Verification succeeded
Milestone

Comments

@sbatten
Copy link
Member

sbatten commented Feb 14, 2023

I ran across this while trying to create report issue markdown links for notebooks. Clicking the report issue item in the help section of the remote explorer does nothing and I believe its because of improper arguments format for the report issue command here:

await this.commandService.executeCommand('workbench.action.openIssueReporter', [extensionDescription.identifier.value]);

The correct argument is an object with an extensionId property.

@sbatten sbatten added the bug Issue identified by VS Code Team member as probable bug label Feb 14, 2023
@alexr00 alexr00 added this to the February 2023 milestone Feb 15, 2023
@alexr00
Copy link
Member

alexr00 commented Feb 17, 2023

@sbatten this works fine for me on desktop. Were you on web? It looks like that command is implemented differently for web. This seems unexpected.

@bpasero do you own issue.contribution.ts and issue.web.contribution.ts?

@alexr00 alexr00 added the issue-reporter Issue reporter widget issues label Feb 17, 2023
@alexr00 alexr00 removed this from the February 2023 milestone Feb 17, 2023
@alexr00 alexr00 removed the bug Issue identified by VS Code Team member as probable bug label Feb 17, 2023
@alexr00 alexr00 assigned TylerLeonhardt and unassigned alexr00 Feb 17, 2023
@alexr00
Copy link
Member

alexr00 commented Feb 17, 2023

Looks like @TylerLeonhardt might own this.
These are the parts that I would expect to be the same:

CommandsRegistry.registerCommand(OpenIssueReporterActionId, function (accessor, args?: [string] | OpenIssueReporterArgs) {
const data: Partial<IssueReporterData> = Array.isArray(args)
? { extensionId: args[0] }
: args || {};
return accessor.get(IWorkbenchIssueService).openReporter(data);
});

CommandsRegistry.registerCommand(OpenIssueReporterActionId, function (accessor, args?: [string] | OpenIssueReporterArgs) {
let extensionId: string | undefined;
if (args) {
if (Array.isArray(args)) {
[extensionId] = args;
} else {
extensionId = args.extensionId;
}
}
return accessor.get(IWorkbenchIssueService).openReporter({ extensionId });
});

@TylerLeonhardt
Copy link
Member

It was me all along 😱 I will change Web to be more like Desktop.

@TylerLeonhardt
Copy link
Member

I just debugged this and my issue reporter command is never fired. I think is an issue somewhere in this:

async handleClick() {
const remoteAuthority = this.environmentService.remoteAuthority;
if (remoteAuthority) {
for (let i = 0; i < this.remoteExplorerService.targetType.length; i++) {
if (remoteAuthority.startsWith(this.remoteExplorerService.targetType[i])) {
for (const value of this.values) {
if (value.remoteAuthority) {
for (const authority of value.remoteAuthority) {
if (remoteAuthority.startsWith(authority)) {
await this.takeAction(value.extensionDescription, await value.url);
return;
}
}
}
}
}
}
} else {
const virtualWorkspace = getVirtualWorkspaceLocation(this.workspaceContextService.getWorkspace())?.scheme;
if (virtualWorkspace) {
for (let i = 0; i < this.remoteExplorerService.targetType.length; i++) {
for (const value of this.values) {
if (value.virtualWorkspace && value.remoteAuthority) {
for (const authority of value.remoteAuthority) {
if (this.remoteExplorerService.targetType[i].startsWith(authority) && virtualWorkspace.startsWith(value.virtualWorkspace)) {
await this.takeAction(value.extensionDescription, await value.url);
return;
}
}
}
}
}
}
}
if (this.values.length > 1) {
const actions = (await Promise.all(this.values.map(async (value) => {
return {
label: value.extensionDescription.displayName || value.extensionDescription.identifier.value,
description: await value.url,
extensionDescription: value.extensionDescription
};
}))).filter(item => item.description);
if (actions.length) {
const action = await this.quickInputService.pick(actions, { placeHolder: nls.localize('pickRemoteExtension', "Select url to open") });
if (action) {
await this.takeAction(action.extensionDescription, action.description);
}
}
} else {
await this.takeAction(this.values[0].extensionDescription, await this.values[0].url);
}

The repro steps:

  • don't have a remote workspace open or any workspace open for that matter
  • open the remote explorer -> help and feedback -> Report Issue

nothing happens.

@alexr00
Copy link
Member

alexr00 commented Mar 8, 2023

To verify:

  • Install at least 2 remote extension
  • Reload, and make sure you don't have a remote or virtual workspace open
  • Click "Report Issue" from the Remote "Help & Feedback"
  • Verify that you get a quick pick.

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug remote-explorer Remote explorer view and removed issue-reporter Issue reporter widget issues labels Mar 8, 2023
@alexr00
Copy link
Member

alexr00 commented Mar 8, 2023

Sorry for the false alarm there @TylerLeonhardt !

alexr00 added a commit that referenced this issue Mar 8, 2023
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders 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 8, 2023
@meganrogge
Copy link
Contributor

@TylerLeonhardt where is this? Click "Report Issue" from the Remote "Help & Feedback"

@meganrogge meganrogge added the verification-steps-needed Steps to verify are needed for verification label Mar 22, 2023
@TylerLeonhardt
Copy link
Member

Image

In the Remote Explorer at the bottom.

@TylerLeonhardt TylerLeonhardt removed the verification-steps-needed Steps to verify are needed for verification label Mar 22, 2023
@meganrogge meganrogge added the verified Verification succeeded label Mar 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders remote-explorer Remote explorer view verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants