feat(activities): event name on My tickets + organizer on cards #102
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!102
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/event-name-and-organizer"
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?
Summary
Two related polish items for the events stack:
My tickets — event names instead of
Event: <id>…. The grouped ticket cards on/my-ticketsrendered the truncated LNbits event id as the card title (e.g.Event: Z3wbKx7w…). They now show the actual event title, sourced from the shared events store, and the title is aRouterLinkto the event detail page. Subscribes to the events feed on mount so titles resolve even when a user lands on My tickets directly from a purchase flow without first visiting/events. Falls back to the old short-id label until the event arrives (or if the event was deleted upstream).Organizer on every feed card + composable fix.
OrganizerCardgets acompactvariant (tiny avatar + display name, single line) used insideEventCardso viewers see who's hosting before tapping in. Hidden on the host's own roster (compact feed rows). Detail page keeps the original two-line layout.Along the way,
useOrganizerProfileis rerouted through the centralizedProfileServiceto fix two real bugs that meant kind-0 metadata could never reach the rendered card:displayNamewas exposed via agetaccessor on the returned object; destructuring it resolved once at the destructure site, so a kind-0 arriving later never updated the bound name. Now exposed ascomputed<string>.relayHub.subscribe()throws synchronously when the hub isn't connected yet.OrganizerCardmounting during cold start swallowed the throw silently inonMounted, leaving the user with the pubkey-truncated fallback forever.ProfileService.getProfile()awaits the relay-hub connection before issuing the filter.Bonus: the kind-0 cache is now shared with chat / market / nostr-feed, so a profile fetched by any module is immediately visible to all of them.
End-to-end note on display-name visibility
For the organizer name to actually populate, the LNbits side needed to broadcast kind-0 via the configured relays rather than direct-inserting into a hardcoded
relay_id="test1"row. That's been fixed on thedevbranch of aiolabs/lnbits (commit2169c1b8—fix(auth): broadcast kind-0 via nostrclient, not direct nostrrelay insert). After deploying that LNbits build, existing users get their kind-0 republished the next time they edit their profile through the webapp's gear popup (PATCH /api/v1/authalready calls_publish_nostr_metadata_event).Test plan
/my-tickets, ticket-group card title shows the real event name and clicking it navigates to the event detail page./my-tickets, opening the page directly (no prior/eventsvisit) eventually populates the names as the feed subscription warms up.Organizersection continues to render correctly (compact prop defaults to false).🤖 Generated with Claude Code
Two changes that ship together: - Compact variant of OrganizerCard (tiny avatar + display name on a single line) used on every feed EventCard so viewers see who's hosting before they tap into the detail page. Hidden on compact feed rows (host's own roster — they already know). - Refactor useOrganizerProfile.ts to route through the centralized ProfileService. Two bugs the local impl was carrying: * `displayName` was exposed via a `get` accessor on the returned object; destructuring it (`const { displayName } = …`) resolved once at the destructure site, so a kind-0 arriving later never updated the bound name. Now exposed as `computed<string>`. * `relayHub.subscribe()` throws synchronously when the hub isn't connected yet. OrganizerCard mounted during cold start swallowed the throw silently in onMounted, leaving the user with the pubkey-truncated fallback forever. ProfileService.getProfile() awaits the relay-hub connection before issuing the filter. Bonus: ProfileService's kind-0 cache is shared with chat / market / nostr-feed, so a profile fetched by any module is immediately visible to all of them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>