Test
|
1c244a85eb
|
refactor: extract hooks and components from NoteListInner for code health
Split NoteListInner (190 lines, 14 props) into focused units:
- useNoteListSort: sort state, migration, type frontmatter persistence
- useNoteListSearch: search/query state and toggle
- useMultiSelectKeyboard: keyboard shortcuts for bulk actions
- useModifiedFilesState: modified file tracking and status resolution
- NoteListHeader: 52px header bar with sort, search, and create
Also extracted pure helpers (handleEscapeKey, handleSelectAllKey,
handleBulkActionKey, resolveEmptyText, deriveEffectiveSort, etc.)
to reduce cyclomatic complexity in remaining functions.
NoteListInner body: 190 → 48 lines. CodeScene health: 8.54 → 9.36.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-05 16:50:42 +01:00 |
|