Skip to content

Poll voter lists + Zap polls (kind 6969)#277

Merged
spe1020 merged 3 commits intomainfrom
feat/poll-voter-list
Mar 27, 2026
Merged

Poll voter lists + Zap polls (kind 6969)#277
spe1020 merged 3 commits intomainfrom
feat/poll-voter-list

Conversation

@spe1020
Copy link
Copy Markdown
Contributor

@spe1020 spe1020 commented Mar 27, 2026

Summary

  • Poll voter lists: Click any poll result to see who voted with profile pictures and names. Scrollable when >5 voters. Works for both text and image polls.
  • Zap polls (kind 6969): Primal-compatible zap poll support — vote on polls with Lightning zaps instead of free votes.

Zap Polls

  • New event kind 6969 with poll_option, closed_at, value_minimum/value_maximum tags
  • Fully interoperable with Primal's zap poll implementation
  • ZapPollDisplay component with sats-based results, yellow accent theme
  • Dynamic preset amounts (linear interpolation between min/max, default 21–21K sats)
  • poll_option + k tag in kind 9734 zap requests using choice ID strings
  • p tag with creator pubkey + relay hint on poll events for Lightning routing
  • Yellow highlight + "⚡ Zap Poll" badge in the poll feed
  • Zap poll creation toggle in PollCreator

New files

  • src/components/ZapPollDisplay.svelte — Zap poll rendering component
  • src/lib/zapPollCache.ts — Kind 9735 receipt aggregation cache

Test plan

  • Regular polls: vote, view results, click result to expand voter list with pfps
  • Image polls: same voter list behavior
  • Create a zap poll (toggle in poll creator, 21–21K defaults)
  • Zap poll shows in feed with yellow highlight and badge
  • Click option → ZapModal with dynamic presets → zap vote → results update
  • Verify zap polls from Primal display correctly on our feed
  • Verify our zap polls display correctly on Primal

🤖 Generated with Claude Code

spe1020 and others added 3 commits March 26, 2026 21:29
- Add kind 6969 zap poll data model (poll_option tags, closed_at, value_minimum/maximum)
- Create ZapPollDisplay component with sats-based results and zap-to-vote flow
- Create zapPollCache for fetching/aggregating kind 9735 receipts per poll option
- Add poll_option + k tag support to zap requests via extraTags in zapManager
- Add poll voting context to ZapModal with dynamic linear presets and min/max enforcement
- Fetch kind 6969 alongside 1068 in poll feed with yellow highlight and badge
- Add zap poll creation toggle in PollCreator, publish as kind 6969 in PostComposer
- Include p tag with creator pubkey and relay hints for Lightning routing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Click a poll result to expand and see who voted with profile pictures.
Scrollable when more than 5 voters. Works for both text and image polls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying frontend with  Cloudflare Pages  Cloudflare Pages

Latest commit: a0d6507
Status: ✅  Deploy successful!
Preview URL: https://14ba42e0.frontend-hvd.pages.dev
Branch Preview URL: https://feat-poll-voter-list.frontend-hvd.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 27, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
frontend a0d6507 Mar 27 2026, 01:51 AM

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@spe1020 spe1020 merged commit 6c21756 into main Mar 27, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants