Skip to content

fix(timeline): guard minimap density against fractional display width (#863)#865

Closed
lukecotter wants to merge 1 commit into
certinia:mainfrom
lukecotter:bug-853-density-scaling
Closed

fix(timeline): guard minimap density against fractional display width (#863)#865
lukecotter wants to merge 1 commit into
certinia:mainfrom
lukecotter:bug-853-density-scaling

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

📝 PR Overview

Main-line copy of the #863 fix (released as 1.20.1 via a separate release-branch PR). On Windows with fractional display scaling (125/150/175%), getBoundingClientRect().width is non-integer; passed as a minimap density bucket count it threw RangeError: Invalid array length, aborting FlameChart.init() before interaction handlers attached — so zoom, pan and keyboard all appeared dead.

🛠️ Changes made

  • Normalise the bucket count to a non-negative integer at the single MinimapDensityQuery.query() entry point (covers both compute paths and the cache key).

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected

🔗 Related Issues

closes #863

✅ Tests added?

  • 👍 yes — fractional / NaN bucket-count regression tests in minimap-density.test.ts.

📚 Docs updated?

  • 🔖 CHANGELOG.md

…certinia#863)

Windows fractional display scaling (125/150/175%) makes getBoundingClientRect().width non-integer; passing it to MinimapDensityQuery as a bucket count threw "Invalid array length" and aborted timeline init before interaction handlers attached, so zoom/pan/keys all appeared dead. Floor the count at the single query() entry point.
@lukecotter
lukecotter deleted the bug-853-density-scaling branch July 23, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timeline fails to load on Windows with fractional display scaling

2 participants