Contributing to Open Pair

April 27, 2026 ยท View on GitHub

Setup

git clone https://github.com/darkerthanblack2000/open-pair
cd open-pair
npm install

Press F5 in VS Code to launch the Extension Development Host.

Development workflow

npm run watch      # rebuild on save
npm run typecheck  # type-check without building
npm run lint       # ESLint
npm run format     # Prettier (writes in place)

All four must pass before opening a PR. CI runs them automatically.

Testing

There is no automated test suite yet. To test manually:

  1. Launch the Extension Development Host (F5)
  2. Open a folder in the host window
  3. Run Open Pair: Start Hosting and copy the URL
  4. Open a second VS Code window (or use Neovim with live-share.nvim) and join with the URL
  5. Verify edits, cursors, and follow mode work in both directions

For Windows-specific behaviour, test file encoding (UTF-16 LE files are common on Windows).

Pull requests

  • One logical change per PR
  • Run npm run typecheck && npm run lint && npm run format:check locally before pushing
  • Describe what changed and why in the PR description
  • Keep commits focused; squash fixups before merging

Project structure

FilePurpose
src/extension.tsEntry point, command registration, guest message handler
src/session.tsGuest session state machine, auto-reconnect
src/transport.tsWebSocket (masked) and raw TCP (4-byte LE prefix) transports
src/protocol.tsJSON encode/decode + AES-256-GCM wrapper
src/documents.tsVirtual filesystem (liveshare://), patch application
src/cursors.tsRemote cursor and selection decorations
src/peers.tsPeer tracker, QuickPick
src/host.tsVS Code host: TCP server, approval flow, broadcast
src/tunnel.tsSSH/ngrok tunnel management