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

#67 Fix: redo after undo showed a server moment twice

–

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

On a **server** timeline, if you edit a moment, undo, then redo, the edited moment counts as a *new* moment: the event count reads 1,001 of 1,000, and it shows as "2 moments" beside the server's own copy. This lasts until you save. Saving still writes the right data, because changes are keyed by ID. **Cause:** - Undo puts the saved moment back, so `RemoteWorkspace` drops the change. - With the dialog closed, the next render's `evict()` drops the moment and its saved original, since nothing references it. - Redo then `put`s the edit with no known original, so it's recorded as an addition (no `before`), and the overlay doesn't hide the server's copy. Durations have the same eviction path. **Fix:** - `evict()` takes the moments and durations the undo/redo history still refers to, and keeps them loaded with their originals. - The editor passes them from `history` and `future`. **Tests:** - `test/remote-cache.test.mjs` replays load → edit → undo → evict → redo. With the history retained, the redo keeps its `before`; without it, the old behaviour shows up as an addition. - End to end on the platform (Next.js + PostgreSQL, Chromium), via the UI benchmark harness: after redo the count stays 1,000 with one renamed marker, and saving stores 1,000 rows. - Unit tests pass (200), and the Chromium browser suite passes. Found while building the UI benchmarks for #51. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Ti36soiZpKdSxKfvQLEcfY https://github.com/openchronology/timeline-app/pull/67

Related

Open #67 Fix: redo after undo showed a server moment twice in the timeline

#67 Fix: redo after undo showed a server moment twice