timescale.info
Sign inSign up

How OpenChronology was built

Every merged pull request of openchronology/timeline-app, its first week of commits and its releases; and before them the 2020 PureScript editor, from snapshots of its deleted repositories in the Wayback Machine. Written to this server through the HTTP API.

327 moments · 2020-03-09T00:15:08Z CE – 2026-11-02T20:11:21Z CE · by @athan · @athan

#164 · Save a server timeline's time display when it is chosen

  • timeline-app
  • pull request

Closes #123. ## What was wrong On the platform, **Time display → Save display settings** only staged the format, like any other edit, until **Save to server**. Two things then lost it: - **Refreshing** dropped staged server edits without asking. The unload warning covered only timelines kept in memory. - **On a timeline being written to** (syslog or a log import), **Save to server** answered 409 "Someone changed this timeline" every time. Each writer's save moves the revision, so the staged format could never be saved. On the live installation, none of the "Forgejo Events" timeline's 85 revisions changes its settings, so the format chosen there never reached the server. ## What changes - **Saved when chosen.** On a server timeline the user can save to, **Save display settings** saves the display at once. It's a save of nothing else, built on the latest saved settings (title, description, plugins, tags and assets as stored) and sent again if another save lands first (up to 5 tries). It shows "Display settings saved."; a failure shows in the dialog, which stays open. Other unsaved edits stay unsaved. If the open revision was the one saved on, the editor moves to the new revision, so its next **Save to server** doesn't conflict with its own display save. - **Unchanged elsewhere.** In a proposal the display is part of what's proposed. Comparisons, local drafts, offline HTML and desktop files behave as before. - **Leaving asks first.** In a browser, leaving or reloading a server timeline with unsaved edits now asks first (`beforeunload`). Desktop windows and embeds are unchanged. ## Tests `test/syslog-live-postgres.mjs` gains a section. The owner signs in, opens the platform page and picks Gregorian while syslog messages arrive every 150 ms. The test checks that the format is stored, survives a reload, and that a staged title edit makes a reload ask first. Run locally in the Playwright 1.58.2 container (Chromium): - `syslog-live-postgres` - `next-platform` (platform browser tests) - `browser` - `offline-browser` - `sharing-postgres` - `browser-fork-postgres` - `comparison-live-postgres` - `next-postgres` All pass, as do the 262 unit tests and the typecheck.

Sources

Open #164 · Save a server timeline's time display when it is chosen in the timeline