Skip to content

Conversation

@Yopi
Copy link
Contributor

@Yopi Yopi commented Oct 31, 2025

Backend:

  • Adds a hierarchical grouping of events (via parent_event_id).
  • Allows ingestion with a external_event_id as an idempotency key. Events with the same external_event_id are not reingested
  • Allows ingestion of a parent_event_id either as a Polar event.id or as a external_event_id. We do the lookup on our side to allow both sides.
  • Adds a new event hierarchical listing endpoint. I think this can replace the existing endpoint listing endpoint, as we can allow it to be configured with hierarchical: bool. We could make the HierarchicalEvent to be an Event with a children list, instead of holding the Event as a field. -- Or we keep it as a separate endpoint.

Frontend:

  • Add display of nested events.
  • Add semi-pagination of nested events (Show more instead of pages)
Screenshot 2025-10-31 at 12 05 38 Screenshot 2025-10-31 at 12 05 46 Screenshot 2025-10-31 at 12 05 51

@vercel
Copy link

vercel bot commented Oct 31, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
polar Ignored Ignored Preview Oct 31, 2025 2:56pm
polar-sandbox Ignored Ignored Preview Oct 31, 2025 2:56pm

This will allow us to store events hierarchically and introduce a span-type structure where different
events are related to each other and can be bundled up.
@Yopi Yopi force-pushed the introduce-spans-of-events branch from 0971103 to 4a2bc40 Compare October 31, 2025 12:55
Yopi added 2 commits October 31, 2025 15:55
Query the events using a postgres recursive query. Try to be conservative when it comes to limits and events being
queried out to prevent overloading the db.
Including show more button for children
@Yopi Yopi force-pushed the introduce-spans-of-events branch from 4a2bc40 to 7a93761 Compare October 31, 2025 14:55
@emilwidlund
Copy link
Member

Great work on this!

I wonder if we should rename external_event_id to idempotency_key instead? I wonder if that better conveys the purpose of it. But that's just my 2 cents :)

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.

4 participants