orca icon indicating copy to clipboard operation
orca copied to clipboard

[Feature]: Embedded VSCode editor

Open viniciusmeneses opened this issue 4 months ago • 9 comments

Problem or use case

Orca's built-in Monaco editor is great for quick edits, but when I'm actually working in a repo I keep reaching for VS Code. Monaco on its own doesn't give me the things I rely on: autocomplete, linters and full LSP - I use Go to Reference constantly for example.

So my workflow ends up being switching between Orca and VS Code, and that gets messy fast. One VS Code window per worktree is a pile of windows I have to keep straight. Even if I only open it once, every time I want to edit or find a specific file I'm switching apps and re-orienting, instead of it being right there next to the worktree I'm already looking at.

Summary: the built-in editor isn't powerful enough for real editing (no autocomplete/LSP/linters/formatting), so I fall back to external VS Code - and juggling a window per worktree outside Orca defeats the point of having everything in one app.

Proposed solution

Embed VS Code into Orca as a tab (similar to how the browser tab works) that opens the current worktree in a full VS Code workbench. Full LSP, extensions and formatting scoped to the worktree you're already in.

I've built a working PoC on a branch: feat/embedded-vscode-code-server.

This is built on code-server - an open-source project from Coder that runs VS Code on a server and serves the full editor over HTTP in a browser. It's the actual VS Code workbench, just rendered as a web app instead of a desktop window, which I think makes it a natural fit for embedding inside Orca.

