Skip to content

Commit b42fcc5

Browse files
docs(Sky): Condense README with benefit-focused content
Rewrite the Sky README from verbose documentation into concise, scannable sections highlighting core architecture principles, what Sky does, ecosystem integration, and development setup. Remove redundant sections (Key Features, Deep Dive, Interaction Flow, System Diagram) while retaining essential information. Replace SimpleIcons CDN with self-hosted SVG badges at editor.land. The condensed format improves readability and aligns with the project-wide documentation direction targeting user outcomes over implementation details.
1 parent cc6ca07 commit b42fcc5

1 file changed

Lines changed: 25 additions & 246 deletions

File tree

README.md

Lines changed: 25 additions & 246 deletions
Original file line numberDiff line numberDiff line change
@@ -37,150 +37,34 @@ Land
3737
</tr>
3838
</table>
3939

40-
---
41-
42-
# **Sky** 🌌
43-
44-
The UI Component Layer for Land 🏞️
45-
46-
[![License: CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](https://github.com/CodeEditorLand/Land/tree/Current/LICENSE)
47-
[![NPM Version](https://img.shields.io/npm/v/@codeeditorland/sky.svg)](https://www.npmjs.com/package/@codeeditorland/sky)
48-
[<img src="https://cdn.simpleicons.org/astro/BC52EE" width="14" alt="Astro" />](https://astro.build/)&#x2001;[![Astro Version](https://img.shields.io/badge/Astro-5.17.3-blue.svg)](https://www.npmjs.com/package/astro)
49-
[<img src="https://cdn.simpleicons.org/effect" width="14" alt="Effect-TS" />](https://effect.website/)&#x2001;[![Effect Version](https://img.shields.io/badge/Effect-3.x-blueviolet.svg)](https://www.npmjs.com/package/effect)
50-
51-
Welcome to **Sky**, the declarative **UI component layer** of the **Land Code
52-
Editor**. Built with the **Astro** framework, **Sky** renders the user interface
53-
including the editor, side bar, activity bar, status bar, and panels. It
54-
operates within the **Tauri** webview alongside `Wind`, consuming state and
55-
services from the `Wind` service layer to display and manage the editor's visual
56-
presentation.
57-
58-
**What Sky gives you:**
59-
60-
1. **The editor you see.** Every panel, sidebar, tab bar, and status bar is an
61-
Astro component. Change a component, and Tauri hot-reloads it instantly.
62-
2. **Multiple workbench layouts.** Three approaches (A1-A3) for different
63-
deployment scenarios: full desktop, embedded, and minimal.
64-
3. **State from Wind.** Sky consumes Wind's Effect-TS services. UI state is
65-
always consistent, always typed, always reactive.
66-
4. **SPA routing in a webview.** Page transitions happen client-side inside
67-
Tauri's webview. No full-page reloads, no navigation flicker.
6840

6941
---
7042

71-
## Key Features 🔐
72-
73-
- **Astro-Based Component Architecture:** Leverages Astro's component islands
74-
architecture for efficient, content-driven UI development with zero JavaScript
75-
by default and selective hydration for interactive components.
76-
- **VSCode UI Compatibility:** Provides multiple workbench approaches that load
77-
and integrate VSCode's core UI components from `@codeeditorland/output`,
78-
ensuring a high-fidelity editor experience.
79-
- **Wind Service Layer Integration:** Seamlessly consumes `Wind`'s Effect-TS
80-
services for file operations, dialogs, configuration, and state management,
81-
enabling a clean separation between UI and business logic.
82-
- **Tauri Webview Integration:** Runs within the Tauri webview, communicating
83-
with the `Mountain` backend through Tauri's IPC mechanism and event system for
84-
native OS capabilities.
85-
- **Flexible Workbench Variants:** Supports multiple workbench approaches
86-
through environment-based selection:
87-
- **A1 (Browser/BrowserProxy):** Browser-based workbench with optional
88-
service proxy.
89-
- **A2 (Mountain - RECOMMENDED):** Browser workbench with Mountain-backed
90-
providers.
91-
- **A3 (Electron):** Electron workbench with polyfills for VSCode.
92-
- **Component Modularity:** Organized into Pages (routes), Workbenches
93-
(components), and Workbench Implementations (BrowserProxy/, Electron/
94-
subdirectories) for clear separation of concerns.
95-
- **Responsive Design:** Built with CSS and Astro's styling capabilities to
96-
ensure the editor interface adapts to different window sizes and user
97-
preferences.
98-
99-
---
43+
# **Sky**&#x2001;🌌
10044

101-
## Core Architecture Principles 🏗️
45+
> **VS Code's UI is tightly coupled to Electron's renderer process. Changing a panel requires understanding the full Chromium lifecycle. Hot-reload means restarting the entire renderer.**
10246
103-
| Principle | Description | Key Components Involved |
104-
| :------------------ | :------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------ |
105-
| **Compatibility** | Provide high-fidelity VSCode UI rendering to maximize compatibility with VSCode extensions and workflows. | `Workbench/*`, `Workbench/BrowserProxy/*`, `Workbench/Electron/*`, `@codeeditorland/output` |
106-
| **Modularity** | Components (pages, workbenches, layouts) are organized into distinct, cohesive modules for clarity and maintainability. | `pages/*`, `Workbench/*`, `Workbench/BrowserProxy/*`, `Workbench/Electron/*`, `Function/*` |
107-
| **Performance** | Leverage Astro's static generation and selective hydration to minimize JavaScript payload and maximize rendering performance. | Astro build system, Component Islands |
108-
| **Integration** | Seamlessly connect with `Wind` services and `Mountain` backend through Tauri events and IPC for state updates and user actions. | `Install`, `Bootstrap`, Tauri event listeners |
109-
| **Maintainability** | Clear separation between UI components and business logic, with UI state driven by `Wind` services for predictable data flow. | Service consumption pattern, Event-driven updates |
47+
_"Every panel is a component. Instant hot-reload."_
11048

111-
---
112-
113-
## Deep Dive & Component Breakdown 🔬
49+
[![License: CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](https://github.com/CodeEditorLand/Land/tree/Current/LICENSE)
50+
[![NPM Version](https://img.shields.io/npm/v/@codeeditorland/sky.svg)](https://www.npmjs.com/package/@codeeditorland/sky)
51+
[<img src="https://editor.land/Image/Astro.svg" width="14" alt="Astro" />](https://astro.build/)&#x2001;[![Astro Version](https://img.shields.io/badge/Astro-5.17.3-blue.svg)](https://www.npmjs.com/package/astro)
52+
[<img src="https://editor.land/Image/EffectTS.svg" width="14" alt="Effect-TS" />](https://effect.website/)&#x2001;[![Effect Version](https://img.shields.io/badge/Effect-3.x-blueviolet.svg)](https://www.npmjs.com/package/effect)
11453

115-
To understand how `Sky`'s internal components interact — including the Astro
116-
configuration, workbench approaches, and integration with `Wind` — please refer
117-
to the detailed technical breakdown in the `Documentation/` directory or the
118-
source code comments in [`astro.config.ts`](astro.config.ts) and workbench
119-
components. The source files explain the role of each workbench variant, page
120-
routing, and the build process for bundling Wind modules.
54+
Sky provides three workbench layouts (full desktop, embedded, minimal) built from Astro components. Tauri reloads Sky instantly on any component change. High-fidelity VS Code UI compatibility with a significantly smaller footprint. No Electron renderer magic. Web components rendered by the OS's own WebView.
12155

12256
---
12357

124-
## `Sky` in the Land Ecosystem 🌌 + 🏞️
125-
126-
| Component | Role & Key Responsibilities |
127-
| :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
128-
| **Astro Components** | The declarative UI building blocks that compose the editor interface, from activity bar to status bar. |
129-
| **Tauri Webview** | The runtime environment where `Sky` executes, providing access to Tauri APIs and OS integration. |
130-
| **Wind Integration** | Consumes `Wind`'s Effect-TS services for file operations, dialogs, configuration, and state management. |
131-
| **Workbench Variants** | Multiple approaches (A1-A3) for loading and integrating VSCode's core editor components: Browser, Mountain (recommended), and Electron. |
132-
| **Page Routing** | Manages navigation between index (default), Browser, BrowserProxy, Electron, Mountain, and Isolation pages. |
133-
| **Event Handling** | Listens for Tauri events from `Mountain` to update UI state (terminal output, SCM updates, etc.). |
134-
135-
---
58+
## What It Does&#x2001;🔐
13659

137-
## Interaction Flow: Rendering UI from Wind State 🔄
138-
139-
Here's a step-by-step example of how `Sky` renders the UI based on `Wind`'s
140-
state:
141-
142-
1. **Page Load:** User navigates to `/`, which loads `index.astro` (the default
143-
workbench entry point).
144-
2. **Workbench Selection:** The page reads environment variables to determine
145-
which workbench to load:
146-
- `Mountain=true` → Loads the recommended A2: Mountain workbench
147-
(`Workbench/Mountain.astro`)
148-
- `Electron=true` → Loads A3: Electron workbench
149-
(`Workbench/Electron/Layout.astro`)
150-
- `BrowserProxy=true` → Loads A1: Browser Proxy workbench
151-
(`Workbench/BrowserProxy/Layout.astro`)
152-
- `Browser=true` → Loads A1: Browser workbench (`Workbench/Browser.astro`)
153-
- Default → Loads `Workbench/Default.astro`
154-
155-
3. **Wind Bootstrap:** The workbench imports and executes `@codeeditorland/wind`
156-
bootstrap, which:
157-
- Installs the `Preload.ts` environment shim (providing `window.vscode`
158-
globals)
159-
- Initializes Effect-TS runtime and service layers
160-
- Establishes Tauri IPC connection to `Mountain`
161-
162-
4. **Service Consumption:** `Sky` components subscribe to `Wind` services:
163-
- `StatusBarService` → Updates status bar items
164-
- `ActivityBarService` → Manages activity bar state
165-
- `FileSystemService` → Provides file tree data to sidebar
166-
167-
5. **Event Listening:** `Sky` listens for Tauri events from `Mountain`:
168-
- `sky://terminal/data` → Renders terminal output in panel
169-
- `sky://scm/update-group` → Updates source control view
170-
- `sky://configuration/changed` → Re-renders affected UI components
171-
172-
6. **User Interaction:** When user clicks "Open File":
173-
- `Sky` component calls `Wind`'s `DialogService.showOpenDialog()`
174-
- `Wind` invokes Tauri's native dialog via `@tauri-apps/plugin-dialog`
175-
- Selected file URI is returned through `Wind` to `Sky`
176-
- `Sky` updates the editor component to display the opened file
60+
- **Three workbench layouts.** Full desktop, embedded, and minimal deployments from the same component set.
61+
- **Instant hot-reload.** Tauri reloads Sky immediately on any component change during development.
62+
- **VS Code UI compatibility.** Panels, sidebars, tab bars, and status bars match the VS Code UX.
63+
- **OS-native rendering.** Components rendered by WKWebView/WebView2/WebKitGTK, not bundled Chromium.
17764

17865
---
17966

180-
## System Architecture Diagram 🏗️
181-
182-
This diagram illustrates how `Sky` sits within the Tauri webview, consuming
183-
`Wind` services and rendering the UI.
67+
## In the Ecosystem&#x2001;🌌 + 🏞️
18468

18569
```mermaid
18670
graph LR
@@ -229,10 +113,7 @@ WorkbenchImpl -- Loads --> VSCodeComponents
229113

230114
---
231115

232-
## Project Structure Overview 🗺️
233-
234-
The `Sky` repository is organized to separate concerns between pages,
235-
workbenches, and components:
116+
## Project Structure&#x2001;🗺️
236117

237118
```
238119
Sky/
@@ -282,132 +163,30 @@ Sky/
282163

283164
---
284165

285-
## Getting Started 🚀
286-
287-
### Installation 📥
288-
289-
To add `Sky` to your project workspace:
290-
291-
```sh
292-
pnpm add @codeeditorland/sky
293-
```
294-
295-
**Key Dependencies:**
296-
297-
- `astro`: `5.17.3`
298-
- `@codeeditorland/wind`: `0.0.1` (service layer)
299-
- `@codeeditorland/common`: `0.0.6` (Rust core bindings)
300-
- `@codeeditorland/output`: `0.0.1` (VSCode output bundle)
301-
- `@codeeditorland/worker`: `0.0.1` (Web worker implementations)
302-
- `@playform/build`, `@playform/compress`, `@playform/inline`: Build utilities
303-
- `deepmerge-ts`, `dotenv`, `typescript`, `vite`, `zod`: Development utilities
304-
305-
**Note:** `@tauri-apps/api` is accessed transitively through the `Wind` service
306-
layer rather than as a direct dependency.
307-
308-
### Usage Pattern 🚀
309-
310-
`Sky` is primarily used through its page routes and workbench components:
311-
312-
1. **Configure Astro:** Set up your `astro.config.ts` to include `Sky`'s pages
313-
and resolve `Wind` modules:
314-
315-
```ts
316-
import { defineConfig } from "astro/config";
317-
318-
export default defineConfig({
319-
root: "./Source",
320-
outDir: "../Target",
321-
publicDir: "../Static",
322-
vite: {
323-
resolve: {
324-
alias: {
325-
"@codeeditorland/wind": "/path/to/wind/dist",
326-
},
327-
},
328-
},
329-
});
330-
```
331-
332-
2. **Build the Project:** Run the Astro build to generate static files:
333-
334-
```sh
335-
pnpm run build
336-
```
337-
338-
3. **Integrate with Tauri:** Configure your `tauri.config.json` to serve `Sky`'s
339-
built output:
340-
341-
```json
342-
{
343-
"tauri": {
344-
"windows": [
345-
{
346-
"url": "/app",
347-
"file://": "./Target"
348-
}
349-
]
350-
}
351-
}
352-
```
353-
354-
4. **Use Workbench Components:** Import and use workbench variants in your
355-
pages:
356-
357-
```astro
358-
---
359-
// Source/pages/index.astro (or create a custom page)
360-
import MountainWorkbench from "../Workbench/Mountain.astro";
361-
---
362-
363-
<html>
364-
<body>
365-
<MountainWorkbench />
366-
</body>
367-
</html>
368-
```
369-
370-
Alternatively, set environment variables to select the workbench at runtime:
371-
372-
```bash
373-
# Use Mountain workbench (A2 - RECOMMENDED)
374-
Mountain=true pnpm run Run
375-
376-
# Use Electron workbench (A3)
377-
Electron=true pnpm run Run
378-
379-
# Use Browser Proxy workbench (A1)
380-
BrowserProxy=true pnpm run Run
381-
```
382-
383-
---
384-
385-
## License ⚖️
166+
## Development&#x2001;🛠️
386167

387-
This project is released into the public domain under the **Creative Commons CC0
388-
Universal** license.
389-
390-
You are free to use, modify, distribute, and build upon this work for any
391-
purpose, without any restrictions. For the full legal text, see the
392-
[`LICENSE`](https://github.com/CodeEditorLand/Land/tree/Current/LICENSE) file.
168+
Sky is a component of the Land workspace. Follow the
169+
[Land Repository](https://github.com/CodeEditorLand/Land) instructions to
170+
build and run.
393171

394172
---
395173

396-
## Changelog 📜
174+
## License&#x2001;⚖️
397175

398-
Stay updated with our progress! See [`CHANGELOG.md`](../../CHANGELOG.md) for a
399-
history of changes specific to **Sky**.
176+
CC0 1.0 Universal. Public domain. No restrictions.
177+
[LICENSE](https://github.com/CodeEditorLand/Sky/tree/Current/LICENSE)
400178

401179
---
402180

403-
404181
## See Also
405182

183+
- [Sky Documentation](https://editor.land/Doc/sky)
406184
- [Architecture Overview](https://editor.land/Doc/architecture)
185+
- [Why Tauri](https://editor.land/Doc/why-tauri)
407186
- [Wind](https://github.com/CodeEditorLand/Wind)
408-
- [Cocoon](https://github.com/CodeEditorLand/Cocoon)
409187
- [Mountain](https://github.com/CodeEditorLand/Mountain)
410188

189+
411190
## Funding & Acknowledgements 🙏🏻
412191

413192
**Sky** is a core element of the **Land** ecosystem. This project is funded

0 commit comments

Comments
 (0)