Flush unsaved editor content to disk before any trash or archive operation (both single-note and bulk) so body edits are never silently dropped when only frontmatter is updated. - Add flushEditorContent utility that checks pending content ref, then falls back to comparing tab content with last-saved state - Add onBeforeAction callback to useEntryActions, called before handleTrashNote and handleArchiveNote - Wire flushBeforeAction in App.tsx using refs for stable closures - Add error handling in useBulkActions so one failed save doesn't block remaining notes - Extract findOrCreateType helper to reduce useEntryActions complexity - Export persistContent from useSaveNote for reuse Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
945 B
945 B