notes: AI titles for new notes, personal-only access, modal polish

- new note created without a title gets one generated by a background
  worker (createNoteTitleWorker, ai_status column, wake channel,
  notes_changed SSE event, settings toggle notes_ai_enabled)
- notes are strictly personal: list/update/delete/reorder always scoped
  to req.user.id, admin no longer sees other users' notes (403)
- notes modal: focus goes to the text body, random color for new notes,
  ctrl+enter hint, tags hint styling, empty-title 400 fix (optText)
- backup/restore: user_notes.ai_status normalized and restored
This commit is contained in:
dev
2026-10-08 21:47:37 +03:00
parent f226c3f144
commit b5d1fd0948
10 changed files with 427 additions and 34 deletions
+5
View File
@@ -97,6 +97,11 @@ const ACTION_LABELS = {
'feedback.update': 'Изменён отзыв',
'feedback.ai.run': 'ИИ сформировал отзыв',
'feedback.ai.error': 'Ошибка ИИ при формировании отзыва',
'note.reorder': 'Изменён порядок заметок',
'note.delete': 'Удалена заметка',
'note.ai.title': 'ИИ придумал заголовок заметки',
'note.ai.error': 'Ошибка ИИ при генерации заголовка заметки',
'note.ai.retry': 'ИИ повторил генерацию заголовка заметки',
};
const AUDIT_PAGE_SIZE = 50;