Skip to content

ref(performance): Remove browserHistory usages from some performance views#112554

Merged
shashjar merged 1 commit intomasterfrom
remove-browserHistory-performance-views
Apr 9, 2026
Merged

ref(performance): Remove browserHistory usages from some performance views#112554
shashjar merged 1 commit intomasterfrom
remove-browserHistory-performance-views

Conversation

@shashjar
Copy link
Copy Markdown
Member

@shashjar shashjar commented Apr 8, 2026

https://github.com/getsentry/frontend-tsc/issues/78

Removes browserHistory usages from some performance views.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 8, 2026
@shashjar shashjar requested a review from a team April 9, 2026 16:32
@shashjar shashjar marked this pull request as ready for review April 9, 2026 16:32
@shashjar shashjar requested a review from a team as a code owner April 9, 2026 16:32
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5de2dd9. Configure here.

},
})
}),
{replace: true}
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.

Missing preventScrollReset in replace navigation causes scroll regression

Medium Severity

The redirectToPerformanceHomepage function passes {replace: true} to navigate but omits preventScrollReset: true. The old browserHistory.replace shim explicitly included preventScrollReset: true with a comment noting that useNavigate replace does not automatically prevent scroll reset, and that this was needed to replicate react-router 3 behavior. This causes a behavioral regression where the scroll position resets to the top when redirecting to the performance homepage.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5de2dd9. Configure here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems reasonable if true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i feel like we'd want to reset scroll on redirect?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

^ i think it's fine to reset scroll if we're going to a completely different page

Copy link
Copy Markdown
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

Makes sense! Is that comment by Cursor accurate?

},
})
}),
{replace: true}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems reasonable if true

@shashjar shashjar merged commit 9bb8da6 into master Apr 9, 2026
66 checks passed
@shashjar shashjar deleted the remove-browserHistory-performance-views branch April 9, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants