Save ongoing durations on the server and resolve them at its clock
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
The server's interval trees are persisted as exact rationals, so an ongoing duration (#537) is stored as a point at its start, beside its definition. Every query that reads durations now takes those placeholders out and adds the timeline's ongoing durations, resolved at the server's clock: window bands and counts (withOngoing), collapsed summaries (the placeholder's count is removed from the cluster holding its start, then summariesWithOngoing), the paged list of a window's durations in each order, the durations inside a summary, and a lookup by ID. Partial indexes on oc_duration_nodes and oc_view_duration_nodes find a timeline's ongoing durations, at most 10,000 per query. The OpenAPI schema describes the ongoing end, and a PostgreSQL test covers saves, windows, summaries, pages, lookups, closing and reopening. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/4b494afc3210653ee47ba46f5379ca431bbfd396
Related
Open Save ongoing durations on the server and resolve them at its clock in the timeline