1.4 KiB
1.4 KiB
| id | title | status | assignee | created_date | labels | milestone | dependencies | parent_task_id | priority | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-118.2 | Add multiplayer sync to rchoices (voting/ranking sessions) | To Do | 2026-03-16 00:05 |
|
Multiplayer Everything | TASK-118 | medium |
Description
rchoices is currently a stateless voting UI. Add Automerge-backed real-time sync for live collaborative voting sessions.
New files:
modules/rchoices/schemas.ts— ChoicesDoc with votingSessions, votes, rankingsmodules/rchoices/local-first-client.ts— CRUD: createSession, castVote, updateRanking
Schema design:
ChoicesDoc {
meta: { module: 'choices', collection: 'sessions', version: 1 }
sessions: Record<string, { id, title, type: 'vote'|'rank'|'score', options: [], createdBy, createdAt }>
votes: Record<string, { sessionId, participantDid, choices: Record<optionId, number>, updatedAt }>
}
Component updates (folk-choices-*.ts):
- Init local-first client, subscribe to doc changes
- Real-time vote tally updates as participants vote
- Show participant count and live results
Acceptance Criteria
- #1 Voting sessions sync in real-time between participants
- #2 Vote tallies update live as votes come in
- #3 Session creator can configure vote type (single/multi/ranked)
- #4 Demo mode works with local-only state