[DevTools] Update inspected element on component filter changes#404
Closed
everettbu wants to merge 1 commit into
Closed
[DevTools] Update inspected element on component filter changes#404everettbu wants to merge 1 commit into
everettbu wants to merge 1 commit into
Conversation
everettbu
marked this pull request as ready for review
January 22, 2026 15:17
Greptile SummaryUpdated inspected element behavior to respond to component filter changes. When filters are updated, the code now attempts to select a closer match for the currently selected host element by re-calling
Confidence Score: 4/5
Important Files Changed
|
|
|
||
| // Due to the component filters changing, we might be able | ||
| // to select a closer match for the currently selected host element. | ||
| // The store will already select a suitable parent if the the current |
There was a problem hiding this comment.
syntax: typo: "the the" should be "the"
Suggested change
| // The store will already select a suitable parent if the the current | |
| // The store will already select a suitable parent if the current |
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/react-devtools-shared/src/backend/agent.js
Line: 1092:1092
Comment:
**syntax:** typo: "the the" should be "the"
```suggestion
// The store will already select a suitable parent if the current
```
How can I resolve this? If you propose a fix, please make it concise.
Author
|
Upstream PR was closed or merged. Code is synced via branch mirror. |
everettbu
deleted the
sebbie/01-22-_devtools_update_inspected_element_on_component_filter_changes
branch
January 26, 2026 10:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror of facebook/react#35599
Original author: eps1lon
Summary
We used to only update the inspected element when selected host element changes. This is fine when Components and the browser's Elements panel are alternate. With the inspected element pane you can now have the inspected element and browsers Elements panel side-by-side.
Now we update the inspected element when the filter changes. This is mostly interestiny when the filter becomes less restrictive i.e. we can inspect an element closer to the selected host element. When the filter becomes more restrictive, the store was already selecting the nearest parent.
The new behavior may be disorienting if you're in the Components panel so we could restrict the behavior to apply only when you're changing filter from within the inspected elements pane within the browsers Elements panel.
CleanShot.2026-01-22.at.14.54.22.mp4
How did you test this change?