#365 Duration backgrounds with addresses over 256 characters are silently not shown
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#365
- issue
- state:closed
A duration's background image is silently dropped when its address is longer than 256 characters. **What happens.** Viewport bands carry a bounded projection of a duration's metadata (`durationOverview` in `src/durations.ts`), and it keeps only string fields of at most 256 characters. Backgrounds are read from that projection, so a longer `backgroundUrl` never reaches the timeline: the band shows no picture, with no error. `BACKGROUND_URL_LIMIT` (256, `src/plugins.ts`) only produces a note in the duration's details panel in the editor, which a timeline built through the API or imported from a file never shows. **Why it bites.** Wikimedia Commons thumbnail addresses repeat the file name twice, so a descriptive file name easily passes 256 characters. On timescale.info/athan/usmc four bands (World War II, Belleau Wood, Tinian, Vietnam) had backgrounds of 260–340 characters that never showed; they were fixed by hand with the files' shorter original addresses. **Proposed fix.** - Let the overview keep `http(s)` addresses up to 1,024 characters (still within its 4,096-character budget), and raise `BACKGROUND_URL_LIMIT` to match. - Rebuild the stored overviews of existing timelines that have a duration whose background address is longer than 256 characters, so they show without being re-saved. - Report addresses still over the limit where they are set: in the API's response to a save or import (a warning, not a rejection) and at import in the editor, not only in the details panel. - Tests for each. https://github.com/openchronology/timeline-app/issues/365