Skip to content

Vm - #332021

Closed
Frankenstein-dev197 wants to merge 16 commits into
microsoft:mainfrom
Frankenstein-dev197:main
Closed

Vm#332021
Frankenstein-dev197 wants to merge 16 commits into
microsoft:mainfrom
Frankenstein-dev197:main

Conversation

@Frankenstein-dev197

Copy link
Copy Markdown

No description provided.

Phase 1: stabilize and verify the real VS Code / Code-OSS base.

- CODE-OSS-UPSTREAM.md: record provenance of Frankenstein-dev197/vscode
  against upstream microsoft/vscode. Fork main HEAD
  c780ea9 is a verbatim microsoft/vscode
  commit (verified via GitHub API), version 1.133.0, import 2026-08-08.
  No fork-specific modifications on main.
- docs/CODE-OSS-ARCHITECTURE.md: document the real architecture
  (base/editor/platform/workbench/server/code/extensions/build) and the
  contribution model GitCortex features must use.

Validated real base:
- Node 24.18.0 (.nvmrc) installed from nodejs.org (sha256 verified)
- System native deps installed (libkrb5-dev, pkg-config, libx11-dev,
  libxkbfile-dev, libsecret-1-dev, libssl-dev, libdbus-1-dev, libglib2.0-dev)
- npm ci succeeded (936 packages, native addons built)
- gulp compile succeeded: compilation with 0 errors
- npm run test-node: 13680 passing, 0 failing, 192 pending

No source modifications yet; docs only.

Co-authored-by: openhands <openhands@all-hands.dev>
Phase 2: surgical product-identity rebrand from Code - OSS to GitCortex Studio.

product.json (user-visible identity only):
- nameShort/nameLong -> GitCortex / GitCortex Studio
- applicationName -> gitcortex (CLI command)
- dataFolderName -> GitCortexStudio (per spec)
- urlProtocol -> gitcortex (gitcortex://)
- darwinBundleIdentifier -> studio.gitcortex (app id)
- linuxIconName -> gitcortex
- server/tunnel application names + win32 mutex/dir/reg/shell names -> gitcortex

src/vs/platform/product/common/product.ts: web/dev fallback defaults
updated consistently.

Preserved (no global sed): installer GUIDs, darwin profile UUIDs, license
attribution (MIT -> upstream), reportIssueUrl, builtInExtensions,
defaultChatAgent, onboarding keymaps/themes, and all technical VS Code
identifiers needed for the extension API and internal services. See
docs/BRANDING.md for the full mapping and rationale.

Validated: product.json valid JSON; gulp compile 0 errors; full node unit
suite 13680 passing, 0 failing.

Co-authored-by: openhands <openhands@all-hands.dev>
GitCortex Studio — Phase 1 (stabilize base) & Phase 2 (branding)
Document the real Phase 3 desktop build & runtime validation:

- Runtime: launched real GitCortex Studio (Electron 42.8.1, branding applied)
  under Xvfb; window reported ready (id: 1); initialized terminal, debug,
  search, files, explorer, scm, testing, activityBar, sidebar, ExtensionHost.
  No startup crash.
- Packaging: gulp vscode-linux-x64 completed (5.15 min, EXIT 0); real
  artifact at /workspace/VSCode-linux-x64 (gitcortex binary 215MB, bundled
  out/, extensions/, node_modules.asar, branded product.json v1.135.0).
- Problems found & fixed:
  * P1: npm ci didn't install @vscode/observables (upstream root-lockfile
    desync) -> ran npm ci in markdown ext + build-markdown-editor; tsgo then
    passed and full packaging completed.
  * P3: @github/copilot-sdk 1.0.9 installed vs 1.0.11 in lockfile (upstream
    dep desync) surfaced 4 tsgo errors in untouched upstream files
    (copilotSessionLauncher/assignmentService). Re-ran postinstall with
    VSCODE_FORCE_INSTALL=1 to sync to 1.0.11 -> 0 errors. No source modified.
- Final state: gulp compile 0 errors (incl. tsgo compile-src); test-node
  14815 passing, 0 failing, 192 pending.
- P4 (deferred to Phase 4): non-min packaged-bundle NLS bootstrap quirk;
  the real distributable is the min build (vscode-linux-x64-min).

No source files modified in this commit; only documentation.

Co-authored-by: openhands <openhands@all-hands.dev>
…op-build

Phase 3: Desktop Build & Runtime Validation
Production build verified: `gulp vscode-linux-x64-min` produces a functional
215MB gitcortex artifact. Boots cleanly under Xvfb with a clean env (the
NLS MISSING error is an environment artifact from VSCODE_DEV leaking from
the OpenVSCode-server host, not a code bug). Welcome window renders as
"Welcome - GitCortex Studio".

Visual identity & Linux packaging:
- Branded .desktop files (tagline "Code editing, reimagined.", keywords)
- Branded code.appdata.xml (homepage -> fork, GitCortex description,
  screenshot -> captured bootscreen), preserving MIT attribution to Code-OSS
