---
epic: 9
story: 9.6
title: "Collaborative Editing"
status: draft
---

## Epic 9 — Web App (React + WASM)
**Goal:** Zero-install web experience with real-time collaboration.

### Story 9.6: Collaborative Editing

As a team member,
I want to edit a CalcPad sheet simultaneously with others,
So that we can build and review calculations together in real time.

**Acceptance Criteria:**

**Given** a sheet owner enables "Edit" sharing on a sheet
**When** they share the link with collaborators
**Then** each collaborator can open the sheet and make live edits

**Given** multiple users have the same sheet open for editing
**When** one user types or modifies a line
**Then** the change appears on all other users' screens within 500ms
**And** each user's cursor is visible with a distinct color and name label

**Given** two users edit the same line simultaneously
**When** both changes arrive at the server
**Then** conflicts are resolved automatically via CRDT (Yjs or Automerge)
**And** no data is lost from either user's input

**Given** a user is on the Free plan
**When** they share a sheet for collaborative editing
**Then** up to 5 simultaneous editors are allowed
**And** additional users beyond 5 see a "sheet is full" message with an upgrade prompt

**Given** a user is on the Pro plan
**When** they share a sheet for collaborative editing
**Then** up to 25 simultaneous editors are allowed
