-
Notifications
You must be signed in to change notification settings - Fork 492
fix: add missing dependency array to useEffect in note-input #3070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: add missing dependency array to useEffect in note-input #3070
Conversation
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote-storybook canceled.
|
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for howto-fix-macos-audio-selection canceled.
|
There was a problem hiding this comment.
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
apps/desktop/src/components/main/body/sessions/note-input/index.tsx
Outdated
Show resolved
Hide resolved
…on tab switch Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
Summary
Adds an empty dependency array
[]to theuseEffectat lines 98-103 in the note-input component. The effect was previously running on every render, which is typically incorrect and can cause performance issues.The effect synchronizes the editor instance from a ref to state:
Review & Testing Checklist for Human
[], it only runs on mount. Confirm this doesn't break editor state synchronization when switching between tabs (enhanced/raw/transcript).useCaretNearBottomhook: This hook consumes theeditorstate - verify caret positioning still works correctly after tab switches.Recommended test plan: Open a session, switch between different note tabs (Summary, Memo, Transcript), and verify the editor behaves correctly (focus, caret position, content editing).
Notes