fix(log-viewer): keep timeline text crisp when display scaling changes - #1065
Merged
lcottercertinia merged 3 commits intoSep 17, 2026
Merged
Conversation
The flame chart, governor strip and minimap read devicePixelRatio once at load, so their text stayed at the old ratio after a scaling change or a move to a monitor with a different scale factor, until the log was reopened. Read the ratio on every resize and add it to the skip guard, so a resize that changes only the resolution still applies. Watch for ratio changes, which resize nothing and so never reach the resize observer, and re-measure there rather than replaying a stale size. Key the minimap's cached static texture on resolution too, or the skyline, markers and axis keep the old one.
Drop the zero guard in the ratio handler: FlameChart is the only IResizable and already rejects a width or height of zero. Cut the tests to the three that fail without a fix, and drop the comments the code already says.
lcottercertinia
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 PR Overview
The flame chart, governor strip and minimap each read
devicePixelRatioonce, when their PIXI app is created. If the ratio changes afterwards — Windows display scaling moving between 125% and 150%, or the window moving to a monitor with a different scale factor — the canvases keep the resolution they were built at, so their text is upscaled and reads blurred until the log is reopened.This makes the timeline follow the ratio instead of sampling it once.
🛠️ Changes made
devicePixelRatioonce perFlameChart.resizeand pass that one value to all three renderers, so they cannot land on different ratios.resize's skip guard. A ratio change leaves the box identical, so without this the existing "geometry unchanged" fast path returned before touching any renderer.TimelineResizeHandler. No DOM event reports one, so a media query bound to the current ratio is re-made each time it stops matching.🧩 Type of change (check all applicable)
🔗 Related Issues
None — found while checking the timeline's rendering on a scaling change.
✅ Tests added?
Three behaviours, each checked to fail without its fix by breaking that fix on its own:
FlameChartResize.test.ts— a resize where only the ratio moved still applies.TimelineResizeHandler.test.ts— the watcher binds to the ratio in force, and on a change re-renders the re-measured box and re-arms on the new ratio. A second test covers teardown.MinimapStaticTexture.test.ts— the cached texture is rebuilt when only the ratio moved.📚 Docs updated?
🧪badge — see RELEASING.md)Anything else we need to know? [optional]
Verified in the extension development host: with the ratio change reproduced,
devicePixelRatioand the canvas backing-store ratio now move together.The legacy timeline (
features/timeline/services/Timeline.ts) has the same bug and is not fixed here — itsdpris set once at module load and thedpr ??= …at line 491 can never re-fire. It is reachable through thetimeline.legacysetting. Happy to follow up separately.One remaining ceiling this does not own: the shared bitmap font is built at a fixed 2x (
TextLabelRenderer.ts), so at ratio 3 labels still upscale from a 2x atlas.