Skip to content

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

Merged
lcottercertinia merged 3 commits into
certinia:mainfrom
lukecotter:bug-853-density-scaling-main
Jul 23, 2026
Merged

fix(timeline): guard minimap density against fractional display width (#863) main#867
lcottercertinia merged 3 commits into
certinia:mainfrom
lukecotter:bug-853-density-scaling-main

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. Bump 1.20.1.
@lcottercertinia
lcottercertinia merged commit 8bab909 into certinia:main Jul 23, 2026
7 checks passed
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