Skip to content

feat(polls): add poll manager - #1664

Merged
hoangle398 merged 1 commit into
mainfrom
feat/poll-manager
Nov 8, 2026
Merged

hoangle398 merged 1 commit into
mainfrom
feat/poll-manager

Conversation

@hoangle398

@hoangle398 hoangle398 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Workspaces can create polls with 2–10 candidates, a start/end window, and an optional flow that runs after someone votes. They can share a link that opens the poll in any connected channel and view vote analytics.
Screenshot 2026-11-07 at 10 16 32
Screenshot 2026-11-07 at 10 16 15
Screenshot 2026-11-07 at 10 15 20

Changes

  • database: Poll, PollCandidate, PollVote tables plus the poll repository (race-safe vote upsert, vote breakdown, edits that lock the row)
  • business: poll and vote services, a pl_ poll ref type, and chat message builders for poll cards, the candidates carousel, and the vote confirmation
  • builder: public and private poll API, plus the Poll Manager list, form, Get Link dialog, and analytics page
  • worker: handles poll link opens, vote taps, and the after-vote flow (the job id is deduplicated so a retried tap is never lost or counted twice); stale taps fall back to the polls list
  • CLI/MCP: docs for the polls API
  • filesystem: normalizes non-standard mime types such as image/jpg on upload
  • whatsapp: re-hosts external media links served with an unsupported content type; matching on the storage URL now respects path boundaries

Test plan

  • pnpm lint
  • pnpm check-types
  • pnpm test (new: poll-service, poll-vote, poll-tap, polls-public-api, outbound-media)
  • Review the migration 20261101144111_poll_manager before applying it
  • Manual: create a poll, open its link in a channel, vote, and check that the after-vote flow runs and analytics update

🤖 Generated with Claude Code

@github-actions github-actions Bot added the feature New feature or request label Nov 7, 2026
@hoangle398
hoangle398 requested review from realcodesiman, sung17 and viethung0o0 and removed request for sung17 and viethung0o0 November 7, 2026 03:20
Workspaces create polls (2-10 candidates, start/end window, optional
after-vote flow), share a link that opens the poll in any connected channel,
and see vote analytics.

- database: Poll, PollCandidate, PollVote tables and poll repository
  (race-safe vote upsert, vote breakdown, row-locked edits)
- business: poll service and vote service, poll ref type (pl_), chat message
  builders for cards, candidates carousel and vote confirmation
- builder: public and private poll API, Poll Manager list, form, Get Link
  dialog and analytics page
- worker: poll link opens, vote taps, after-vote flow (deduplicated job id so
  a retried tap cannot lose or double it), polls list recovery for stale taps
- CLI/MCP docs for the polls API
- filesystem: normalize non-standard mime types like image/jpg on upload
- whatsapp: re-host external media links served with an unsupported content
  type; storage URL match is path-bounded
@hoangle398
hoangle398 merged commit a9d5713 into main Nov 8, 2026
14 checks passed
@hoangle398
hoangle398 deleted the feat/poll-manager branch November 8, 2026 01:35
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
Workspaces create polls (2-10 candidates, start/end window, optional
after-vote flow), share a link that opens the poll in any connected channel,
and see vote analytics.

- database: Poll, PollCandidate, PollVote tables and poll repository
  (race-safe vote upsert, vote breakdown, row-locked edits)
- business: poll service and vote service, poll ref type (pl_), chat message
  builders for cards, candidates carousel and vote confirmation
- builder: public and private poll API, Poll Manager list, form, Get Link
  dialog and analytics page
- worker: poll link opens, vote taps, after-vote flow (deduplicated job id so
  a retried tap cannot lose or double it), polls list recovery for stale taps
- CLI/MCP docs for the polls API
- filesystem: normalize non-standard mime types like image/jpg on upload
- whatsapp: re-host external media links served with an unsupported content
  type; storage URL match is path-bounded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant