Les imports statiques de chunkIndexingService dans notes.ts et clip/save
causaient un crash du module entier si la table NoteEmbeddingChunk
n'existait pas en production. Maintenant les imports sont dynamiques
( await import() ) avec try-catch — les notes fonctionnent même si
le chunk indexing est indisponible.
- Nouveau bloc Toggle : sections dépliables dans l'éditeur (slash menu + drag handle)
- Transformer un bloc existant en section repliable via le menu d'action
- Boutons désactiver (unwrap) et supprimer dans l'en-tête
- i18n FR/EN complet
- Infrastructure embeddings par fragments (inspiré AppFlowy)
- Table NoteEmbeddingChunk + index HNSW
- Chunking sémantique (~1000 chars, overlap 200, dedup par hash)
- Indexation incrémentale au save (createNote + updateNote + clip)
- Queue concurrence 4, retry backoff exponentiel
- Route /api/ai/tags: supprime l'incrément sur les suggestions (UI only)
→ chaque keystroke (debounce 1.5s) ne consommait plus de quota
- notes.ts: incrément unique quand des labels IA sont réellement appliqués
en background (syncNoteLabels)
- PRO limit: 200 → 500 auto_tag/mois (200 était trop bas)
Avant: écrire une note 5min = ~20 incréments pour UNE note
Après: 1 incrément uniquement si des labels sont effectivement appliqués
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rend les liens entre notes visibles et persistants (sync NoteLink au save, auto-save, graphe réseau rafraîchi), ajoute living blocks, Memory Echo, recherche globale, consentement IA explicite et consolide les prototypes design en architectural-grid.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add slides.tool.ts with support for title, bullets, chart, stats, table, cards, timeline, quote, comparison, equation, image, summary slide types
- Chart types: bar, horizontal-bar, line, donut, radar
- Integrate with agent executor and canvas system
- Add multilingual support (en/fr)
- Various UI improvements and bug fixes
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Toolbar: remove text labels from all icon buttons (AI, Save, Preview, Convert)
all buttons now icon-only with title tooltip for accessibility
- Toolbar: reposition PanelRight (info panel toggle) to far right after three-dot menu
- Versioning: decouple getNoteHistory/restoreNoteVersion from global userAISettings.noteHistory
now checks note.historyEnabled directly — unblocks manual per-note history
- Versioning: add 'Sauvegarder cette version' button in Versions tab of info panel
calls commitNoteHistory with visual feedback (spinner → success state)
- note-document-info-panel: import commitNoteHistory, add isSavingVersion state
- notes.ts: fix double guard that silently blocked all history operations
- Complete rewrite of note-history-modal: version list with inline restore/delete,
split diff view with synced scrolling, rich preview for markdown/richtext/checklist
- Fix restore not updating editor: use key={id-updatedAt} on NoteInlineEditor to
force remount on restore, and add sync useEffect to reset local state on prop changes
- Add sync useEffect in NoteEditor for external note updates
- Add historyEnabled to NOTE_LIST_SELECT (no more 'Activer' on every modal open)
- Replace browser confirm() with shadcn AlertDialog for delete confirmation
- Add i18n keys: currentVersion, compareVersions, diffTitle, diffSelectHint, deleteVersionDesc
- Install diff + @types/diff for visual line diffing
- Fix MasonryGrid render-phase sync to preserve local sizes
- Update notes-tabs-view merge logic for restored note propagation
- Remove debug console.log from restoreNoteVersion
- Add reminder action to NoteActions (masonry view) and NoteMetaSidebar (tabs view)
- NotificationPanel now fetches and displays upcoming/overdue reminders alongside share requests
- Badge count includes overdue reminders; overdue items show mark-as-done toggle
- Sidebar trash count refreshes on NoteRefreshContext trigger (no more manual refresh)
- Add "Clear completed" button on reminders page with clearCompletedReminders action
- Add i18n keys for new features (en/fr)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Chat (AIChat floating widget): conversationId was never captured from
the API response, so every message created a new conversation with no
context. Now creates the conversation upfront before streaming (same
pattern as ChatContainer) so the ID persists across messages.
Note history: was stored globally in UserAISettings, so enabling
history on one note enabled it for ALL notes. Now each Note has its
own historyEnabled boolean field. The "Enable history" action only
affects the specific note. A migration adds the column with default
false.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add noteHistoryMode setting (manual default / auto) with DB migration
- Manual mode: commit button in editor toolbar creates snapshots on demand
- Auto mode: smart snapshots with 20-char diff threshold + 5min cooldown,
structural changes (color, pin, archive, labels) bypass cooldown
- Add delete individual history entries from history modal
- Fix sidebar: Notes nav no longer active on notebook pages
- Fix sidebar icon: replace filled Lightbulb with outlined FileText
- Fix title suggestions: change from amber to sky blue color scheme
- Fix hydration mismatch: add suppressHydrationWarning on locale dates
- Complete i18n: add history, sort, and AI chat translations for all 16 languages
- Translate French AI assistant section (40+ keys) from English to French
- Update README with new features and stack info
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
syncLabels created Labels with original case (e.g. "Projet") but
searched with .toLowerCase() (e.g. "projet"). On PostgreSQL (case-
sensitive), findMany returned [] → labelRelations disconnected →
orphan cleanup deleted ALL notebook labels.
Fix: use Prisma mode:'insensitive' for findFirst and findMany,
deduplicate case-insensitively while preserving original case.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
After syncing a note's labels, detect and delete labels in the same
notebook that are no longer referenced by any note (neither via JSON
nor labelRelations). Prevents phantom labels from accumulating.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Replace broken upsert (nbScope ?? '') with findFirst+create for null notebookId
- Remove aggressive orphan cleanup that deleted notebook labels after save
- Add syncNoteLabels() to update both Note.labels JSON and labelRelations
- Fix createNote, updateNote, auto-labeling to use syncNoteLabels
- Add fallback: suggestFromExistingLabels → suggestNewLabels if empty
- Lower confidence threshold 0.6→0.3, max suggestions 3→5
- Case-insensitive label matching in suggestions
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Security:
- Add auth + file type/size validation to upload API
- Add admin auth to /api/admin/ endpoints
- Add SSRF protection to scrape action
- Whitelist fields in PUT /api/notes/[id] to prevent mass assignment
- Protect /lab, /agents, /chat, /canvas, /notebooks routes in middleware
AI provider fixes:
- Add deepseek/openrouter to factory ProviderType (was silently falling back to ollama)
- Fix title-suggestion.service.ts to use factory instead of hardcoded OpenAI
- Fix getAIProvider→getChatProvider in memory-echo, notebook-summary, agent-executor
- Fix getAIProvider→getTagsProvider in notebook-suggestion, title-suggestions, transform-markdown
Functional bugs:
- Fix ALLOW_REGISTRATION AND→OR logic
- Fix note-editor.tsx passing stale props to useAutoTagging instead of local state
- Fix stale Note.embedding type (migrated to NoteEmbedding table)
- Remove hardcoded SQLite path from prisma.ts
Frontend:
- Add AbortController to useAutoTagging and useTitleSuggestions hooks
- Add error rollback to optimistic UI in note-inline-editor
- Remove stale closure over notebookId/language in useAutoTagging
Cleanup:
- Rename docker-compose from keepnotes→memento
- Remove unused unstable_cache import from config.ts
- Remove dead useUndoRedo hook
- Fix TagSuggestion type (add isNewLabel, reasoning)
- Remove dead AIConfig/AIProviderType types
- Fix ghost-tags unused isEmpty var and as any cast
- Fix note-editor titleSuggestions typed as any[]
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Auto-tagging:
- CRITICAL FIX: contextual-auto-tag.service.ts was calling getAIProvider()
(alias for getEmbeddingsProvider) instead of getTagsProvider(). This meant
auto-tagging used the embeddings provider/model instead of the tags one.
Now correctly uses getTagsProvider() in both suggestFromExistingLabels and
suggestNewLabels methods.
- Pass user's detected language to suggestLabels() for localized prompts
(was hardcoded to 'en')
Email:
- Fix Resend "from" field: pass DB config to sendViaResend() instead of
re-fetching from DB. Uses SMTP_FROM from config, with localhost-aware fallback.
- Add "Sender email" field in admin Resend section so users can set SMTP_FROM
- Save SMTP_FROM when Resend is selected (was only saved for SMTP mode)
- Test email button now saves config to DB BEFORE testing, so unsaved form
values are used (was reading stale DB values)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add interactive setup wizard (scripts/setup-env.js) with SQLite/PostgreSQL
choice, AI provider config, email, MCP, admin account creation, and
auto-switch of Prisma schema provider
- Fix docker-compose.yml: remove duplicate environment entries that overrode
env_file values with empty strings (broke AI providers in Docker). Now only
DATABASE_URL, NODE_ENV, NEXT_TELEMETRY_DISABLED remain in environment:
- Fix revalidateTag('system-config', '/settings') crash: Next.js 16 interprets
the second arg as a cacheLife profile, not a path. Caused 500 on all admin
settings saves
- Fix Resend "from" field: was building noreply@localhost which Resend rejects.
Now uses SMTP_FROM from config, with localhost-aware fallback
- Add debug logging for auto-labeling background task
- Default DATABASE_URL changed from user:password to memento:memento
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove BMAD framework, IDE configs, dev screenshots, test files,
internal docs, and backup files
- Rename keep-notes/ to memento-note/
- Update all references from keep-notes to memento-note
- Add Apache 2.0 license with Commons Clause (non-commercial restriction)
- Add clean .gitignore and .env.docker.example