Fix Flutter frames chart freeze after switching screens - #9960
Open
khanak0509 wants to merge 3 commits into
Open
Fix Flutter frames chart freeze after switching screens#9960khanak0509 wants to merge 3 commits into
khanak0509 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements auto-scrolling to the live edge of the Flutter frames chart when there is no selected frame, ensuring the chart docks correctly on initial layout and when remounting the performance pane. It also adds comprehensive widget tests to verify this behavior. The reviewer identified a potential edge case where a narrow layout or initial layout pass could result in a negative chart width, leading to an incorrect scroll offset, and suggested clamping the calculated width to a minimum of 0.0.
…r_frames/flutter_frames_chart.dart Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.
issue #9525
This PR fixes issue #9525 where the Flutter frames timeline occasionally looked frozen after switching to another screen and coming back. Frames were still being recorded in the background, but the chart remounted at the oldest frames and only auto-scrolled if it was already at the bottom — so the live ones were off to the right and it felt stuck until a full DevTools reload.
How I fixed it:
Basically, when the chart remounts with no frame selected, it now docks to the live edge instead of starting at offset 0, and snaps after the first layout so live follow keeps working.
before ->
before.mov
after ->
after.mov
Pre-launch Checklist
General checklist
///).Issues checklist
contributions-welcomeorgood-first-issuelabel.contributions-welcomeorgood-first-issuelabel. I understand this means my PR might take longer to be reviewed.Tests checklist
AI-tooling checklist
Feature-change checklist
release-notes-not-requiredlabel or left a comment requesting the label be added.packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.If you need help, consider asking for help on Discord.