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

#165 Saving staged edits on a timeline that is being written to always conflicts

–

  • github
  • github/openchronology/timeline-app
  • github/openchronology/timeline-app#165
  • issue
  • state:closed

## Problem **Save to server** sends the editor's staged edits (`PUT /api/timelines/ /changes`) with the revision they were made on. If anything else has saved since, the server answers 409. The editor then says "Someone changed this timeline. Export your edits before reloading." On a timeline that something keeps writing to, that happens every time: - the [syslog receiver](docs/syslog.md) saves about once a second while messages arrive; - a [log import](docs/log-import.md) saves a few thousand moments every few seconds; - so does any other API client. The owner can never save their own edits there (a renamed moment, a new duration, a changed title or tags) except by exporting, reloading and redoing them. #123 fixed this for the time display alone (saved when chosen, on the latest settings); every other edit still has the problem. ## Direction A save based on an older revision could be merged onto the head instead of refused, when the two don't touch the same things: - **Moments and durations:** each staged change already carries its `before` (the version the editor loaded). A change applies cleanly when the entity's version at the head is still that `before`. It conflicts only when someone else changed the same moment or duration since. - **Relationships:** they are set-like (`related: true/false`), so a staged add or remove applies on any head. - **Settings:** merge field by field (title, description, tags, presentation, plugins, assets): a field the editor didn't change takes the head's value. `server/merge.mjs` already has this three-way merge (`mergeValue`) for proposals and syncs. - **Conflicts:** when some changes really conflict, the editor could save the clean ones and keep the conflicting ones staged, showing which they are, rather than refusing the whole save. This could happen on the server (send the base revision; the server merges onto the head in the save's transaction, recording a save with the head as parent) or in the editor (on 409, read the head's versions of the staged entities and resend). Doing it on the server avoids a race with writers saving every second. ## Related - Live updates are paused while the editor has unsaved edits ("Reload" notice), so the view also falls behind a live timeline during editing. - `docs/comparison.md` and `docs/collaboration.md` describe the current refuse-on-conflict behaviour. https://github.com/openchronology/timeline-app/issues/165

Related

Open #165 Saving staged edits on a timeline that is being written to always conflicts in the timeline

#165 Saving staged edits on a timeline that is being…