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

UX for extension disabled due to api version incompatibility #218646

Closed
roblourens opened this issue Jun 27, 2024 · 12 comments · Fixed by #224649 or #227020
Closed

UX for extension disabled due to api version incompatibility #218646

roblourens opened this issue Jun 27, 2024 · 12 comments · Fixed by #224649 or #227020
Assignees
Labels
chat feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

Discussed in the copilot sync today- we think that users may be confused when Copilot Chat gets disabled due to an api version incompatibility, because the chat icon disappears, and the only way to find out what happened is to go search for the extension in the viewlet.

I think that the ideal experience would be for me to be able to still register the chat viewlet and show some welcome view content in it, telling users that they need to update the extension. Do do this I need to be able to find out that the extension wasn't loaded due to the version mismatch- is there any way I can get this information, or can it be exposed somehow?

@roblourens roblourens added this to the July 2024 milestone Jun 27, 2024
@roblourens roblourens added feature-request Request for new features or functionality chat labels Jun 27, 2024
@sandy081
Copy link
Member

You can get the installed extensions and look for the extension that contributes chat and if it has any validation errors.

Use following API to get installed extensions

queryLocal(server?: IExtensionManagementServer): Promise<IExtension[]>;

You can get the installed extension model using local property on the IExtension

readonly local?: ILocalExtension;

@roblourens
Copy link
Member Author

This works perfectly, added a notification specifically for Copilot Chat when it has validation errors, thanks

roblourens added a commit that referenced this issue Aug 3, 2024
…has a proposed API incompatibility (#224649)

* Add a notification when loading a version of the chat extension that has a proposed API incompatibility
Fix #218646

* Fix activation phase
@vs-code-engineering vs-code-engineering bot added the unreleased Patch has not yet been released in VS Code Insiders label Aug 3, 2024
@roblourens
Copy link
Member Author

roblourens commented Aug 6, 2024

@sandy081, can you check my PR? I'm a little confused. Both vscode and copilot chat have an api version update in the latest today. When I updated VS Code today, I saw my notification in every window

Image

but I'm not expecting that because the extension is up to date

Image

and when reloading the window, I don't see the notification again. I think you download the extension ahead of time, but the extension update would have been installed only after the window loads, right? So is there a moment when the old one is still loaded and validated?

@roblourens roblourens reopened this Aug 6, 2024
@sandy081
Copy link
Member

Here is the sequence of things explaining why this has happened:

  • You bumped API version and Adopted it in Copilot chat extension day before (say yesterday)
  • Today, You received VS Code Insider update and Updated it and Restarted VS Code Insider (Remember extension is not yet updated)
  • VS Code Insider with bumped API version is opened with older version of chat extension. So extension is invalid and won't be activated. Your prompt check code gets kicked on this version of extension and prompt is shown.
  • Parallely Extensions auto update starts and VS Code Insider updates the Chat extension to latest version
  • Since the latest Chat extension version is compatible with the API, it is loaded and activated into Extension Host.

In short, your prompt is shown during the time frame VS Code checks for updates and installs updates.

Instead of the prompt, I would suggest to show an Error badge on Extensions View Container Icon to grasp user's attention. User can then go to the extension view and see what is happening.

@sandy081
Copy link
Member

To Continue...

We have a limitation of auto updating the extension to the latest version even before updating the VS Code. Because, we do not know the API versions upfront.

@roblourens
Copy link
Member Author

Yeah, that makes sense. I still worry that won't be obvious enough, though. Just really don't want to answer lots of issues from people who had chat suddenly disappear.

Parallely Extensions auto update starts and VS Code Insider updates the Chat extension to latest version

Is there any way for me to know when this process is done?

Another idea I just had, maybe I can register a welcome view from vscode which would be cleared once copilot chat is able to load and register its participants?

@roblourens
Copy link
Member Author

I kind of like the welcome view idea, I think that is possible to do with what exists today...

@sandy081
Copy link
Member

Is there any way for me to know when this process is done?

It is hard to know when the updates are being checked and triggered. It also depends on user preferences/state. Once extension is getting updated, you can listen to the installing/change events.

Lets have both. Error indicator on extensions view is useful in general.

@roblourens
Copy link
Member Author

That would be nice, I don't think we have the ability to have that kind of badge right now though. Sent a PR for the welcome view, lmk what you think.

@sandy081 sandy081 self-assigned this Aug 29, 2024
@sandy081 sandy081 removed the unreleased Patch has not yet been released in VS Code Insiders label Aug 29, 2024
@sandy081 sandy081 added extensions Issues concerning extensions unreleased Patch has not yet been released in VS Code Insiders and removed extensions Issues concerning extensions labels Aug 29, 2024
@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 Aug 29, 2024
@sandy081
Copy link
Member

Extracted extensions UX part here - #227047

@rzhao271 rzhao271 added the verification-needed Verification of issue is requested label Aug 29, 2024
@andreamah
Copy link
Contributor

Are there some simple repro steps for this?

@andreamah andreamah added the verification-steps-needed Steps to verify are needed for verification label Aug 29, 2024
@roblourens
Copy link
Member Author

  • Install the Insiders for 36e4ddb4dbdf5d41bbeedfce2db4834085de2b87 from last week
  • Install the Copilot Chat extension- you'll have to right click, "install specific version", pick the latest one in the list. There's a bug with the main "install" button that is fixed after that build
  • Quit Insiders, open the latest Insiders again
  • You should see the chat view with the welcome text and button
  • Click the button, update Copilot Chat
  • Now the chat view should load properly

@roblourens roblourens removed the verification-steps-needed Steps to verify are needed for verification label Aug 29, 2024
@rzhao271 rzhao271 added the verified Verification succeeded label Aug 29, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chat feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
4 participants