Skip to content

fix(coding-conventions): Move OverrideOrDefault component definition to module scope in AccountClose#120027

Merged
TkDodo merged 1 commit into
masterfrom
seer/fix-static-component-account-close
Jul 20, 2026
Merged

fix(coding-conventions): Move OverrideOrDefault component definition to module scope in AccountClose#120027
TkDodo merged 1 commit into
masterfrom
seer/fix-static-component-account-close

Conversation

@sentry

@sentry sentry Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

This PR addresses a static-component-definitions coding convention violation in static/app/views/settings/account/accountClose.tsx.

The HookedCustomConfirmAccountClose component was being defined inside the AccountClose functional component's render scope using OverrideOrDefault. This caused a new component type to be created on every render, leading to unstable component identity, state resets, and preventing React Compiler optimizations.

To fix this, the OverrideOrDefault call that defines HookedCustomConfirmAccountClose has been moved to module scope. This ensures the component type is created only once when the module loads, providing a stable reference across all renders of AccountClose.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes CODING-CONVENTIONS-35C

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@sentry
sentry Bot requested a review from a team as a code owner July 19, 2026 19:01
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 19, 2026
@TkDodo TkDodo added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Jul 20, 2026
@TkDodo
TkDodo enabled auto-merge (squash) July 20, 2026 09:39
@TkDodo
TkDodo merged commit 8446758 into master Jul 20, 2026
86 of 87 checks passed
@TkDodo
TkDodo deleted the seer/fix-static-component-account-close branch July 20, 2026 09:40
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 Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants