Skip to content

feat: start VSCodium for the VS Code tab when VS Code is not installed - #890

Open
vvarp wants to merge 2 commits into
penso:mainfrom
vvarp:feat/vscodium
Open

vvarp wants to merge 2 commits into
penso:mainfrom
vvarp:feat/vscodium

Conversation

@vvarp

@vvarp vvarp commented Oct 29, 2026 •

Copy link
Copy Markdown

Hi, sorry for unannounced PR, I hope that's okay

Since I am using VS Codium (fork of VS Code with anything microsoft-related removed), I figured it could be useful to make it more first-class citizen. I went with simple solution that doesn't add any new configuration options, but simply detects which one is (VS Codium or VS Code) installed, and picks what's available with VS Code being preferred when both are installed (likely a very rare situation).

All content below the line is from agent session (CC on Opus 5.5)

Thanks!


Summary

The VS Code tab can now be served by VSCodium when VS Code isn't installed. Until now the app only looked for VS Code's code command, so a Mac with only VSCodium had no server to start.

VSCodium works the same way. On an installed VSCodium 1.140 I checked that:

  • codium-tunnel serve-web takes the same arguments the app passes (--host, --port, --connection-token-file, --accept-server-license-terms).
  • It prints the same Web UI available at line the supervisor waits for before trusting the port.
  • /version answers with a 40-hex commit, so the existing probe accepts it.
  • product.json has an empty serverLicense, so there are no terms to accept.

Changes

  • code_server/cli: a table of editors that serve, in precedence order: VS Code, then VSCodium. Each entry has its PATH command, the serving program beside it, its macOS bundle path, and whether its server has license terms. The search checks each product in turn, PATH before its bundle. VS Code therefore wins whenever it's installed, and current users see no change. No new setting.
  • code_server/launcher: Cli::Found carries an Install (product plus program). consent_needed and wanted replace the three separate license_accepted checks in startup, plan, and sync. VSCodium skips the license step, and VS Code still waits for Accept and start.
  • Status text: Settings > Code and the tab's placeholder name the editor found ("VSCodium: …", "Starting VSCodium…", "VS Code or VSCodium was not found…"). The feature itself keeps the name VS Code: the tab, the … menu row, open_code, and Open VS Code.
  • Terminal links: vscodium: addresses are read from plain text and open without a confirmation, like vscode:.
  • Docs: the README's VS Code section and the [code] comment in config-gpui.example.toml.

Other forks

Other forks aren't detected on purpose. A fork works only if it ships serve-web and also hosts the server build that command downloads. Cursor, for example, ships cursor-tunnel serve-web, but users report it never finishes downloading. For Windsurf, Kiro, Positron, Trae, and Void I found nothing saying they support serve-web. Once someone has checked an install of a fork, adding it is one table entry.

Validation

Run on macOS arm64 at 026d7983:

  • just ci: passed
  • just lint-linux: passed (it caught an unused test-only re-export on Linux, fixed in 026d7983)
  • just lint-windows: passed (x86_64-pc-windows-gnu cross check)
  • cargo test -p herdr-gpui --locked -- code_server settings_window::controls::code links browser::view_tests::code: 223 passed

QA

  • just ci, just lint-linux, just lint-windows pass locally (macOS arm64)
  • New unit tests: VSCodium alone is found with codium-tunnel; VS Code wins wherever each is found; nothing installed finds nothing; VSCodium plans a start with no license; VS Code still asks for consent; sync keeps a VSCodium server running without license_accepted; Settings > Code shows no license card for VSCodium; vscodium: links are trusted and read from plain text
  • Native check on macOS with only VSCodium installed (just run):
    • Settings > Code shows "VSCodium: …/codium-tunnel" and no license block.
    • Opening VS Code in a group shows "Starting VSCodium…" and then loads VSCodium on the workspace folder.
    • codium-tunnel serve-web runs, and nothing is left running after the app quits.
  • With VS Code installed (alone, or beside VSCodium): Settings > Code shows "VS Code: …/code-tunnel" and the license block; Accept and start starts it, as before.
  • Windows with VSCodium installed and codium.cmd on PATH: it is found and the tab loads.
  • ⌘-click a vscodium://file/… link in a terminal: it opens in VSCodium without asking.

Screenshots

None captured: I had no way to grab the native window from the session that made this change. The visible change is text only in Settings > Code and in the VS Code tab's placeholder, and no layout changed.

vvarp added 2 commits October 29, 2026 10:19
The VS Code tab only looked for VS Code's `code` command, so a machine
with only VSCodium had no way to start a server. VSCodium ships the same
command line: `codium-tunnel serve-web` takes the same arguments and
prints the same ready line, and its server is MIT-licensed with nothing
to accept.

- code_server/cli: a table of editors that serve, in precedence order
  (VS Code, then VSCodium), each with its command, serving program,
  macOS bundle path, and whether its server has license terms. Adding
  a fork is one entry once an install of it is checked: it must ship
  `serve-web` and host the server build that command downloads.
- The launcher skips the license step for an editor without terms;
  VS Code still waits for Accept and start.
- Settings > Code and the tab's placeholder name the editor found
  ("VSCodium: …", "Starting VSCodium…"); the feature keeps the name
  VS Code.
- Terminal links read and open `vscodium:` addresses as `vscode:` ones.
The settings and VS Code tab tests that name an install run only on
macOS and Windows, so on Linux the re-export was unused and
`just lint-linux` failed with -D warnings.
@vvarp
vvarp requested a review from penso as a code owner October 29, 2026 10:24
@vvarp

vvarp commented Oct 29, 2026

Copy link
Copy Markdown
Author

just ci ran locally and passed on 026d798328aaf8b9b1c3e6ee4880a5269b527d18 (macOS arm64).

Also run on the same commit: just lint-linux and just lint-windows (x86_64-pc-windows-gnu), both passed.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Summary

Adds VSCodium as the server for the VS Code tab when VS Code is absent.

  • VS Code tabs can start with VSCodium when VS Code is absent.
  • Terminal links can open VSCodium addresses without confirmation.

No actionable issues were found. Tests were inspected, not run. Native UI capture was blocked because embedded pages are supported only on macOS and Windows, while this review ran on Linux.

Intentional choices: vvarp explicitly describes VS Code precedence, no support for unchecked forks, no consent step for VSCodium, and opening vscodium: links without confirmation. No separate unsafe operation was established.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Find an editor] --> B{VS Code found?}
  B -->|Yes| C{License accepted?}
  C -->|No| D[Show consent]
  C -->|Yes| E[Start when a tab needs it]
  B -->|No| F{VSCodium found?}
  F -->|Yes| E
  F -->|No| G[Use a configured server address]
Loading

Reviews (1) · Last reviewed commit: "test: re-export Install only for the tes..." · Reviewed by Greptile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant