Luca Rossi
375e370a9e
refactor: decompose Editor.tsx, NoteList.tsx, Sidebar.tsx — CodeScene hotspots (#126)
* refactor: decompose Editor.tsx into focused subcomponents and hooks
Extract from the monolithic Editor component (cc=35, 213 LoC, score 7.82):
- useDiffMode hook: diff state + toggle/commit-diff handlers
- useEditorFocus hook: new-note focus event listener
- editorSchema: WikiLink spec + BlockNote schema (module-level)
- SingleEditorView: BlockNote editor + suggestion menus
- EditorContent: breadcrumb bar + diff/editor/loading views
- EditorRightPanel: AI chat / Inspector panel switching
- suggestionEnrichment util: shared enrichment logic (eliminates duplication)
Editor.tsx is now 10.0 code health (was 7.82). All 25 existing tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: extract standalone functions from NoteList and Sidebar to reduce cc
NoteList: extract createNoteStatusResolver and toggleSetMember from
NoteListInner (cc 13→8, score 9.04→9.38).
Sidebar: extract applyCustomization from Sidebar (cc 10→7, score 9.09→10.0).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test: add tests for useDiffMode, useEditorFocus, and suggestionEnrichment
Cover extracted hook/utility logic: diff toggle/reset, editor focus event
listener with adaptive timing, and suggestion item enrichment pipeline.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: update architecture for editor decomposition and write .claude-done
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-27 15:27:25 +01:00
..
2026-02-22 12:02:19 +01:00
2026-02-22 10:11:52 +01:00
2026-02-22 14:06:51 +01:00
2026-02-25 19:05:24 +00:00
2026-02-25 18:30:20 +01:00
2026-02-25 18:39:12 +00:00
2026-02-26 20:14:46 +01:00
2026-02-26 20:14:46 +01:00
2026-02-26 19:50:29 +00:00
2026-02-25 18:39:12 +00:00
2026-02-23 23:08:09 +01:00
2026-02-24 12:46:19 +01:00
2026-02-25 16:09:50 +00:00
2026-02-27 15:27:25 +01:00
2026-02-27 15:27:25 +01:00
2026-02-25 21:43:16 +01:00
2026-02-27 15:27:25 +01:00
2026-02-27 15:27:25 +01:00
2026-02-24 23:15:37 +01:00
2026-02-24 23:15:37 +01:00
2026-02-27 06:14:28 +00:00
2026-02-26 19:50:29 +00:00
2026-02-22 11:00:07 +01:00
2026-02-25 13:31:19 +01:00
2026-02-24 00:09:58 +01:00
2026-02-24 00:09:58 +01:00
2026-02-26 19:50:29 +00:00
2026-02-22 14:06:51 +01:00
2026-02-22 14:10:42 +01:00
2026-02-25 19:05:24 +00:00
2026-02-25 19:05:24 +00:00
2026-02-27 14:14:21 +00:00
2026-02-25 18:39:12 +00:00
2026-02-25 18:39:12 +00:00
2026-02-27 13:11:31 +00:00
2026-02-27 13:11:31 +00:00
2026-02-26 19:50:29 +00:00
2026-02-26 17:43:29 +00:00
2026-02-23 19:53:36 +01:00
2026-02-23 19:53:36 +01:00
2026-02-21 16:37:00 +01:00
2026-02-26 00:55:16 +00:00
2026-02-26 00:55:16 +00:00
2026-02-26 19:50:29 +00:00
2026-02-25 00:01:52 +01:00
2026-02-16 08:04:06 +01:00
2026-02-26 12:40:27 +00:00
2026-02-23 10:50:36 +00:00
2026-02-23 10:50:36 +00:00
2026-02-27 13:11:31 +00:00
2026-02-27 13:11:31 +00:00
2026-02-25 13:31:19 +01:00
2026-02-23 08:36:07 +01:00
2026-02-25 19:05:24 +00:00