@@ -12,7 +12,7 @@ Primary consumer today: [`vscode-containerlab`](https://github.com/srl-labs/vsco
1212
1313- React UI and topology editing logic used by containerlab webviews
1414- Shared parsing/core utilities used by the extension host
15- - A local browser dev harness (` npm run dev ` ) for fast UI iteration
15+ - A standalone-backed local development flow (` npm run dev ` ) that exercises the real browser/runtime integration
1616- Build tooling that produces webview-ready assets in ` dist/ `
1717
1818---
@@ -32,12 +32,8 @@ Primary consumer today: [`vscode-containerlab`](https://github.com/srl-labs/vsco
3232
3333| Component | Package | Status | Notes |
3434| --- | --- | --- | --- |
35- | Main UI package | ` @srl-labs/clab-ui ` | Published | Published to GitHub Packages |
36- | Host contract | ` @srl-labs/clab-host-contract ` | Workspace-only | ` private: true ` |
37- | API adapter | ` @srl-labs/clab-adapter-api ` | Workspace-only | ` private: true ` |
38- | VS Code adapter | ` @srl-labs/clab-adapter-vscode ` | Workspace-only | ` private: true ` |
39- | Memory adapter | ` @srl-labs/clab-adapter-memory ` | Workspace-only | Used by local dev harness |
40- | Standalone app | N/A | Planned | Dev harness exists; production standalone distribution is not complete yet |
35+ | Main UI package | ` @srl-labs/clab-ui ` | Published | Owns the shared browser-side host contract and constructors |
36+ | Standalone app | ` @srl-labs/clab-standalone ` | Workspace app | Local dev/runtime host backed by the API proxy server |
4137
4238---
4339
@@ -63,28 +59,27 @@ npx playwright install chromium
6359
6460## Getting Started
6561
66- Start the dev harness :
62+ Start the standalone-backed dev flow :
6763
6864``` bash
6965npm run dev
7066```
7167
7268Then open ` http://localhost:5173 ` .
7369
74- Dev harness runtime model:
70+ Local dev runtime model:
7571
76- - Pure frontend runtime (no Node middleware backend in this repo)
77- - In-memory topology host using shared ` TopologyHostCore `
78- - File/session persistence in browser ` localStorage `
79- - Reset action restores seeded topologies from ` dev/topologies-original/ `
72+ - Browser frontend served by the standalone Vite app
73+ - Fastify backend proxy for auth, topology snapshot/command, files, and lifecycle actions
74+ - Shared ` ClabUiHost ` runtime used by both standalone and VS Code webviews
8075
8176---
8277
8378## Common Commands
8479
8580| Command | Description |
8681| --- | --- |
87- | ` npm run dev ` | Run Vite dev harness from ` dev/ ` |
82+ | ` npm run dev ` | Run the standalone-backed local development flow |
8883| ` npm run build ` | Build production webview assets into ` dist/ ` |
8984| ` npm run build:watch ` | Build in dev mode (inline sourcemaps, no minify) |
9085| ` npm run build:dev ` | Build in dev mode (same output profile as ` build:watch ` ) |
@@ -143,8 +138,8 @@ Frequently used exports:
143138
144139Notes:
145140
146- - The workspace also ships host adapter packages, but they are not published externally yet .
147- - Current UI host context APIs are imported from service subpaths (for example ` @srl-labs/clab-ui/services/topologyHostClient ` ).
141+ - Browser runtime integration is exposed from ` @srl-labs/clab-ui/host ` .
142+ - Current UI host context APIs are still imported from service subpaths (for example ` @srl-labs/clab-ui/services/topologyHostClient ` ).
148143
149144---
150145
@@ -153,28 +148,18 @@ Notes:
153148The UI currently uses host messaging via ` services/topologyHostClient ` :
154149
155150``` ts
156- import { App } from " @srl-labs/clab-ui" ;
157- import { setHostContext } from " @srl-labs/clab-ui/services/topologyHostClient" ;
158- import { refreshTopologySnapshot } from " @srl-labs/clab-ui/services/topologyHostCommands" ;
151+ import { createWindowClabUiHost , setClabUiHost } from " @srl-labs/clab-ui/host" ;
159152
160- setHostContext ({
161- path: " labs/my-lab.clab.yml" ,
162- mode: " edit" ,
163- deploymentState: " undeployed"
164- });
165-
166- await refreshTopologySnapshot ();
153+ setClabUiHost (createWindowClabUiHost ());
167154```
168155
169- The adapter packages in ` packages/adapter-* ` are part of the transport direction but are currently workspace-only.
170-
171156---
172157
173158## Troubleshooting
174159
175160- ` npm install ` fails with engine mismatch: ensure Node ` >= 24 ` (` node -v ` ).
176161- Playwright tests fail before opening a browser: run ` npx playwright install chromium ` .
177- - Dev harness state feels stale: clear browser localStorage keys ` containerlab-gui. dev.in-memory-labs.v1 ` and ` containerlab-gui.dev.session.v1 ` .
162+ - Local dev flow cannot reach the backend: ensure the standalone dev server on ` http://localhost:3000 ` is starting successfully .
178163
179164---
180165
@@ -193,8 +178,8 @@ Detailed steps: [`PUBLISHING.md`](PUBLISHING.md)
193178
194179---
195180
196- ## Standalone Roadmap Note
181+ ## Standalone Runtime
197182
198- The standalone browser experience exists today as a dev harness ( ` npm run dev ` ) and is useful for UI iteration and testing .
183+ The standalone browser experience is the supported local development runtime for ` containerlab-gui ` .
199184
200- A fully supported standalone distribution is planned but not complete yet. Until that lands, the production integration target remains ` vscode-containerlab ` .
185+ It uses the same browser-side host contract as VS Code, with only platform-specific differences in backend transport and shell behavior .
0 commit comments