Measures: durations count where they start (#576)
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
A duration's measure values count entirely where it starts, as if it were a moment at its start: never split between windows or counted twice. - Browser: interval tree nodes keep subtree totals by start; collapsed duration summaries carry them, as do the frame groups they become. Ongoing durations' placeholders take their values out and back in when resolved (frameWithOngoing). - PostgreSQL: oc_duration_nodes (and arc and view nodes, which share the spec) gain `totals`; avl.mjs keeps them, and a duration revalued in place rewrites its path. oc_duration_overview (with its view and fork variants) adds whole subtrees' totals, single points' and the range scan's, and returns them; older versions are dropped first. - Desktop: collapsed duration summaries add their durations' values per declared measure with q_sum. - Bands keep their measure values whole in every edition, for the reader, hover cards and the measure chart, which counts them at their start. - Tests: the browser, PostgreSQL and Rust oracles check that, across a window's groups, every moment's and collapsed duration's value counts once, through random duration adds, moves, value edits and deletions. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/circagraph/timeline-app/commit/5731fdc9b554161daba5daaed82eb9bea5eb3ee1
Related
Open Measures: durations count where they start (#576) in the timeline