feat(project-details): link to mobile session health#106520
Conversation
Feedback has primarily been from mobile users so far, as such link to mobile session health instead
| settingsLink: <Link to={`/settings/${orgId}/projects/${projectSlug}/`} />, | ||
| sessionHealth: ( | ||
| <Link to={`/organizations/${orgId}/insights/frontend/sessions/`} /> | ||
| <Link to={`/organizations/${orgId}/insights/mobile/sessions/`} /> |
There was a problem hiding this comment.
Bug: The link to the sessions page is hardcoded to the 'mobile' view, which will direct users from non-mobile projects to an incorrect and irrelevant dashboard.
Severity: CRITICAL
Suggested Fix
The link should be made platform-aware. It should dynamically construct the URL based on the project's platform, for example by using the project.platform property to select the correct path (e.g., 'frontend', 'mobile'). Alternatively, use a generic sessions endpoint that renders the appropriate view for any platform.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: static/app/views/projectDetail/projectDetail.tsx#L94
Potential issue: The `ProjectDetail` component is used for all project types, including
frontend, mobile, and backend. The change hardcodes the link to the sessions page to
`/organizations/${orgId}/insights/mobile/sessions/`. This creates a bug for non-mobile
projects. For example, a user viewing a frontend project will be incorrectly navigated
to the mobile-specific sessions dashboard, which has a different layout and shows
mobile-specific metrics. This results in a confusing user experience by presenting an
irrelevant view to users of frontend and backend projects.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
This is probably not worth the work, so far almost all the feedback we've received about the project details page banner is from mobile users, who seem to use this page heavily having been let down by other workflows in Sentry (let's fix this!).
Feedback has primarily been from mobile users so far, as such link to mobile session health instead.
Feedback has primarily been from mobile users so far, as such link to mobile session health instead.