fix(events): keep event-detail ticket counts live after a purchase #119
No reviewers
Labels
No labels
app:activities
app:chat
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp!119
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/event-detail-live-ticket-count"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the 17 Jun design review — "tickets remaining/total doesn't update dynamically once I purchase."
It is a Nostr event:
tickets_available/tickets_soldare tags on the NIP-52 calendar event, which is replaceable, and the events extension republishes it when a ticket sells (services.py— on invoice paid). The webapp already has a reactiveeventbound to the store and a dTag-scoped subscription.The gap:
useEventDetail.load()early-returned when the event was already cached (arriving from the feed), so the detail page set up no live subscription — the republished event never arrived and counts stayed stale until a manual reload.Fix: always open the dTag-scoped subscription (only the one-shot query + loading state are skipped on a cache hit); unsubscribe any prior sub before re-subscribing so
reload()can't leak one. The reactiveeventthen reflects the republished counts live.🤖 Generated with Claude Code
dce55f0c0cto8ade942c32