Conversation
|
raymondjacobson
left a comment
There was a problem hiding this comment.
I don't know if this data is going to be high quality enough
| }) => { | ||
| const { user_id, name, handle, follower_count } = user | ||
| const { trackEvent } = useAnalytics() | ||
| const isMobile = typeof window !== 'undefined' && window.innerWidth < 768 |
There was a problem hiding this comment.
don't we have helpers for this?
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| }) => { | ||
| const { user_id, name, handle, follower_count } = user | ||
| const { trackEvent } = useAnalytics() | ||
| const isMobile = typeof window !== 'undefined' && window.innerWidth < 768 |
There was a problem hiding this comment.
Inconsistent mobile detection bypasses existing helper hook
Medium Severity
UserArtCard determines isMobile via window.innerWidth < 768, while the sibling components TrackArtCard and CollectionArtCard in the same directory both use the useIsMobile hook (which checks the user agent via useSsrContext). These two approaches can produce different results, meaning the source field in EXPLORE_SECTION_CLICK analytics events could be inconsistent across card types for the same user. The reviewer also flagged this in the PR discussion.
| const handleClick = useCallback(() => { | ||
| onTrackClick() | ||
| onClick() | ||
| }, [onClick, onTrackClick]) |
There was a problem hiding this comment.
Unused onTrackClick prop adds dead code complexity
Low Severity
The new onTrackClick prop on QuickSearchPresetButton is always passed as () => {} (a no-op). A handleClick wrapper was added to call both onTrackClick and onClick, but since all analytics tracking already lives inside handleClickPreset (passed as onClick), the entire onTrackClick plumbing — the prop, the wrapper callback, and the no-op — is dead code that adds unnecessary indirection.


We should analyze usage here and pair back explore page to what's working. helps simplify and improve performance
Note
Low Risk
Adds new analytics events and lightweight tracking hooks around existing explore components; main risk is noisy/duplicate telemetry if view detection triggers unexpectedly.
Overview
Adds Explore analytics events (
Name.EXPLORE_SECTION_VIEW/Name.EXPLORE_SECTION_CLICK) and a typedExploreSectionNameunion inpackages/common/src/models/Analytics.ts.Wires section impression tracking into web explore carousels and mobile explore sections by replacing
useDeferredElementusage with newuseExploreSectionTrackinghooks that emit a view event when a section enters the viewport.Adds click tracking for explore interactions (mood selections, quick search presets, and track/playlist/profile card navigation) by emitting
Explore: Section Clickwith section, source (web/mobile), and optionalid/kind/linkmetadata.Written by Cursor Bugbot for commit 16b8b26. This will update automatically on new commits. Configure here.