#270 Durations that overlap never share a row beneath the axis (#269)
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#270
- pull request
- state:merged
Closes #269. Durations beneath the axis took their rows from their position in the window's list (`i % 3` in `renderDurationBands`), not from when they run. The first and fourth always shared a row. In your view, the **Second Battle of Fallujah** coming into view made the **Iraq War** draw over the **War in Afghanistan**, and rows jumped as durations came and went. - `durationLanes` (`src/durations.ts`, exported through core) packs bands by time: sorted by start, longer first on ties, each takes the first row whose bands have all ended by its start. Overlapping durations never share a row. A band starting where another ends reuses its row, and the rows don't depend on the order the server lists them. - A comparison's timelines are packed separately, each under its own axis. - The rows are still 13 px apart, with no limit of three. Tests: a unit test with the four durations from your screenshots (the two wars and the two battles of Fallujah) checks that overlapping ones never share a row, that any order gives the same rows, that a finished row is reused, and that comparison groups pack apart. `npm test` (305) passes, and `test/browser.mjs` (with its duration-backgrounds check) passes in Chromium. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/270
Related
- #269 Durations overlap in the same row beneath the axis
- #271 Flaky WebKit browser test: a query request is blocked "due to access control checks" in the drafts check
- #273 The drafts browser test ignores WebKit's cancelled requests (#271)
- Merge pull request #270 from openchronology/fix/duration-lanes
Open #270 Durations that overlap never share a row beneath the axis (#269) in the timeline