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

#541 Hold ongoing durations in desktop files, ending at the app's clock (#537, stage 3)

–

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

Stage 3 of #537: the desktop's SQLite store and `och-convert` hold ongoing durations. This PR is stacked on #540, which is stacked on #539. I'll retarget it as those merge. ## Storage - **The ongoing end.** It is stored as neither a time nor a moment, so the `durations` CHECK becomes "at most one" for an end. A start still needs exactly one, and an ongoing start is refused. - **Older files.** Their `durations` table requires an end time or moment. The first ongoing duration saved into one copies the table into the new schema (`allow_ongoing`). Files that never hold an ongoing duration are left alone, and earlier app versions cannot open a file that does. - **The interval tree.** It holds an ongoing duration as a point at its start, like the server's, with `end_json` = `{"ongoing":true}`. A new partial index, `duration_intervals_ongoing`, finds those rows. - **Validation.** An ongoing end on a timeline without the Gregorian display is refused, matching `validateDocument`. ## Queries The desktop store has no clock of its own, so the app passes `now` with each query. - **Lists and pages** (`durations`, overlapping or keyset) read `duration_intervals` with ongoing rows resolved in SQL (`resolved_intervals`). Their filters, sort orders and offsets are therefore exact. - **Overviews** return the ongoing durations resolved at `now`. The app merges them with `frameWithOngoing`. - **The server** now answers windows with `frameWithOngoing` too, replacing the merge #540 added. The server and the desktop share one merge, which: 1. takes each placeholder out of the summary holding its start; 2. adds the resolved band, or adds it to the summaries when it collapses. ## Tests - **Rust:** new tests for windows, lists, pages, sparse close and reopen, the calendar and start rules, and migrating an old `durations` table. All 35 native tests pass, and `cargo fmt` and `clippy` are clean. - **Unit:** a new test joins a placeholder window with its ongoing durations. Over four windows, including truncated and collapsed ones, it matches what the browser index draws. - **`och-convert`:** round-trips an ongoing end, and refuses one without a calendar. - **PostgreSQL**, after the server refactor: `ongoing-durations-postgres`, `durations-postgres`, `summaries-postgres` and `views-postgres` all pass locally. - **`npm test`:** passes apart from `contents.test.mjs`, which fails locally with git `ENOBUFS`. I haven't run the desktop app itself. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/541

Related

Open #541 Hold ongoing durations in desktop files, ending at the app's clock (#537, stage 3) in the timeline

#541 Hold ongoing durations in desktop files, ending at…