Skip to content

About

Browser editor client for the Selvage session protocol (Monaco + shared TypeScript engine)

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

web_client

The browser client for the Selvage session protocol, over the engine and the bridge the editor clients share. A share link opens the page, a guest edits in Monaco and converges with the room, and a Chromium browser can also start a room here: pick a folder and the folder itself is what the room shares, with the host's working copy staying the source of truth. Joining is one click, in every browser; hosting from the page needs the File System Access API, so it is Chrome and Edge and not Firefox or Safari, and a page can only host where the server that serves it also answers /meta.

Get it working

You need Node 22.18 or newer, and a running selvaged server the page can reach.

npm ci        # install exactly what package-lock.json pins
npm run build # write dist/
npm run serve # serve dist/ at http://localhost:8081/

Open http://localhost:8081/, paste an invite link, type a name and join. With no link the card is the one that can start a room, where the page is served by a Selvage server and the browser has a folder picker.

npm run serve is python3 -m http.server 8081 --directory dist. That port is the development server's alone, chosen to avoid selvaged's default 8080; it is not the deployed page's port. The image listens on 8080 and compose.yaml publishes it on 80 — see Serving the page.

When you change a dependency, npm install --no-audit --no-fund writes the lockfile.

The checks a commit has to be green on run the same way: npm run typecheck reads the page's TypeScript, and npm run test:ci is the suite CI gates on — node --test over the test/*.test.ts files. The plain npm test hands node --test the directory instead, so run test:ci when what you want is what CI runs.

The public contract workflow compares this candidate's engine, bridge, CRDT pins, and release guard with their public canonical sources. It records the exact Git revisions. The checker code is pinned independently of the canonical specification and VS Code data, which follow public main and are resolved once per run. Its scheduled/manual integration job builds a fresh public server, requires the sibling site's mark comparison, and runs the live adapter and rendered-page proofs on loopback. These are automated tests, not evidence of human acceptance. Reproduce the live proofs with:

SELVAGE_SELVAGED=/absolute/path/to/selvaged SELVAGE_CHROMIUM=/absolute/path/to/chromium \
  scripts/ci-local.sh integration

Run npm ci and npm run build first. Evidence is written to .tmp/live-proofs/. Before a repeat run, confirm the prior run has ended and rename that directory to a new, unused archive name under .tmp/ (for example, live-proofs-20261101T120000Z). Retain the archive; do not delete or overwrite earlier evidence. The harness refuses an existing evidence directory rather than mixing runs. Missing tools, failed readiness, timeouts, and cleanup errors other than an already removed browser profile fail the job. Catchable termination ends the owned process groups, records the interruption with completed: false, and exits nonzero. Copy comparisons use the specification's public workspace checker, which also has an explicit-revision local invocation. Publish canonical updates before synchronized consumers, following its publication order; a workflow file alone does not establish that the replacement public jobs ran.

Settings and identity

There is no account: the name typed on the card is all the room knows a person by, and the page keeps it in the browser so the next card is prefilled. The file panel's width is remembered the same way. Nothing else is written down, and the mark a hosting tab leaves itself is gone with the tab: a room lives in memory and ends when its host leaves.

More

Licence

MIT OR Apache-2.0, in LICENSE-MIT and LICENSE-APACHE.

About

Browser editor client for the Selvage session protocol (Monaco + shared TypeScript engine)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages