Skip to content

chore(webapp): scope imperative component refs - #4730

Open
carderne wants to merge 1 commit into
fix/react-compiler-ref-statefrom
chore/react-compiler-ref-suppressions-components
Open

chore(webapp): scope imperative component refs#4730
carderne wants to merge 1 commit into
fix/react-compiler-ref-statefrom
chore/react-compiler-ref-suppressions-components

Conversation

@carderne

@carderne carderne commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Scopes React Compiler diagnostics to component and hook statements where refs intentionally coordinate editors, animations, polling, deferred callbacks, and other imperative integrations. Other compiler diagnostics remain active in those components.

@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 324b1ac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ecf70cca-06f1-417b-bc45-e826bcbd5934

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

}, []);

// Compute current save data for the save render prop
// oxlint-disable-next-line react/react-compiler -- This ref intentionally coordinates an imperative integration outside React state.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Suppression masks a genuine render-phase ref read that can render stale/empty query text

These new oxlint-disable comments silence the react-compiler rule for editorRef.current?.getQuery() calls that happen during render (apps/webapp/app/components/query/QueryEditor.tsx:566, :795, :850, :900, :963). Unlike the other sites in this PR (which just assign the latest value to a ref during render — a benign latest-value pattern), these actually read an imperative handle during render: on the first render editorRef.current is null, and afterwards the value is not reactive, so the rendered query prop can lag behind the editor's real content until an unrelated re-render occurs. The fallbacks (?? defaultQuery, ?? "") hide this rather than fix it. Suppressing the rule here removes the only signal pointing at that latent staleness; a follow-up that lifts the query text into state (or passes a getter down) would be preferable.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant