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

#366 Duration backgrounds with addresses up to 1,024 characters show

–

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

Fixes #365 A duration's background was silently missing when its address was longer than 256 characters: viewport bands (`durationOverview`) kept only strings that short. ## Changes - **Overview.** `durationOverview` keeps `http://` / `https://` strings of up to 1,024 characters (`OVERVIEW_URL_LIMIT`), still within the 4,096-character budget. Other strings keep the 256 limit. `BACKGROUND_URL_LIMIT` is now 1,024, and the duration dialog's note says "1,024". The desktop store's band projection (`BAND_COLUMNS` in `native-store/src/lib.rs`) applies the same rule. PostgreSQL doesn't derive bands itself: the server builds them with `durationOverview` (`avl.mjs`). - **Existing data.** `rebuildLongBackgrounds` (`server/store.mjs`) runs in `migrate.mjs` after `rebuildIndexes`. It finds timelines whose stored duration definitions have a web address of 257 to 1,024 characters, plus forks reading through to one (live or retired rows of their bases). It rebuilds those with `replace(..., { touch: false })`, as `rebuildIndexes` does. A new `oc_migrations` table records `long-backgrounds`, so the scan of every duration runs once. I used a marker rather than bumping `index_version`: re-running the query alone wouldn't be idempotent, because a timeline whose address doesn't fit the budget matches every time. Bumping the version would also rewrite, and notify, every timeline row. - **Warnings.** `POST /api/timelines`, `PUT /api/timelines/{id}`, `PUT /api/timelines/{id}/changes` and `POST /api/files/import` succeed, and when an enabled background plugin's address is longer than 1,024 characters they add `warnings: [{code: 'long-background', message, count, durations}]` (at most 100 IDs). When there's nothing to warn about, the response is unchanged. This is documented in `docs/api.md` ("Warnings") and in OpenAPI (`Warning`, `SavedTimeline`). The editor's JSON and `.och` imports add the same sentence to their toast (`longBackgroundsText` in `src/wording.ts`). - **Docs.** `docs/images.md` has a new "Image addresses" section. `docs/plugins.md`, `docs/durations.md` and `docs/administration.md` (the upgrade note) are updated too. ## Tests - `test/plugins.test.mjs`: a 300-character https address is kept, 1,024 is kept, 1,100 is dropped, a 300-character non-URL string is dropped, and the budget holds. Also `longBackgrounds` and the wording. - `native-store`: `bands_carry_web_addresses_of_at_most_1024_characters`. - New `test/long-backgrounds-postgres.mjs` covers: - API warnings on create, save, changes and file import. - A 300-character background drawn in the overview query. - An old-style band, in a timeline and in a fork reading through to it, fixed by the rebuild without touching `updated_at`. - A second run doing nothing, and a timeline without such an address left alone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/366

Related

Open #366 Duration backgrounds with addresses up to 1,024 characters show in the timeline

#366 Duration backgrounds with addresses up to 1,024…