Commit Graph
5 Commits
Author SHA1 Message Date
dev e5526617fe Тема оформления: переключатель дня, ночи и авто-режима 2026-11-28 12:43:21 +03:00
dev 2f8c2da280 feat(notes,profile): trash for notes and personal model connection check
Notes:
- soft delete via deleted_at/purge_at with trashPurgeDays(), restore and
  permanent-delete routes, ?deleted=1 list switch
- GET /api/notes now always returns only own notes (admin included)
- purge user_notes in purgeScheduledDeletions(), skip deleted rows in
  reorder and in the note title worker
- deleted_at/purge_at in init.sql, migration.sql, ensureUserNotesTable(),
  normalizeRestoreData and restore-insert

Profile:
- POST /api/user-settings/models/test probes a personal model from the
  client payload (works before save), shared probeAiModel() with the admin
  profile test, AI_MODEL_TEST_TIMEOUT_MS env in .env.example/compose
- "Проверить" button in the model list and in the model form
- password fields: autocomplete hints, values cleared on every toggle

Notes page: #notesDeleted trash toggle, deleted card state, restore/permanent
actions; fmtTs() uses the global fmtDateTime() instead of the non-existent
window.datetime.
2026-10-17 00:17:00 +03:00
dev b5d1fd0948 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
2026-10-08 21:47:37 +03:00
dev 355feb234b fix(notes): необязательный заголовок, защита от двойного сохранения, Ctrl+Enter 2026-10-08 15:55:44 +03:00
dev ecfa15e35b feat(notes): личные заметки с drag-and-drop сортировкой
- Новая страница notes.html и контроллер public/js/notes.js
- Таблица user_notes (id, user_id, title, note, tags, color, sort_order)
- Сохранение порядка карточек через PUT /api/notes/reorder
- Личные заметки администратора видны всем, тьюторы — только своим
- Поддержка user_notes в бэкапе и восстановлении (backup-restore.js)
- Обновлена документация AGENTS.md
2026-10-08 15:04:06 +03:00