circagraph
Sign inSign up

openchronology/timeline-app on GitHub

The OpenChronology repository on GitHub, mirrored by och-import-github: issues and pull requests as durations (ongoing while open), what happened to them as moments, plus releases, milestones, commits and branches. The Branches view shows the most recently active branches each in a track of its own.

Source: https://github.com/openchronology/timeline-app

3,131 moments · 2026-10-05 CE 20:21:49 UTC – 2026-11-16 CE 12:10:45 UTC · by @athan · @athan

#602 Measures: balances in the editor, a balance chart and api.balance (#595)

–

  • github
  • github/openchronology/timeline-app
  • github/openchronology/timeline-app#602
  • pull request
  • state:merged

Phase 4 of #595, the last one: balances become visible and usable in the editor and in plugins. Phases 1–3 (#596, #597, #598) computed them in the browser, on servers and in desktop files. - **Measures dialog:** each measure sets where its durations' values apply (start or end) and its balance: none, an opening balance, a closing balance, or a balance at a time. The value is typed as the measure shows values (`$100.00`). The time is typed as the timeline shows times, and text left as it was printed keeps its exact value. - **Edge readouts:** the view's balance before its changes and after them show in the stage's lower left and right corners (`Cost $100.00` … `Cost $121.50`). - **Before → after:** a summary's tooltip and screen-reader name add `Cost balance $100.00 → $121.50`. A moment's reader and hover card list its balance before and after it. - **Balance chart:** `{ "kind": "balance", "measure": "cost" }` draws the running balance as a step line across the view, scaled to its highest and lowest balances and filled to zero. - **`api.balance(name)`:** a script reads a moment's or summary's balance after its changes, exactly, so it can color what leaves an account overdrawn. The balances travel on the metadata under a JS Symbol, so they are never saved and no metadata key can collide with them. - **Comparisons:** none of this shows in a comparison, where each timeline keeps its own balance. - **Docs:** `docs/measures.md` and `docs/plugins.md` (including the script API table). Tests: - `test/measure-plugins.test.mjs`: the balance chart's manifest, its steps and SVG paths, `api.balance` for summaries and moments, and each group's balance before and after. - `test/measures-browser.mjs`: an opening balance declared in the dialog, the edge readouts, a summary's label, then a balance at a time that moves the opening readout. - Both pass locally, as does the rest of the unit suite. I also checked a screenshot of a ledger with a balance chart, which steps $50 → −$30 → $90 → $70 → $130 → $115 across the view. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/circagraph/timeline-app/pull/602

Related

Open #602 Measures: balances in the editor, a balance chart and api.balance (#595) in the timeline

#602 Measures: balances in the editor, a balance chart and…