forked from quic-issues/427e7578-d7bf-49c8-aee9-2dd999e25316
2.1 KiB
2.1 KiB
status, created, tags, priority, created_at, depends_on, updated_at, related
| status | created | tags | priority | created_at | depends_on | updated_at | related | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| planned | 2026-03-16 |
|
high | 2026-03-16T07:51:49.209Z |
|
2026-03-16T07:52:06.762Z |
|
Poll Creation & Management
Status: 🗓️ Planned · Priority: High · Created: 2026-03-16 · Tags: polls, management
Overview
UI and logic for creating, configuring, and managing polls. The poll creator (owner) can set title, description, anonymity mode, add initial options, manage the poll lifecycle (draft → open → closed), and delete the poll.
Design
Poll Creation Flow
- User taps "Create Poll"
- Fills in: title, description, anonymous (toggle), initial options (optional)
- Poll is created in
draftstatus (only owner can see it) - Owner shares poll link → users who join get
viewerrole; owner promotes to participant/moderator - Owner (or moderator) starts the poll → status becomes
open - Owner (or moderator) stops the poll → status becomes
closed
Owner Capabilities
- Delete poll: Only the owner can permanently delete
- Start/stop: Owner and moderators can transition
draft→open→closed - Re-open: Owner can move
closed→open(but not change anonymity)
Pages
/app/create— poll creation form/app/poll/[id]— poll view/management (adapts based on role)/app/polls— list of user's polls (owned + participating)
Plan
- Build poll creation form (title, description, anonymous toggle, initial options)
- Implement poll lifecycle state machine (draft → open → closed)
- Build poll list page (my polls, polls I participate in)
- Build poll detail/management page
- Add delete poll functionality (owner only)
- Wire up to PeerJS—poll becomes "live" when owner opens it
- Build user/role management UI in poll detail page
- Implement invite flow (shareable link — users join as viewer, owner promotes)
Test
- Poll can be created with all fields
- Anonymity toggle locks after first vote
- Poll lifecycle transitions work correctly
- Owner can delete poll; others cannot