react-scan icon indicating copy to clipboard operation
react-scan copied to clipboard

Notification count reliability

Open RobPruzan opened this issue 1 year ago • 2 comments

Because react scan reads from a store that eagerly tracks interactions and FPS drops, FPS drops that are considered severe can be read before it's confirmed the FPS drop is not tied to an interaction.

This is problematic since we have a higher threshold for interactions to be considered "severe" (500ms vs 200ms).

Interactions are always pushed to the store after FPS drops since we must await the performance api to get extra metadata about the interaction. This sometime causes an unintended flicker state of notification count.

The correct solution is detecting if an interaction is ongoing during the FPS drop, and ignore it while that interaction is not completed.

note: this is not easy because there are going to base cases interactions appear to start but never end because of the nature of how we track interactions

RobPruzan avatar Feb 26 '25 02:02 RobPruzan

Image

More on this, the filter for backgrounded task time logic is broken on github (good reproduction case)

RobPruzan avatar Mar 01 '25 03:03 RobPruzan

It also seems possible to get interactions to get double reported whne using react scan on github long enough. This was a previously fixed bug, but appears to stil exist in edge cases

RobPruzan avatar Mar 01 '25 03:03 RobPruzan