Feed: embedded event references (nostr:nevent) render as raw badge until the note is visited #37
Labels
No labels
bug
discussion
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
edufeed/edufeed-app#37
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Bug
Notes in the feed that quote/reference another event via
nostr:nevent…sometimes render the reference as a raw badge chip (e.g.nevent1qqs82…) instead of the embedded event card. After clicking into the note view and navigating back, the embed renders correctly.Hypothesis
The embed component resolves the referenced event only from the EventStore and never triggers a network load. Visiting the note view loads the referenced event into the EventStore, which is why it renders after back-navigation. Fix: when the referenced event is not in the store, kick off an applesauce event loader (using the relay hints from the nevent, falling back to app relays), and render the embed reactively once it arrives. Keep the badge as a fallback while loading / when unresolvable.
Acceptance criteria
nostr:nevent/nostr:notereference in feed note content loads the referenced event on first render (no visit-and-back needed).Fixed on branch
feat/feed-issues-34-37(commitc9fe41ad). NotePreview no longer does a one-shot fetch: it subscribes toeventStore.event(pointer)(relay hints from the nevent unioned with lookup relays), the store's fallback loader auto-fetches on miss, and a late-arriving event upgrades the badge to the embedded card without remount. Verified in the browser: quoted notes render as embedded cards on first load; the remaining badge case is the intentional depth-2 nesting cutoff.