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:
@@ -190,6 +190,9 @@ CREATE TABLE IF NOT EXISTS user_notes (
|
||||
);
|
||||
|
||||
ALTER TABLE user_notes ADD COLUMN IF NOT EXISTS sort_order INT NOT NULL DEFAULT 0;
|
||||
ALTER TABLE user_notes ADD COLUMN IF NOT EXISTS ai_status VARCHAR(20) NOT NULL DEFAULT 'none';
|
||||
CREATE INDEX IF NOT EXISTS idx_user_notes_pending ON user_notes(ai_status, id) WHERE ai_status = 'pending';
|
||||
INSERT INTO settings (key, value) VALUES ('notes_ai_enabled', 'true') ON CONFLICT (key) DO NOTHING;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS api_keys (
|
||||
id SERIAL PRIMARY KEY,
|
||||
|
||||
Reference in New Issue
Block a user