How it works in my PoC:

  • A new vscode tab type that reuses the same <webview> machinery as the embedded browser (no browser chrome — no address bar or nav).
  • A main-process module manages code-server: it downloads it on first use (via code-server's own install.sh), runs one shared server bound to 127.0.0.1, and points the webview at ?folder=<worktree path>.
  • Behaves like any other tab — split, reorder, MRU, persistence all work.
  • Keyboard just works: because it's a webview guest, Cmd+D, Cmd+K chords, etc. all go to VS Code instead of Orca's shortcuts.
  • Reuses your real VS Code settings (theme, fonts, keybindings, snippets) via symlinks, so it looks like your normal editor. Extensions are code-server-managed via Open VSX and persist across restarts.
  • One tab per worktree, so you don't get two sessions fighting over the same folder.
Image

I'd love to discuss whether this is something we want in Orca.

Alternatives or additional context

Scope of the PoC (things I deliberately left out of a first version):

  • Windows: code-server ships no Windows builds, so the option is hidden there. macOS + Linux only.
  • Remote / SSH worktrees: local worktrees only for now. The main-process module sits behind an interface so a remote (port-forward) provider can be added later without a rewrite.

Security note: the server runs with --auth none bound to loopback, and code-server validates the Host header so web pages can't reach the port. On a shared multi-user machine another logged-in user could reach it - fine for a single-user dev machine, documented as a limitation.

viniciusmeneses avatar Jul 07 '26 23:07 viniciusmeneses

Research pass on the embedded VS Code request.

Summary

There is a real cluster of demand behind this, not just this one issue. Users keep asking for the same underlying thing: they want to stay in Orca while doing the review/edit loop, but the current Monaco editor does not give them enough IDE semantics for serious repo work.

My read: embedding a full VS Code workbench via code-server is a plausible product direction and fits Orca's tab/worktree model better than trying to rebuild all of VS Code inside our Monaco editor. I would treat it as an architecture spike behind a feature flag, not as a replacement for Monaco. Monaco should stay for quick previews, diffs, and lightweight edits.

Related Orca demand signal

Most relevant existing issues:

  • #3035: asks for LSP/codebase search and explicitly says users need another editor because the current editor is mostly syntax coloring plus file tree.
  • #961: TypeScript Go to References returns empty. Comments call out the same workaround as this issue: opening the same worktree in Cursor/VS Code to inspect agent changes.
  • #5247: cross-file Go to Definition with Cmd/Ctrl-click or F12, including local imports and typings.
  • #188: earlier language-server request, closed in April as low demand at the time. The later issue volume suggests this should be re-evaluated.
  • #7720: inline AI code completion in the built-in editor, similar to Copilot/Cursor.
  • #6075 and #6076: third-party UI integration, webview panels, and VS Code extension compatibility. These are architecturally adjacent because code-server is effectively a ready-made embedded tool UI plus extension host.
  • #7649, #5983, #5991: friction around external editor workflows, including WSL/external-app launch issues. These do not require embedded VS Code by themselves, but they show that “open externally” is not a clean enough long-term answer.
  • #7418: Monaco/editor reliability issue where a file can look writable but not accept input.
  • #5269: editor-tab workflow pressure from users accumulating many review/edit tabs.

Internal context checked

I searched Slack for prior discussion around VS Code-style editor, code-server, Monaco, LSP, autocomplete, linters, and formatting.

Findings:

  • I did not find a prior internal decision to embed code-server, ship a full VS Code tab, or replace Monaco wholesale.
  • Prior discussion already identified the core LSP gap: Orca does not currently run a language server, while VS Code/Cursor do.
  • Separate editor discussions show a tension we should preserve: VS Code parity is useful, but we should avoid growing a heavy VS Code-like UI surface unless it clearly pays for itself.
  • There was recent discussion of Monaco footprint/reliability tradeoffs versus leaner editors like CodeMirror. That points away from making Monaco heavier and toward either keeping it lightweight or delegating full IDE behavior to a real IDE workbench.
  • Plugin / VS Code-like extension support has also come up recently as “top of mind”, which makes this issue part of a broader integration story rather than an isolated editor feature.

VS Code / code-server implementation notes

I inspected the local ../../vscode checkout for the relevant web/server architecture.

Relevant details:

  • VS Code Web workbench startup is already parameterized around a workspace provider. The browser shell supports ?folder=<uri-or-path> and ?workspace=<uri-or-path> and maps remote paths to vscode-remote://<remoteAuthority>/<path> when a remote authority exists.
  • The server side exposes flags that matter for this request: --host, --port, --socket-path, --server-base-path, --connection-token, --connection-token-file, --without-connection-token, --server-data-dir, --extensions-dir, --default-folder, and --default-workspace.
  • The web client server injects workbench configuration into workbench.html, including remote authority, default folder/workspace, product config, callback route, web extension resource route, and CSP.
  • Server data layout is already separable: user data under <server-data-dir>/data, settings under <server-data-dir>/data/User, machine settings under <server-data-dir>/data/Machine, global storage/history under the user data tree, and extensions under <server-data-dir>/extensions unless overridden.
  • Embedding is not obviously blocked at the top level by X-Frame-Options or frame-ancestors in the inspected server path, but extension webviews have their own CSP, sandboxing, service worker, and endpoint requirements. If we embed this in an Electron <webview>, webview endpoint/resource handling needs explicit testing.

Market scan

I used Grok for a market scan and spot-checked with public docs.

Pattern I see:

Product Editor strategy Relevance
Cursor Full VS Code fork, imports VS Code settings/extensions The market has validated “AI inside a real IDE workbench.”
Windsurf / Devin Desktop VS Code fork plus extensions/plugins for other IDEs Same lesson: serious agentic editing lives beside full IDE capabilities.
GitHub Codespaces VS Code in browser plus desktop VS Code connection Browser workbench is normal for remote/cloud dev.
Coder / code-server VS Code in the browser Closest technical prior art for this proposal.
OpenHands Agent UI with embedded/optional VS Code Web in some setups Agent products often add a real editor surface for inspection/editing.
Replit Full browser IDE plus agent Self-contained agent workflows usually include a first-class editor.
GitButler Git/workflow app, relies on external editors Shows the alternative: stay workflow-focused and integrate external IDEs, but that leaves context switching.
Sourcegraph Cody / Continue / Claude Code / Aider Mostly augment host editors or terminal workflows They rely on the user's editor for LSP/extensions rather than replacing it.
Zed / JetBrains Full native IDE/editor ecosystems Users expect deep navigation, diagnostics, formatting, and extension/plugin surfaces from primary coding tools.
Warp Terminal-first with some editor capability Hybrid tools can add editing, but not necessarily a full VS Code extension ecosystem.

Public docs/examples:

  • code-server: https://github.com/coder/code-server
  • VS Code for the Web: https://code.visualstudio.com/docs/remote/vscode-web
  • GitHub Codespaces browser editor: https://docs.github.com/en/codespaces/developing-in-a-codespace/developing-in-a-codespace
  • Cursor VS Code migration: https://cursor.com/docs/configuration/migrations/vscode
  • OpenHands embedded VS Code mention: https://docs.openhands.dev/openhands/usage/key-features

Recommendation

I think the strongest path is a feature-flagged embedded VS Code/code-server spike with narrow scope:

  1. Keep Monaco as the lightweight editor for previews, diffs, quick edits, and fast startup.
  2. Add a new vscode tab type for users who explicitly want the full workbench for the active worktree.
  3. Start with local macOS/Linux if code-server packaging forces that, but design the provider boundary around local vs SSH/runtime from day one.
  4. Use a per-Orca data directory for code-server user data/extensions unless we intentionally support importing/symlinking VS Code settings. Reusing real VS Code settings is attractive but should be opt-in and reversible.
  5. Do not use --auth none as the long-term security model. Even loopback-only needs a token or equivalent because local multi-user machines, embedded webviews, and browser-origin behavior are easy to get wrong.
  6. Treat keyboard routing, lifecycle cleanup, per-worktree server reuse, extension marketplace source, webview endpoints, resource limits, and remote port forwarding as the key spike risks.
  7. If the spike proves too heavy, the fallback should be “better external VS Code integration plus incremental LSP in Monaco,” not “build a whole VS Code-compatible extension ecosystem ourselves.”

Open product question: do we want Orca to become the place where users do serious code editing, or do we want it to stay the orchestration/review surface around external IDEs? The issue cluster suggests many users want the former at least some of the time. Embedding code-server is the most practical way to test that without committing to a VS Code fork or a long custom LSP/extensions program.

AmethystLiang avatar Jul 08 '26 05:07 AmethystLiang

Whats the status on this one? Would love it!

OctavioSerpe avatar Aug 26 '26 15:08 OctavioSerpe

This would be a beautiful thing!

mtford90 avatar Oct 16 '26 10:10 mtford90

Any plan of moving this? I'm dying to have this implemented and merged

KarmaBlackshaw avatar Oct 23 '26 17:10 KarmaBlackshaw

Exactly what I'm looking for 🙏

fabio-carvalho88 avatar Oct 28 '26 09:10 fabio-carvalho88

Adding a strong signal from the .NET / C# ecosystem.

The current "Open in external VS Code" workaround directly conflicts with Orca’s core value proposition: parallel agent worktrees. When running 3–4 parallel agents on different C# worktrees, having to manage 3–4 separate external VS Code desktop windows creates severe context-switching overhead and window sprawl.

Compiled enterprise stacks like C#/.NET cannot be reviewed with static syntax highlighting alone. Reviewing agent changes requires:

  1. Type-aware "Go to Definition" (F12) across .csproj project boundaries and NuGet packages.
  2. "Find All References" to verify that an agent's refactor did not break unreferenced implementations.
  3. Roslyn compiler diagnostics in the active file.

Having an embedded VS Code tab scoped to the active worktree (as proposed in the PoC) would make Orca a complete single-window environment for compiled languages, rather than requiring an external IDE juggle for every review.

Baylar55 avatar Nov 02 '26 14:11 Baylar55

I think this issue is the same with almost people. 👍

iletai avatar Nov 02 '26 15:11 iletai

@nwparker @AmethystLiang , Hi developers, Whats the status on this one? Would love it!

lindoo67 avatar Nov 05 '26 03:11 lindoo67

I'm waiting too for news about that!?

Nexulo avatar Nov 07 '26 20:11 Nexulo