Skip to content

Do not crash on timeline hover/selection when a profile doesn't have any samples or markers#5086

Merged
canova merged 3 commits into
firefox-devtools:mainfrom
canova:fix-empty-timeline
Aug 20, 2024
Merged

Do not crash on timeline hover/selection when a profile doesn't have any samples or markers#5086
canova merged 3 commits into
firefox-devtools:mainfrom
canova:fix-empty-timeline

Conversation

@canova

@canova canova commented Aug 19, 2024

Copy link
Copy Markdown
Member

This fixes #5037.

It was happening because we were trying to find the timestamp of the hovered mouse location. Also I noticed that the same thing happens when we try to select a time range in an empty timeline. This should fix both of the issues.

Right before I was publishing this PR, I also noticed that when you upload an empty profile the home page also crashes because it tries to calculate the range too in the published profiles list. So I fixed that one as well.

Deploy preview / Production

@codecov

codecov Bot commented Aug 19, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.49%. Comparing base (de99cf0) to head (a0e7e20).
Report is 4 commits behind head on main.

Files Patch % Lines
src/components/app/ListOfPublishedProfiles.js 50.00% 1 Missing ⚠️
src/components/timeline/Selection.js 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5086      +/-   ##
==========================================
- Coverage   88.49%   88.49%   -0.01%     
==========================================
  Files         304      304              
  Lines       27463    27470       +7     
  Branches     7430     7433       +3     
==========================================
+ Hits        24303    24309       +6     
- Misses       2935     2936       +1     
  Partials      225      225              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@julienw julienw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread src/components/app/ListOfPublishedProfiles.js
Comment thread src/components/timeline/Selection.js Outdated
@canova canova force-pushed the fix-empty-timeline branch 2 times, most recently from 0abf794 to 6901b41 Compare August 20, 2024 10:53
@canova canova force-pushed the fix-empty-timeline branch from 6901b41 to a0e7e20 Compare August 20, 2024 10:58
@canova canova merged commit 8fa9241 into firefox-devtools:main Aug 20, 2024
@canova canova deleted the fix-empty-timeline branch August 20, 2024 11:29
@canova canova mentioned this pull request Sep 5, 2024
canova added a commit that referenced this pull request Sep 5, 2024
[Tatsuyuki Ish] Fix type error in getPagesMap (#5063)
[Nazım Can Altınova] [Tab selector 1] Add a redux state for the tab
filter (#5072)
[Markus Stange] Remove a test for the inverted stack chart. (#5075)
[Markus Stange] Add an inverted tree test for getSamplesSelectedStates
and getTreeOrderComparator (#5076)
[Nazım Can Altınova] [Tab selector 2] Extract the page data in the full
view (#5073)
[Nazım Can Altınova] Do not crash on timeline hover/selection when a
profile doesn't have any samples or markers (#5086)
[Nazım Can Altınova] [Tab selector 3] Generate page information for all
tabs (#5082)
[Nazım Can Altınova] [Tab selector 4] Add a getTabToThreadIndexesMap
selector to get relevant threads per tab (#5087)
[joshuaobrien] Use the word 'archive' instead of 'zip file' in copy
(#5081)
[Markus Stange] Send a UserAgent header to the symbolication server
again (#5103)
[Julien Wajsberg] Add some console utilities to retrieve the current
profile and save it to disk (#5105)
[Nazım Can Altınova]  Add `selectedMarker` to the console APIs (#5107)
And various dependency updates.
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.

An error occurred in Firefox Profiler

2 participants