Closed Bug 1849996 Opened 2 years ago Closed 2 years ago

History shows multiple entries for results view on a single visit

Categories

(Testing :: PerfCompare, defect, P3)

Default
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sumairqaisar992, Unassigned)

References

Details

(Whiteboard: [pcf])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

Steps to reproduce:

  • Go on Search View
  • Select revisions to compare
  • Click Compare
  • The user is redirected to the Results View
  • Right click on the back button

Actual results:

Actual behavior: ~12 pages for PerfCompare - Results appear in the history list

Expected results:

Expected behavior: page PerfCompare - Search to appear in the history list

Whiteboard: [pcf]

The severity field is not set for this bug.
:carla, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(csevere)
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(csevere)
Priority: -- → P3

I think this happens because of the navigate in https://github.com/mozilla/perfcompare/blob/6ebe8691fdd1955e9040b8e8370a74104ac0b952/src/components/Search/SelectedRevisionItem.tsx#L69-L79

It is called when selectedRevisions changes. And indeed selectedRevisions changes when loading the page, because of the code in https://github.com/mozilla/perfcompare/blob/6ebe8691fdd1955e9040b8e8370a74104ac0b952/src/components/CompareResults/ResultsView.tsx#L81-L92

It changes repeatidly (I believe at least once for each rev, if not more), and also I believe then it navigates once for each item present because navigate is present at the item level.

I'm not sure what the solution is yet. Also I'm a bit confused by this code so this analysis might not be 100% correct.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.