chore(webapp): scope imperative route refs - #4731
Conversation
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
| // oxlint-disable-next-line react/react-compiler -- This ref intentionally coordinates an imperative route integration outside React state. | ||
| transportRef.current = new TriggerChatTransport({ |
There was a problem hiding this comment.
🔍 Single-line directive may not cover multi-line statements
oxlint-disable-next-line only suppresses diagnostics attributed to the immediately following line. Here the suppressed statement spans lines 279-305 (the new TriggerChatTransport({ ... }) call), and the same pattern is used at apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.playground.$agentParam/route.tsx:358-361 for the multi-line useChat({ ... }) call. If the react/react-compiler diagnostic is reported at an inner location (e.g. the startSession/accessToken arrow functions, or the onFinish callback) rather than the statement's first line, the suppression will not take effect and lint will still fail. Worth verifying with pnpm run lint that the directives actually silence the intended diagnostics rather than being no-ops.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Scopes React Compiler diagnostics to route statements where refs intentionally coordinate virtualized views, live reload state, transport lifecycles, and deferred callbacks. Other compiler diagnostics remain active in those routes.