Skip to content

Conversation

@JonasBa
Copy link
Member

@JonasBa JonasBa commented Jan 14, 2026

Applies the flex codemod to files owned by @getsentry/machine-learning-ai.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 14, 2026
@JonasBa JonasBa marked this pull request as ready for review January 14, 2026 20:12
@JonasBa JonasBa requested a review from a team as a code owner January 14, 2026 20:12
Comment on lines +135 to +137
export function BlocksContainer(props: StackProps<'div'>) {
return <Stack flex="1" overflowY="auto" {...props} />;
}
Copy link

Choose a reason for hiding this comment

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

Bug: The BlocksContainer component is missing React.forwardRef, preventing a ref from being passed to the underlying Stack component, which will cause a runtime error.
Severity: CRITICAL

Suggested Fix

Wrap the BlocksContainer component with React.forwardRef to ensure the ref is correctly forwarded to the Stack component. For example: export const BlocksContainer = React.forwardRef((props, ref) => <Stack ref={ref} {...props} />);

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: static/app/views/seerExplorer/panelContainers.tsx#L135-L137

Potential issue: The `BlocksContainer` component is a standard function component that
receives a `ref`. However, it does not use `React.forwardRef` to pass this `ref` to the
underlying `Stack` component. As a result, the `scrollContainerRef` in
`explorerPanel.tsx` will have a `current` value of `null`. Subsequent attempts to access
properties like `scrollTop` and `scrollHeight` or call methods like `addEventListener`
and `scrollIntoView` on `scrollContainerRef.current` will lead to a runtime error,
crashing the panel.

Did we get this right? 👍 / 👎 to inform future reviews.

@JonasBa JonasBa merged commit a666510 into master Jan 15, 2026
54 checks passed
@JonasBa JonasBa deleted the codemod-migration/getsentry-machine-learning-ai branch January 15, 2026 18:10
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.

3 participants