fix: detect memo/forwardRef/HOC components missing from scan outlines…#428
fix: detect memo/forwardRef/HOC components missing from scan outlines…#428Yashwantha24 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| } | ||
| // devtools may set displayName on the wrapper object itself | ||
| return (type as { displayName?: string }).displayName || null; | ||
| } |
There was a problem hiding this comment.
Nested memo/forwardRef wrappers return null in outlines
Medium Severity
getFiberName fails to resolve names for memo(forwardRef(Component)), a common React pattern. In the MemoComponentTag branch, type.type is the forwardRef wrapper object (not a function), so the typeof inner === 'function' check fails and the function falls through to type.displayName || null. The actual component function at type.type.render is never examined. In outlineFiber, there's no fallback — unlike instrumentation.ts which falls back to getDisplayName(type) — so these components are silently dropped from scan outlines.
Additional Locations (1)
| } from 'bippy'; | ||
| import { isValidElement } from 'preact'; | ||
| import { isEqual } from '~core/utils'; | ||
| import { getFiberName } from '~core/utils'; |


… (Issue #252)
Note
Medium Risk
Touches core instrumentation and outline generation to change how fibers are identified/named; mistakes could drop/rename components or slightly increase overhead during commit traversal.
Overview
Fixes missing components in scan outlines/render logs by improving how component names are resolved for
React.memo,React.forwardRef, and HOC wrappers.Adds
getFiberName(fiber)and uses it in both instrumentation (componentName) andoutlineFiber, plus adjusts traversal to fall back fromgetType()to wrapperfiber.typeobjects so anonymous wrappers aren’t skipped.Written by Cursor Bugbot for commit 707d569. This will update automatically on new commits. Configure here.