docs(phase659): record poll expiry/close-state and rollback slice
Mark roadmap items for poll expiration/close-state and optimistic rollback as complete, and update DM polls docs with new commands, IPC events, and runtime close/expiry behavior. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
+7
-2
@@ -4,12 +4,15 @@
|
||||
|
||||
**v0.8.638 (Phase 659 slice 2):** Added anonymous modes (`/polla`, `/pollma`) and poll edit-before-first-vote flow (`edit-dm-poll` IPC + platform `editDmPoll` guard).
|
||||
|
||||
**v0.8.638 (Phase 659 slice 3):** Added poll expiry metadata (`--expires <N><m|h|d>`), explicit close action (`close-dm-poll`), and optimistic vote rollback on state mismatch.
|
||||
|
||||
## Commands
|
||||
|
||||
- `/poll Question | Option A | Option B` creates a single-choice poll.
|
||||
- `/pollm Question | Option A | Option B` creates a multi-select poll.
|
||||
- `/polla Question | Option A | Option B` creates a single-choice anonymous poll.
|
||||
- `/pollma Question | Option A | Option B` creates a multi-select anonymous poll.
|
||||
- Optional expiry suffix: `--expires 30m`, `--expires 6h`, `--expires 2d`.
|
||||
|
||||
Polls are encoded as normal DM messages (no central service), with option emojis (`1️⃣`..`8️⃣`) used for per-option vote state.
|
||||
|
||||
@@ -20,8 +23,9 @@ Polls are encoded as normal DM messages (no central service), with option emojis
|
||||
| Poll command schema | `pearcord-shared` | `parseDmPollCreateCommand`, `buildDmPollMessageContent`, `parseDmPollMessageContent` |
|
||||
| Vote enforcement | `pearcord-platform` | `voteDmPoll` enforces single-choice by removing other option reactions for the same user |
|
||||
| Poll edit guard | `pearcord-platform` | `editDmPoll` allows edits only before first vote is recorded |
|
||||
| IPC | `pearcord-ui-flow` | `vote-dm-poll` -> `dm-poll-voted`, `edit-dm-poll` -> `dm-poll-edited` |
|
||||
| UI | `apps/pearcord/ui` | Poll card render + vote bars + anonymous label + pre-vote edit affordance |
|
||||
| Poll close/expiry | `pearcord-platform` | `closeDmPoll` and vote/edit closed-state enforcement (`poll is closed`) |
|
||||
| IPC | `pearcord-ui-flow` | `vote-dm-poll`/`edit-dm-poll`/`close-dm-poll` result events |
|
||||
| UI | `apps/pearcord/ui` | Poll card render + vote bars + anonymous label + pre-vote edit/close affordances + optimistic rollback reconcile |
|
||||
| Agentctl journey | `pearcord-agentctl` | `runDmPollVoteJourney` |
|
||||
|
||||
## Testing
|
||||
@@ -38,3 +42,4 @@ npm run test:phase659-dm-polls-scheduling
|
||||
- No central server API is used for poll storage or tallying.
|
||||
- Vote state converges from replicated reaction rows in local HyperDB state.
|
||||
- Anonymous mode hides per-user “You voted” attribution in option rows while preserving aggregate vote totals.
|
||||
- Expiry/close state is encoded in poll message metadata and enforced locally before reaction writes.
|
||||
|
||||
+2
-2
@@ -20393,8 +20393,8 @@ P2P-first phase: Hyperswarm guild mesh, `GUILD_SYNC` bundles, join/recovery pipe
|
||||
| P659-2 | DM polls: support single-choice voting in DM channels | [x] |
|
||||
| P659-3 | DM polls: support multi-select voting (toggle answers) | [x] |
|
||||
| P659-4 | DM polls: anonymous-vote mode flag (peer-visible totals only) | [x] |
|
||||
| P659-5 | DM polls: poll expiration timestamp and close-state handling | [ ] |
|
||||
| P659-6 | DM polls: local vote optimistic UI + rollback on sync mismatch | [ ] |
|
||||
| P659-5 | DM polls: poll expiration timestamp and close-state handling | [x] |
|
||||
| P659-6 | DM polls: local vote optimistic UI + rollback on sync mismatch | [x] |
|
||||
| P659-7 | DM polls: poll result bar UI styled Discord-like | [x] |
|
||||
| P659-8 | DM polls: “you voted” indicator chips in message list | [x] |
|
||||
| P659-9 | DM polls: poll edit window (question/options before first vote) | [x] |
|
||||
|
||||
Reference in New Issue
Block a user