fix: keep host interactions responsive in large apps - #49
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec3f34a9e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (selectedElement.current) setInspection(runtime.inspectElement(selectedElement.current)); | ||
| }), [runtime]); | ||
| useEffect(() => { | ||
| if (!drawerOpen) return; |
There was a problem hiding this comment.
Capture the event that opens the drawer
When a selection opens a previously closed drawer, inspect() creates the inspection snapshot and then calls recordEvent, but this effect returns while drawerOpen is false and cannot subscribe until the next render. Since recordEvent notifies synchronously, that notification is lost, so immediately opening Timeline or exporting the trace omits the newly recorded inspect ... event until an unrelated runtime update refreshes the snapshot. Refresh after recording the event or subscribe early enough to capture it.
AGENTS.md reference: AGENTS.md:L9-L9
Useful? React with 👍 / 👎.
Summary
undefinedrepresentation in exports and sensitive-value handling1.0.0-beta.6Real-app performance
Measured on the same large Vite/React page:
undefinedstrings; 76 available props shown and 5 unavailable props summarizedValidation
pnpm checkpnpm test:e2e:firefoxCloses #48