Skip to content

ref: Remove browserHistory by inlining navigate in upgradeNowModal callers#115755

Merged
ryan953 merged 2 commits into
masterfrom
ryan953/ref/remove-browserhistory-from-upgradenowmodal-utils
May 18, 2026
Merged

ref: Remove browserHistory by inlining navigate in upgradeNowModal callers#115755
ryan953 merged 2 commits into
masterfrom
ryan953/ref/remove-browserhistory-from-upgradenowmodal-utils

Conversation

@ryan953
Copy link
Copy Markdown
Member

@ryan953 ryan953 commented May 18, 2026

Remove the redirectToManage utility and its browserHistory dependency entirely. Each call site now uses useNavigate() directly with a unique referrer string that identifies the specific error context (e.g. profiling_upgrade_modal-update_plan-error), rather than sharing a single generic referrer. Deletes upgradeNowModal/utils.tsx.

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

Change redirectToManage to accept a navigate function parameter instead
of importing browserHistory directly. All callers are React components
and now pass useNavigate() from React Router 6.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.55%

Remove the redirectToManage utility entirely. Each call site now uses
navigate() directly with a unique referrer string that identifies the
specific error context, rather than sharing a single generic referrer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ryan953 ryan953 changed the title ref: Replace browserHistory with useNavigate in upgradeNowModal utils ref: Remove browserHistory by inlining navigate in upgradeNowModal callers May 18, 2026
@ryan953 ryan953 marked this pull request as ready for review May 18, 2026 22:05
@ryan953 ryan953 requested review from a team as code owners May 18, 2026 22:05
Copy link
Copy Markdown
Member

@shashjar shashjar left a comment

Choose a reason for hiding this comment

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

nice

@ryan953 ryan953 merged commit 521c6ec into master May 18, 2026
77 checks passed
@ryan953 ryan953 deleted the ryan953/ref/remove-browserhistory-from-upgradenowmodal-utils branch May 18, 2026 22:43
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.

2 participants