Skip to content

[DevTools] Fix: Trace Updates incorrectly highlights components when filtered parent re-mounts them#35618

Open
youaresoyoung wants to merge 1 commit intofacebook:mainfrom
youaresoyoung:fix/devtools-include-filtered-fiber
Open

[DevTools] Fix: Trace Updates incorrectly highlights components when filtered parent re-mounts them#35618
youaresoyoung wants to merge 1 commit intofacebook:mainfrom
youaresoyoung:fix/devtools-include-filtered-fiber

Conversation

@youaresoyoung
Copy link
Copy Markdown

Summary

Bug:
When "Hide DOM nodes" filter is enabled, updating a sibling component incorrectly highlights unrelated components that share a filtered parent.

Root Cause:
didFiberRender() only checks the PerformedWork flag but doesn't verify if the fiber is a mount vs update. When DevTools re-mounts components after their filtered parent changes, they have PerformedWork=true + alternate=null causing them to be incorrectly marked as "rendered".

Fix:
Add alternate check in didFiberRender(). If alternate === null, the fiber is a mount (not an update) and should not be highlighted in trace updates.


Before

before.mov

After

after.mov

@meta-cla meta-cla Bot added the CLA Signed label Jan 23, 2026
@youaresoyoung youaresoyoung changed the title [DevTools] Trace Updates incorrectly highlights components when filtered parent re-mounts them [DevTools] Fix: Trace Updates incorrectly highlights components when filtered parent re-mounts them Jan 23, 2026
Copy link
Copy Markdown

@Credok12 Credok12 left a comment

Choose a reason for hiding this comment

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

🙂

@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions Bot added the Resolution: Stale Automatically closed due to inactivity label Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Resolution: Stale Automatically closed due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants