Skip to content

fix(crons): Move OnboardingPanelHook definition to module scope#120029

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/crons-static-component-definitions
Open

fix(crons): Move OnboardingPanelHook definition to module scope#120029
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/crons-static-component-definitions

Conversation

@sentry

@sentry sentry Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

The OnboardingPanelHook component was being defined inside the CronsLandingPanel render function using OverrideOrDefault. This meant that a new component type was created on every render, which causes React to unmount and remount the component's subtree, leading to state loss and preventing React Compiler optimizations.

This change moves the OverrideOrDefault call for OnboardingPanelHook and its defaultComponent (now DefaultOnboardingPanel) to module scope. This ensures that OnboardingPanelHook has a stable identity across renders, resolving the static-component-definitions violation and allowing for proper React Compiler optimization.

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-36S

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:54
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 19, 2026
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.

1 participant