- Generated a real 1024x1024 GitCortex desktop icon (resources/linux/code.png):
  neural-cortex + code-bracket motif on an indigo->teal gradient tile
- Branded deb/rpm/snap templates (maintainers, homepage, summary, description)
- Neutralized the debian postinst Microsoft apt-source/key registration for
  gitcortex so the .deb never adds packages.microsoft.com to users' systems
- product.json: reportIssueUrl/licenseUrl/serverLicenseUrl -> the fork repo
  (licenseName stays MIT; upstream attribution preserved in LICENSE.txt)
- version/commit/date remain build-injected; quality intentionally absent
  (fork ships no Microsoft auto-update channel)
- AGENTS.md: documented project identity, build, NLS gotcha, branding rules

Co-authored-by: openhands <openhands@all-hands.dev>
…ction

Phase 4: Production Desktop — Visual Identity & Linux Packaging Finalization
…workbench

- New 'Ordinateurs virtuels' activity bar view container directly below Extensions
- Two well-known machines: Ubuntu Developer and Ubuntu Sandbox with configurable CPU/RAM/disk
- Dedicated VM daemon utility process (decoupled from Electron main) managing QEMU lifecycle via QMP
- Dependency-free RFC 6455 WebSocket-to-VNC proxy with per-connection tokens, loopback only
- noVNC (MIT) vendored and displayed in workbench webview panels with real keyboard/mouse input
- Environment checks (qemu binary, KVM, permissions, memory) with clean refusal when unsupported
- Security: loopback-only VNC, restricted/isolated networking modes, no privileged sockets, validated config
- 27 unit tests for the manager, argument builder, acceleration resolution and lifecycle

Co-authored-by: openhands <openhands@all-hands.dev>
…virtuels

Ordinateurs virtuels : machines virtuelles QEMU/KVM intégrées nativement à GitCortex Studio
- Replace deprecated callback-based protocol.registerFileProtocol with the
  modern protocol.handle API: the legacy handler failed with net::ERR_FAILED
  under Electron 42 when many module script requests raced, which prevented
  the entire workbench ESM graph from loading in the desktop app
- Serve vscode-file:// resources via readFile + Response with an explicit
  content-type table while keeping the validRoots/validExtensions checks
- Persist user-configured virtualMachines.*.installIso settings into the
  daemon's InstallIsoPaths map so VM cards show their real install media
- Register the missing developer/sandbox memory, CPU, disk and install ISO
  configuration properties in the settings schema

Co-authored-by: openhands <openhands@all-hands.dev>
…ry-vm-settings

Fix workbench module loading and populate VM install ISO settings
Copilot AI balanced review requested due to automatic review settings August 21, 2026 19:25
@vs-code-engineering

vs-code-engineering Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Raymond Zhao (@rzhao271)

Matched files:

  • resources/linux/debian/control.template
  • resources/linux/debian/postinst.template
  • resources/linux/debian/postrm.template
  • resources/linux/debian/templates.template
  • resources/linux/rpm/code.spec.template

Robo (@deepak1556)

Matched files:

  • src/vs/code/electron-main/app.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds GitCortex virtual-machine management and remote desktop support, alongside product rebranding, packaging, protocol, build, and documentation changes.

Changes:

  • Adds QEMU VM lifecycle services, daemon IPC, VNC proxying, tests, and configuration.
  • Adds a VM sidebar and vendored noVNC desktop client.
  • Rebrands product/package metadata and updates resource protocol handling.

Reviewed changes

