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

#539 Let a duration end "now", while it is ongoing (#537, stage 1)

–

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

Stage 1 of #537: ongoing durations in the core model and the browser. ## What changes - **Model.** A duration's end may be `{"ongoing": true}`, meaning the current time. A start cannot be ongoing. - **Validation.** Only timelines with the Gregorian time display have a "now", so all others refuse ongoing ends. Partial saves carry no settings, so they skip this check. - **Resolution.** `resolveDuration(duration, timeOf, now)` gives an ongoing end as `max(start, now)`. Without `now` it gives a point at the start: the placeholder the persisted trees will hold. - **Browser index.** `TimelineIndex` keeps ongoing durations beside its interval tree and resolves them at its `clock` for each frame. `withOngoing` and `summariesWithOngoing` merge them into the window's longest-first ranking, its counts and its collapsed summaries, so the result matches what the tree would give if it could hold them. The server will reuse both in stage 2. - **Drawing and dialog.** - Bands fade out where "now" is in view, and times read "… – now". - The view redraws every 15 seconds while an ongoing band is shown. - The duration dialog offers **Ongoing (until now)** for an end. - **Server.** It refuses ongoing ends with a 400 until stage 2 teaches its SQL window and summary queries about them. The design is in [this comment](https://github.com/openchronology/timeline-app/issues/537#issuecomment-6725362009). ## Tests - `test/ongoing-durations.test.mjs` covers validation, the "now" mapping, resolution, frames growing with the clock, collapsed summaries, and merging with truncation. - `npm test` passes apart from `contents.test.mjs`, which fails locally with git `ENOBUFS` from untracked worktrees. CI runs it cleanly. - There is no browser test for the dialog yet. ## Not yet - **Stage 2:** server storage and queries, saved views, and the API and OpenAPI. - **Stage 3:** the SQLite native store and `och-convert`. Until then, saving an ongoing duration to a desktop `.och` file is not supported. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/539

Related

Open #539 Let a duration end "now", while it is ongoing (#537, stage 1) in the timeline

#539 Let a duration end "now", while it is ongoing (#537…