Skip to content

Webview Architecture

The VS Code extension doesn’t reimplement the portal — it hosts the same React frontend used by the browser app inside a VS Code webview, registered as a custom editor for .dsl and .nbc4 files.

  • The frontend (frontend/) is built once and its output copied into extension/media/.
  • The extension serves those built assets into the webview at runtime; it does not run a dev server inside VS Code.
  • If extension/media/ is missing or stale relative to the frontend source, the webview opens blank — see VS Code Webview Issues for how to rebuild it.

The extension registers archtect.editor as a custom editor for both *.nbc4 (default priority) and *.dsl (option priority) files, with retainContextWhenHidden enabled so the canvas state survives switching tabs.