IDE Extension Explanations and Definitions
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
GitLab Workflow Extension Background
What is the GitLab Workflow Extension for VS Code?
The GitLab Workflow extension (repository, marketplace) is an add-on to the desktop version of VS Code that brings GitLab-specific features to the editor's user interface. It handles authenticating the user and uses the public API to enhance the experience and integrate with merge requests, issues, pipelines, and most recently, the Code Suggestions beta.
Who owns the GitLab Workflow VS Code Extension?
The IDE group owns the GitLab Workflow VS Code Extension. The GitLab Workflow VS Code Extension was moved to the IDE group approximately 6 months ago. Feature development was deprioritized in favor of accelerating our Remote Development capabilities. The Code Suggestions feature was added to the extension by the AI Assist group with support from the IDE group.
What is the GitLab Web IDE?
The GitLab Web IDE is running a fork of the open-source VS Code project entirely in the browser (WebIDE repo, fork repo). Running in the web-only context, VS Code has some limitations in place to ensure a secure sandbox environment and handle scenarios where a desktop runtime would be required. Most relevant here is that only a sub-set of extensions made for VS Code can run in this browser context.
What is the difference between a web extension and a desktop extension?
Microsoft has documentation about the difference, but to summarize:
- The two extensions are very similar in structure
- A single extension package can be used to deliver both types of extensions
- A web extension has a different entry point in the code but can share much of the same logic
- Web extensions are limited by the lack of a full Node.js runtime but workarounds exist for most use cases. Lack of Node.js is the main reason why some desktop extensions can't be used in the browser (e.g. file system access)
Does the current GitLab Workflow VS Code Extension support both desktop and Web IDEs?:
No, the GitLab Workflow extension is currently only supported on the desktop because we have not yet adapted it to work in the browser context.
What about developers who don't use VS Code?
We know that a significant number of developers use JetBrains IDEs or Visual Studio (not "code") and we do not have extensions that bring functionality to their editors.
How does this relate to the AI Code Suggestions?
The initial beta of the Code Suggestions feature was built into the desktop-only GitLab Workflow extension by the AI Assist group with support from the IDE group. Because the desktop extension didn't run in the Web IDE, in order to bring Code Suggestions to the Web IDE quickly, the AI Assist group shifted to delivering a separate web extension that can be pre-installed in the Web IDE.
Once we have a public extension marketplace, will we be able to install the desktop GitLab Workflow extension in the Web IDE?
No, since the extension itself hasn't been built as a web extension, it will not be able to be installed. We have to first enhance it with the browser entry point and adapt the functionality to work around the sandbox limitations.
Once we adapt the GitLab Workflow desktop extension to work in the web, do we have to wait for the public marketplace to be added to the Web IDE?
No, we can pre-install whatever first-party extensions we want in the Web IDE. If our extension is compatible with the web context.
Summary of the current environment
- The GitLab Workflow Extension only works in the desktop version of VS Code and does not work in the Web IDE, blocking multiple features (AI and others) from being available in the Web IDE.
- Code Suggestions capabilities are being delivered by two separate extensions, one built for the web-only context to support the Web IDE and one included in the desktop GitLab Workflow extension
- As new AI features are being built, it is not possible to target both the Web IDE and desktop VS Code with a single codebase.
- With each new AI Feature that is developed, we accumulate technical debt due to the need to migrate approximately 20 to 30% of their work across the two extension targets.
Proposed future state
Reduce time to market and improve developer efficiency by modifying the GitLab Workflow extension for VS Code to work in the Web IDE and creating native GitLab Workflow extensions for JetBrains and Visual Studio.
Get the GitLab Workflow extension running in the Web IDE
The most significant improvement to efficiency will come from having a single VS Code extension target that contains the core functionality and provides an entry point for other groups to contribute additional functionality.
Create native GitLab Workflow extensions for JetBrains and Visual Studio
In order to deliver AI and other features to a wider audience, we should create similar native GitLab Workflow extensions for JetBrains and Visual Studio. Other IDEs can be evaluated later but having a "wrapper" for each IDE would mean that other groups that want to contribute would have:
- Common methods for handling authentication using access tokens
- A framework for calling GitLab REST and GraphQL APIs
- A framework for writing unit and integration tests
- Custom methods for interacting with the git repository
We would provide documentation on the steps required to utilize the GitLab Workflow extensions. The specific features will be owned by the individual teams themselves. The IDE team will continue to own the GitLab Workflow VS Code extension.
With this solution, new features will only have to be written once to target both desktop VS Code and the GitLab Web IDE and the effort to make the features available on JetBrains and Visual Studio would be greatly reduced.