#316 Dense durations: group near-identical spans, cap visible rows, and list the rest
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#316
- issue
- state:closed
**Problem.** When thousands of durations overlap the view (for example, all with roughly the same start and end): - The view loads at most 256 (`durationWindow` limit; the server's query stops at 257) and says "Showing the first 256 durations in this window. Zoom in to narrow the selection." Zooming doesn't help when they share a span; they overlap at every zoom. - Which 256 is arbitrary (tree order by start), and the rest are reachable only by search. - Each overlapping band takes its own 13 px row (`durationLanes`), so 256 make a wall about 3,300 px tall under the axis, dozens of screens on a phone. - Abuse angle: only owners and writers add durations, but a comparison that includes someone else's public timeline, or a merged pull request, can bring a flooded timeline into view. **Proposal** (agreed in discussion): 1. **Group near-identical spans.** Durations whose start *and* end both fall within the grouping distance ("Group within N px", as for moment summaries) are drawn as one band: "*Title* + 2,340 more". Tapping it lists the group. 2. **Cap visible rows** to what fits the stage (roughly 6–8 on a phone, more on large screens). Everything beyond goes into a "+1,234 more durations ▾" chip at the bottom of the bands, spanning the region they cover. 3. **Choose what's shown in a stable order:** by coverage of the view (longer, era-like spans get the top rows), then start time, title, and ID. The choice must not flicker while panning or zooming. 4. **Reach the rest.** The grouped band and the "more" chip open a list (as moment summaries do): paged, searchable, sorted the same way by default, with a switch to sort by start or title. Each entry opens the duration or fits it in view. 5. **Server counts past the cap.** The query reports how many durations were left out, capped for cost (for example "10,000+"), so the notice and chip can give a number. Same for the offline and desktop stores. Also: comparisons (several sources' bands), view mode and embeds, the reader, accessibility (the chip and list are keyboard reachable and announced), docs (`docs/guide.md` or durations docs, `docs/capacity.md`), and tests. Unit tests for grouping and the stable ordering; a browser test with a few thousand same-span durations checking a bounded number of band elements, the count, the list, and that nothing flickers across pans. Plus a benchmark scenario for dense durations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/issues/316