Use the same GitLab project entity in WebIDE and Workflow

We are creating an abstraction of the GitLab instance that can be reused between the WebIDE and Desktop versions of the Workflow extension.

The idea is that there will be shared code that only depends on this interface:

interface GitLabPlatform {
  getProject(): Promise<GitLabProject>;
  makeApiRequest<T>(r: ApiRequest<T>): Promise<T>;
}

The problem is that the GitLabProject means something different in WebIDE and in the Workflow:

Solution

I can think of two options:

Option 1 - Web IDE only exposes config

This option will introduce a mediator command COMMAND_GET_CONFIG which will expose part of the ClientOnlyConfig https://gitlab.com/gitlab-org/gitlab-web-ide/blob/10fdbae418a99399cda36ea745f913246931cc9d/packages/web-ide-types/src/config.ts#L48-80

The browser.js entrypoint in the Workflow extension will then turn the config.projectPath into a full project object.

option1-expose-config_1_

  • Pros
    • When we need to change the shape of Project, we can do that completely without changing the WebIDE
  • Cons
    • If there are other clients (e.g. vscode-extension-web-ide package) they'll have to come up with a separate way to get a project from config

Option 2 - WebIDE exposes GitLabProject

This option will have a GitLabProject type as a part of the platform abstraction. The project retrieval will be implemented separately in WebIDE and Workflow.

option2-expose-project_1_


I'm keen on going with Option 1 with the possibility of eventually moving to Option 2 if the GitLabProject interface becomes very stable (after all of the Workflow has been migrated).

Edited by Tomas Vik (OOO back on 2026-01-05)