Skip to content

fix(feedbackModal): Resolve static-component-definitions violation#120041

Open
sentry[bot] wants to merge 2 commits into
masterfrom
seer/fix/feedback-modal-static-components-fWtUXi
Open

fix(feedbackModal): Resolve static-component-definitions violation#120041
sentry[bot] wants to merge 2 commits into
masterfrom
seer/fix/feedback-modal-static-components-fWtUXi

Conversation

@sentry

@sentry sentry Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

This PR addresses the static-component-definitions React Compiler diagnostic in feedbackModal.tsx.

The ModalHeader, ModalBody, and ModalFooter components were previously defined using useCallback within the FeedbackModal's render function. This pattern causes React to treat them as new components on each render, leading to state loss and blocking compiler optimizations.

To fix this, these components have been extracted to module scope. Their dynamic dependencies (such as Header, Body, Footer from ModalRenderProps, closeModal, handleSubmit, isSelfHosted, isScreenSmall, and state) are now provided via a new FeedbackModalContext. This ensures the components have stable identities across renders while still receiving necessary dynamic data.

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-355

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

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 94.00% 94.00% ±0%
Typed 136,101 136,109 🟢 +8
Untyped 8,686 8,688 🔴 +2
🔍 2 new type safety issues introduced

any-typed symbols (2 new)

File Line Detail
static/app/components/featureFeedback/feedbackModal.tsx 132 Footer (var(binding))
static/app/components/featureFeedback/feedbackModal.tsx 178 Body (var(binding))

This is informational only and does not block the PR.

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