Skip to content

ref(alerts): replace useRouter with specific hooks in alerts projectProvider#110067

Closed
evanpurkhiser wants to merge 31 commits into
masterfrom
evanpurkhiser-remove-userouter-alerts-project-provider
Closed

ref(alerts): replace useRouter with specific hooks in alerts projectProvider#110067
evanpurkhiser wants to merge 31 commits into
masterfrom
evanpurkhiser-remove-userouter-alerts-project-provider

Conversation

@evanpurkhiser

Copy link
Copy Markdown
Member

Part of the React Router 6 cleanup — replaces useRouter() with specific hooks (useNavigate, useLocation, useParams, etc.)

See REACT_ROUTER_6_CLEANUP.md for full context.

Moves the "Test Monitor" button to the Verification section header as a
trailing item, and moves the "Suggest Assertions" button next to the
"+ Add Assertion" button in the assertions field.

Fixes [NEW-763](https://linear.app/getsentry/issue/NEW-763)
@evanpurkhiser evanpurkhiser requested review from a team as code owners March 6, 2026 16:29
@github-actions github-actions Bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Mar 6, 2026
@github-actions

github-actions Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@cursor cursor Bot left a comment

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.

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

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

},
});
{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.

Replace navigations missing preventScrollReset option

Medium Severity

All browserHistory.replace(...)navigate(..., {replace: true}) conversions are missing preventScrollReset: true. The browserHistory.replace shim explicitly adds preventScrollReset: true to replicate react-router 3 behavior (see comment in browserHistory.tsx). Without it, replace navigations may cause unwanted scroll resets. This affects multiple files, but is especially impactful in flamegraphQueryParamSync (fires on every state change) and traceWaterfall (fires on node click), where scroll jumping would be very disruptive.

Additional Locations (2)

Fix in Cursor Fix in Web

@github-actions

github-actions Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/uptime/migrations/0055_backfill_2xx_status_assertion.py

for 0055_backfill_2xx_status_assertion in uptime

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

@evanpurkhiser

Copy link
Copy Markdown
Member Author

Closing to recreate after rebasing onto master

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant