v0.0.2 — co-editing + Docker image
First self-hostable release. Phase 1 (single-user editor) closes out and Phase 2 (real-time co-editing) ships as a Docker image.
Highlights
🐳 Self-host with Docker (new in 0.0.2)
Single image — web + Hocuspocus + Fastify in one container, Redis alongside for room persistence.
```sh
docker run --rm -p 3000:3000 schnsrw/casual-sheets:0.0.2
open http://localhost:3000
Or with Redis persistence via compose:
docker compose up -d
```
Co-edit a sheet: open `http://localhost:3000/r/` in two browsers — both join the same `Y.Doc`, edits propagate in < 1 s. Anonymous, no login.
The public demo at sheet.schnsrw.live stays single-user; opening `/r/:roomId` there surfaces a banner pointing to the self-host docs.
⚡ Co-editing architecture
- Server (`apps/server`) — Fastify + Hocuspocus on one port. `POST /api/rooms` allocates ids, `/yjs` WebSocket handles Yjs sync, `/health` liveness probe.
- Client bridge (`apps/web/src/collab/bridge.ts`) — subscribes to Univer's `ICommandService.onMutationExecutedForCollab`; cell values flow into a nested `Y.Map`. Echo-loop guarded both ways (`ORIGIN_LOCAL` + `fromCollab` flag).
- Persistence — in-memory by default; if `REDIS_URL` is set, `Y.Doc` updates persist to Redis with a 7-day TTL.
- Build flag — `VITE_COLLAB_ENABLED` gates the bridge so the GitHub Pages bundle stays single-user.
Full design in `docs/CO-EDITING.md`.
🛠️ Phase 1 polish (since 0.0.0)
- Page Setup dialog before File → Print / Ctrl+P (orientation + margin presets, persists in localStorage)
- Border color picker in the Borders dropdown (12 swatches + custom)
- Multi-column sort via Data → Sort range… (Univer's Custom Sort panel)
- Styled tooltips across toolbar / sheet tabs / formula bar — replaces slow native `title=`
- Save / Export toasts via Univer's `IMessageService`
- Editable Name Box — type `B5` / `B5:D10` to navigate
- Drag-and-drop file open with a window-level drop overlay
- Right-click sheet tab menu — Rename / Duplicate / Delete
- Help → Report a bug opens a prefilled GitHub issue form
- Outline groups (row + column) with side panel + xlsx round-trip
- Hyperlinks round-trip via cell rich-text + plugin resources stash
🐛 Bug fixes
- Multi-sheet xlsx open only showed one tab until the user pressed + — fixed (`useSheets` now re-reads on workbook-unit swap)
- Outline collapse hang on CI (was using `MAX_SAFE_INTEGER` as a column bound — Univer hung iterating it; clamped to the sheet's actual size)
- Save toast flake — narrowed the click suppression to anchors with `download=` attr, raised timeout for cold CI caches
Tests
129 / 129 passing — `pnpm test:e2e` in tests/e2e/. Two-context co-edit sync, multi-sheet open, hyperlink round-trip, outline groups, drag-fill, drag-and-drop file open, formula evaluation, Page Setup, border color, sort dialog, and the rest.
Docker image
Push to Docker Hub coming with the merge:
- `schnsrw/casual-sheets:0.0.2`
- `schnsrw/casual-sheets:latest`