The UI Component Layer for LandβποΈ.
Welcome to Skyβπ, the declarative UI component layer of the
LandβποΈ Code Editor. Built with the Astro framework, Sky renders
the user interface - editor, side bar, activity bar, status bar, and panels. It
operates within the Tauri webview alongside Wind, consuming state and
services from the Wind service layer to display and manage the editor's visual
presentation.
Sky is engineered to:
- Render UI Components: Provide a comprehensive set of
Astro-based components that compose theLandeditor interface. - Support Multiple Workbench Variants: Offer distinct workbench approaches (Browser, Mountain, Electron) for different deployment scenarios.
- Integrate with
WindServices: ConsumeWind'sEffect-TS-powered services for state management and backend communication. - Enable Page Routing: Manage application navigation and page transitions
within the
Tauriwebview.
Astro-Based Component Architecture: LeveragesAstro's component islands architecture for efficient, content-driven UI development with zeroJavaScriptby default and selective hydration for interactive components.VS CodeUI Compatibility: Provides multiple workbench approaches that load and integrateVS Code's core UI components from@codeeditorland/output, ensuring high-fidelity editor experience.WindService Layer Integration: Seamlessly consumesWind'sEffect-TSservices for file operations, dialogs, configuration, and state management, enabling a clean separation between UI and business logic.TauriWebview Integration: Runs within theTauriwebview, communicating with theMountainbackend throughTauri's IPC mechanism and event system for native OS capabilities.- Flexible Workbench Variants: Supports multiple workbench approaches
through environment-based selection:
- A1 (Browser/BrowserProxy): Browser-based workbench with optional service proxy.
- A2 (Mountain - RECOMMENDED): Browser workbench with Mountain-backed providers.
- A3 (Electron): Electron workbench with polyfills for
VS Code.
- Component Modularity: Organized into Pages (routes), Workbenches
(components), and Workbench Implementations (
BrowserProxy/,Electron/subdirectories) for clear separation of concerns and maintainability.
| Principle | Description | Key Components |
|---|---|---|
| Compatibility | High-fidelity VS Code UI rendering to maximize compatibility with extensions and workflows. |
Workbench/*, Workbench/BrowserProxy/*, Workbench/Electron/*, @codeeditorland/output |
| Modularity | Pages, workbenches, and layouts organized into distinct, cohesive modules. | pages/*, Workbench/*, Workbench/BrowserProxy/*, Workbench/Electron/*, Function/* |
| Performance | Astro's static generation and selective hydration minimize JavaScript payload. |
Astro build system, Component Islands |
| Integration | Seamless connection with Wind services and Mountain backend through Tauri events and IPC. |
Install, Bootstrap, Tauri event listeners |
| Maintainability | UI state driven by Wind services for predictable data flow; clear boundary between rendering and logic. |
Service consumption pattern, Event-driven updates |
| Component | Role & Key Responsibilities |
|---|---|
Astro Components |
Declarative UI building blocks composing the editor interface, from activity bar to status bar. |
Tauri Webview |
Runtime environment where Sky executes, providing access to Tauri APIs and OS integration. |
Wind Integration |
Consumes Wind's Effect-TS services for file operations, dialogs, configuration, and state management. |
| Workbench Variants | Three approaches (A1βA3) for loading VS Code's core editor components: Browser, Mountain (recommended), and Electron. |
| Page Routing | Manages navigation between index (default), Browser, BrowserProxy, Electron, Mountain, and Isolation pages. |
| Event Handling | Listens for Tauri events from Mountain to update UI state (terminal output, SCM updates, configuration changes). |
- Page Load: User navigates to
/, which loadsindex.astro. - Workbench Selection: The page reads environment variables to determine
which workbench to load:
Mountain=trueβ Loads the recommended A2:Mountainworkbench.Electron=trueβ Loads A3:Electronworkbench.BrowserProxy=trueβ Loads A1: Browser Proxy workbench.Browser=trueβ Loads A1: Browser workbench.- Default β Loads
Workbench/Default.astro.
WindBootstrap: The workbench imports and executes@codeeditorland/windbootstrap, which installs thePreload.tsenvironment shim and initializesEffect-TSruntime and service layers.- Service Consumption:
Skycomponents subscribe toWindservices:StatusBarServiceβ Updates status bar items.ActivityBarServiceβ Manages activity bar state.FileSystemServiceβ Provides file tree data to the sidebar.
- Event Listening:
Skylistens forTaurievents fromMountain:sky://terminal/dataβ Rendersxterm.jsterminal output in panel.sky://scm/update-groupβ Updates source control view.sky://configuration/changedβ Re-renders affected UI components.
- User Interaction: When user clicks βOpen Fileβ:
Skycomponent callsWind'sDialogService.showOpenDialog().WindinvokesTauri's native dialog via@tauri-apps/plugin-dialog.- Selected file URI is returned through
WindtoSky. Skyupdates the editor component to display the opened file.
graph LR
classDef sky fill:#9cf,stroke:#2471a3,stroke-width:2px,color:#001040;
classDef wind fill:#ffe,stroke:#d4ac0d,stroke-width:2px,color:#3d3000;
classDef tauri fill:#fde,stroke:#c0392b,stroke-width:2px,color:#4a0010;
classDef mountain fill:#f0d0ff,stroke:#9b59b6,stroke-width:2px,color:#2c0050;
classDef external fill:#ebebeb,stroke:#888,stroke-dasharray:5 5,color:#333;
subgraph "π Sky - UI Component Layer (Tauri Webview)"
Pages["Pages - index, Browser, Electron, Mountain, Isolation"]:::sky
Workbenches["Workbench Components - Browser, Mountain, Default, NLS"]:::sky
WorkbenchImpl["Workbench Implementations - BrowserProxy/, Electron/"]:::sky
end
subgraph "π Wind - Service Layer (Tauri Webview)"
PreloadJS["Preload.js - Environment Shim"]:::wind
WindServices["Wind Effect-TS Services"]:::wind
TauriIntegrations["Wind/Tauri Integrations"]:::wind
end
subgraph "π± Tauri Shell & Mountain - Rust Backend"
TauriWindow["Tauri Window API"]:::tauri
TauriEvents["Tauri Event System"]:::tauri
MountainCore["β°οΈ Mountain - Rust Core"]:::mountain
end
subgraph "π¦ External"
VSCodeComponents["VS Code Core UI - @codeeditorland/output"]:::external
end
Pages --> Workbenches
Pages --> WorkbenchImpl
Workbenches --> PreloadJS
WorkbenchImpl --> PreloadJS
Workbenches -- consumes services --> WindServices
WorkbenchImpl -- consumes services --> WindServices
WindServices --> TauriIntegrations
TauriIntegrations --> TauriWindow
TauriIntegrations -- listens --> TauriEvents
TauriWindow -- IPC --> MountainCore
TauriEvents -- emits from --> MountainCore
Workbenches -- loads --> VSCodeComponents
WorkbenchImpl -- loads --> VSCodeComponents
Sky/
βββ Source/
β βββ pages/
β β βββ index.astro # Home page (default workbench entry)
β β βββ Browser.astro # A1: Browser workbench page
β β βββ BrowserProxy.astro # A1: Browser + services proxy page
β β βββ Electron.astro # A3: Electron + polyfills page
β β βββ Isolation.astro # Isolated mode page
β β βββ Mountain.astro # A2: Mountain providers page (RECOMMENDED)
β βββ Workbench/
β β βββ Default.astro # Deprecated entry point
β β βββ Browser.astro
β β βββ BrowserTest.astro
β β βββ Mountain.astro # A2 (RECOMMENDED)
β β βββ NLS.astro
β β βββ BrowserProxy/ # A1 implementation
β β βββ Electron/ # A3 implementation
β βββ Function/ # Utility functions and base components
β βββ env.d.ts
βββ Public/ # Static assets
βββ Target/ # Build output
βββ .env.example
βββ astro.config.ts
βββ package.json
βββ tsconfig.json
pnpm add @codeeditorland/skyKey Dependencies:
| Package | Purpose |
|---|---|
astro |
UI framework (current stable) |
@codeeditorland/wind |
Service layer |
@codeeditorland/common |
Rust core bindings |
@codeeditorland/output |
VS Code output bundle |
@codeeditorland/worker |
Web worker implementations |
Select the workbench at runtime via environment variables:
# A2: Mountain workbench (RECOMMENDED)
Mountain=true pnpm run Run
# A3: Electron workbench
Electron=true pnpm run Run
# A1: Browser Proxy workbench
BrowserProxy=true pnpm run RunOr import workbench components directly:
---
import MountainWorkbench from "../Workbench/Mountain.astro";
---
<html>
<body>
<MountainWorkbench />
</body>
</html>This project is released into the public domain under the Creative Commons CC0
Universal license. You are free to use, modify, distribute, and build upon
this work for any purpose, without any restrictions. For the full legal text,
see the LICENSE
file.
See CHANGELOG.md for a history of changes specific to
Skyβπ.
Skyβπ is a core element of the LandβποΈ ecosystem. This project is funded through NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.
The project is operated by PlayForm, based in Sofia, Bulgaria.
PlayForm acts as the open-source steward for Code Editor Land under the NGI0 Commons Fund grant.
| Land | PlayForm | NLnet | NGI0 Commons Fund |
|---|---|---|---|
|
|
|
|
|
Project Maintainers: Source Open (Source/Open@Editor.Land) | GitHub Repository | Report an Issue | Security Policy