fix(desktop): simplify chat re-render fix#1286
Conversation
Replace the ref-based workaround for tRPC mutation stability with a simple eslint-disable. Mutations are stable transports that don't need to be reactive dependencies — an eslint suppression is clearer and avoids 4 lines of boilerplate.
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughRefactored ChatInterface.tsx to eliminate mutable ref wrappers for session management mutations. The Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
|
Closing — the ref-based approach in #1283 is actually the better pattern. An eslint-disable suppresses all dep warnings for the effect, which can mask real bugs if someone later adds reactive values inside it. |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
startSessionRef/stopSessionRefref workaround from fix(desktop): fix chat infinite re-render and model selector logo #1283 and replaces it with a simpleeslint-disableon the dependency array.mutate()), so they don't need to be reactive deps — an eslint suppression is clearer than 4 lines of ref boilerplatesessionReadystate improvement from fix(desktop): fix chat infinite re-render and model selector logo #1283Test plan
Summary by CodeRabbit
No user-visible changes in this release. This update includes internal code optimizations to improve maintainability.