Context
PR #61 adds FileEditorPane.tsx with a CodeMirror 6 editor.
Issue
The editor creation useEffect has an eslint-disable-next-line react-hooks/exhaustive-deps suppression (line ~566) because filePath and setPaneDirty are intentionally omitted from the dependency array — the editor should not be recreated when those change.
This is correct behavior, but there's no comment explaining why these deps are excluded. Future developers may mistakenly "fix" this by adding them back, causing the editor to remount on every dirty state change.
Suggested fix
Add a brief comment above the disable:
// filePath and setPaneDirty intentionally omitted — editor instance must persist
// across dirty state changes. Recreating would lose cursor position and undo history.
// eslint-disable-next-line react-hooks/exhaustive-deps
From PR #61 review.
Context
PR #61 adds
FileEditorPane.tsxwith a CodeMirror 6 editor.Issue
The editor creation
useEffecthas aneslint-disable-next-line react-hooks/exhaustive-depssuppression (line ~566) becausefilePathandsetPaneDirtyare intentionally omitted from the dependency array — the editor should not be recreated when those change.This is correct behavior, but there's no comment explaining why these deps are excluded. Future developers may mistakenly "fix" this by adding them back, causing the editor to remount on every dirty state change.
Suggested fix
Add a brief comment above the disable:
From PR #61 review.