#591 Measures: comparisons keep totals per timeline, never added across them (#586)
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#591
- pull request
- state:merged
Closes #586, a follow-up to #570. A measure belongs to its own timeline: two timelines' `cost` aren't the same quantity. Combined comparisons regrouped their tracks' summaries with `coalesceGroups`, which added totals by measure name across timelines. A combined summary of a dollars timeline and an hours timeline showed `cost: 206`. - **Combined comparisons:** a summary now keeps its totals by timeline (`sourceTotals`, by track), added only within one timeline as summaries merge. Plugins that use totals choose how to show each (#587). - **Side by side:** each track's summaries keep their own timeline's `totals`, as before. - **Separated tracks:** these are one timeline. A track too narrow to draw now collapses into another with its totals, and a band's values count at its start. Before, the collapsed summary dropped them. **Tests:** unit tests cover side-by-side and combined comparisons of two timelines that both declare `cost`, and a collapsing separated track. Docs updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/circagraph/timeline-app/pull/591
Related
- #570 Measures: typed quantities on moments and durations, totalled in every summary
- #586 Measures: comparisons keep totals per timeline, never added across them
- #587 Measures: plugin scripts and derived metadata read a summary's totals
- #592 Measures: plugin scripts and derived metadata read a summary's totals (#587)
- Merge pull request #591 from openchronology/feat/586-comparison-totals