Copilot reviewed 79 out of 95 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
src/vs/workbench/workbench.desktop.main.ts Loads VM contributions.
src/vs/workbench/contrib/virtualMachines/electron-browser/virtualMachines.electron.contribution.ts Registers VM IPC service.
src/vs/workbench/contrib/virtualMachines/browser/virtualMachinesView.ts Implements VM cards and actions.
src/vs/workbench/contrib/virtualMachines/browser/virtualMachinesIcons.ts Registers VM icon.
src/vs/workbench/contrib/virtualMachines/browser/virtualMachines.contribution.ts Registers view, settings, and commands.
src/vs/workbench/contrib/virtualMachines/browser/virtualDesktopPanel.ts Opens noVNC desktop webviews.
src/vs/workbench/contrib/virtualMachines/browser/media/virtualMachines.css Styles the VM view.
src/vs/workbench/contrib/virtualMachines/browser/media/novnc/** Vendors the noVNC client and pako dependencies.
src/vs/platform/virtualMachines/common/virtualMachines.ts Defines VM contracts and configuration.
src/vs/platform/virtualMachines/node/virtualMachineManager.ts Manages VM lifecycle and storage.
src/vs/platform/virtualMachines/node/vncWebSocketProxy.ts Bridges WebSockets to VNC.
src/vs/platform/virtualMachines/node/virtualMachinesDaemonMain.ts Hosts VM management in a utility process.
src/vs/platform/virtualMachines/node/qemuQmpClient.ts Implements QMP power-down.
src/vs/platform/virtualMachines/node/qemuLauncher.ts Builds QEMU commands.
src/vs/platform/virtualMachines/electron-main/virtualMachinesMainService.ts Supervises and proxies the daemon.
src/vs/platform/virtualMachines/test/node/virtualMachines.test.ts Tests VM orchestration.
src/vs/platform/protocol/electron-main/protocolMainService.ts Migrates resource handling to protocol.handle.
src/vs/platform/product/common/product.ts Updates development branding.
src/vs/code/electron-main/app.ts Registers the VM main-process service.
resources/linux/snap/snapcraft.yaml Rebrands Snap metadata.
resources/linux/rpm/code.spec.template Rebrands RPM metadata.
resources/linux/debian/templates.template Rebrands Debian prompts.
resources/linux/debian/postinst.template Skips Microsoft repository setup.
resources/linux/debian/control.template Rebrands Debian metadata.
resources/linux/code.desktop Rebrands desktop entry.
resources/linux/code.appdata.xml Rebrands AppStream metadata.
resources/linux/code-url-handler.desktop Rebrands URL handler.
product.json Defines GitCortex product identity.
docs/CODE-OSS-ARCHITECTURE.md Documents upstream architecture.
docs/BRANDING.md Documents branding decisions.
CODE-OSS-UPSTREAM.md Records upstream provenance.
build/lib/i18n.resources.json Adds VM localization resources.
build/buildfile.ts Bundles the VM daemon entry point.
AGENTS.md Adds GitCortex agent guidance.
.eslint-ignore Excludes vendored noVNC sources.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +163 to +166
try {
const data = await readFile(path);

return callback({ error: -3 /* ABORTED */ });
return new Response(new Uint8Array(data), {
Comment on lines +79 to +80
private renderHtml(panel: WebviewInput, vm: IVirtualMachineInfo, webSocketUrl: string, token: string): string {
const rfbUri = asWebviewUri(FileAccess.asFileUri(`${NOVNC_ROOT}/core/rfb.js`));
Comment on lines +40 to +43
// Graphical output goes exclusively to the loopback VNC server.
'-display', 'none',
'-vga', 'virtio',
'-vnc', `127.0.0.1:${spec.vncDisplay}`,
Comment on lines +154 to +156
if (utilityProcess) {
// Killing the daemon disposes the manager, which stops all VMs.
utilityProcess.kill();
Comment on lines +388 to +392
private async allocateVncDisplay(): Promise<number> {
for (let display = 0; display < 16; display++) {
if (await this.host.isPortFree(VNC_BASE_PORT + display)) {
return display;
}
Comment thread docs/BRANDING.md Outdated
Comment on lines +60 to +63
- `win32x64AppId` / `win32arm64AppId` / `win32x64UserAppId` /
`win32arm64UserAppId` — installer GUIDs. **Not fabricated.** A genuine
rebrand would mint new GUIDs; this is deferred to the packaging phase to avoid
inventing fake identifiers. Leaving them keeps the installer identity stable.
Comment thread AGENTS.md Outdated
Comment on lines +15 to +17
## Build (Linux x64 production, minified)
- Node: `/home/openhands/node24/bin` (Node 24). Use it for `gulp`/`npm`.
- Minified production artifact: `gulp vscode-linux-x64-min` (~5.5 min) → `../VSCode-linux-x64/`.
Comment thread docs/BRANDING.md Outdated
Comment on lines +66 to +69
- `licenseName` / `licenseUrl` / `serverLicenseUrl` / `licenseFileName` — MIT
license attribution **must remain** pointing to upstream (see Licenses below).
- `reportIssueUrl` — points to upstream microsoft/vscode (will be repointed to the
GitCortex issue tracker once that exists; deferred).
Comment on lines +140 to +143
const port = utilityProcess.connect();
const client = new MessagePortClient(port, 'virtualMachines');
const daemon = ProxyChannel.toService<IVirtualMachinesDaemonService>(client.getChannel(VirtualMachinesServiceChannelName));
daemon.onDidChangeVirtualMachines(vms => this._onDidChangeVirtualMachines.fire(vms));
Comment on lines +98 to +102
<div id="screen"></div>
<script type="module">
import RFB from '${rfbUri.toString(true)}';
const status = document.getElementById('status');
const rfb = new RFB(document.getElementById('screen'), ${JSON.stringify(webSocketUrl)}, { wsProtocols: ['binary', ${JSON.stringify(token)}] });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement. Clean separation of concerns.

Frankenstein-dev197 and others added 3 commits August 23, 2026 00:56
Merge the audited GitCortex VM, VNC, protocol streaming, lifecycle, accessibility, packaging, and branding fixes into main.
@dmitrivMS

Copy link
Copy Markdown
Collaborator

This looks like noise to me - what issue/customer scenario is this solving?

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.

6 participants