Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Jan 15, 2026

Summary

Adds an empty dependency array [] to the useEffect at 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:

useEffect(() => {
  const editorInstance = internalEditorRef.current?.editor ?? null;
  if (editorInstance !== editor) {
    setEditor(editorInstance);
  }
}, []); // Added empty dependency array

Review & Testing Checklist for Human

  • Verify editor state sync behavior: The original code ran on every render to detect ref changes. With [], it only runs on mount. Confirm this doesn't break editor state synchronization when switching between tabs (enhanced/raw/transcript).
  • Test the useCaretNearBottom hook: This hook consumes the editor state - verify caret positioning still works correctly after tab switches.
  • Test tab switching in note-input: Switch between enhanced notes, raw memo, and transcript tabs to ensure the editor reference is properly tracked.

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


Open with Devin

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Jan 15, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 6debf53
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/69684fe134b8f200080ea56e

@netlify
Copy link

netlify bot commented Jan 15, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 6debf53
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69684fe11a66e600080a10c6
😎 Deploy Preview https://deploy-preview-3070--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 15, 2026

Deploy Preview for howto-fix-macos-audio-selection canceled.

Name Link
🔨 Latest commit 6debf53
🔍 Latest deploy log https://app.netlify.com/projects/howto-fix-macos-audio-selection/deploys/69684fe15eab18000895058c

Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a 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

Review with Devin

…on tab switch

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

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.

2 participants