Close open uploads, image-proxy SSRF, fail-open AI quotas in production,
auth gaps on app routes, and MCP tenant isolation issues.
Co-authored-by: Cursor <cursoragent@cursor.com>
1. replaceAll (Find & Replace) — une seule transaction ProseMirror
au lieu d'un forEach cassé. Tous les matchs sont maintenant remplacés.
2. Link Preview unwrap — deleteNode() au lieu de clearer les attrs
qui laissaient un nœud fantôme invisible dans le document.
3. Conversion Markdown → richtext — breaks: true dans marked.parse()
Les simple newlines sont maintenant convertis en <br>.
+ préserve les blocs custom (toggle, callout, math, columns,
outline, link-preview) en commentaires HTML lors de l'export MD.
4. emitNoteChange exercices — shape corrigée (type:'created' attend
un objet Note, pas noteId/notebookId séparés).
5. Raccourcis clavier sans conflit :
Cmd+Shift+C → Cmd+Alt+C (callout, avant: copier)
Cmd+Shift+O → Cmd+Alt+O (outline, avant: historique/signets)
Cmd+Shift+L → Cmd+Alt+L (colonnes, avant: lock screen macOS)
- applyTag faisait un PATCH sur /api/notes/[id]/properties avec { tags: [...] }
mais l'API properties attend { properties: { propId: value } }
- Maintenant: PATCH /api/ai/organize-notebook qui appelle syncNoteLabels()
- Les tags sont appliqués comme LABELS (système existant) sur les notes
- Merge avec labels existants (n'écrase pas)
- AI Overview : synthèse IA en haut des résultats de recherche (Ctrl+K)
- Service search-overview.service.ts
- Endpoint /api/ai/search-overview
- Carte 'Réponse IA' avec Sparkles en haut du panneau gauche
- Pur additif, ne modifie pas le classement des résultats
- AI Writer inline : slash menu → 'Écrire avec l'IA' → champ inline
- Mode 'write' dans paragraph-refactor.service.ts
- Streaming paragraphe par paragraphe (120ms delay)
- Nettoyage HTML (espaces vides supprimés)
- Ref synchrone pour éviter fermeture du menu pendant la frappe
- Fix: index slashCommands AI Writer corrigé
- Fix: Loader2 import manquant
- i18n FR/EN
- Mode 'write' ajouté à paragraph-refactor.service.ts
- Endpoint /api/ai/reformulate étendu (option 'write' + writePrompt)
- UI : champ de prompt inline apparaît au curseur après slash menu
- Tape / → 'Écrire avec l'IA' → décrit ce que tu veux → Entrée
- L'IA génère et insère le contenu à la position du curseur
- Pas de migration DB, réutilise l'infra existante
- i18n FR/EN
- Service notebook-organizer.service.ts : analyse IA des notes
- Endpoint /api/ai/organize-notebook
- Dialog avec 4 sections :
1. Résumé de l'état du carnet
2. Tags suggérés (cliquable pour appliquer)
3. Regroupements logiques par catégorie
4. Détection de doublons avec explication
- Bouton 'Organiser' (Wand2) dans la barre du carnet
- i18n FR/EN complet
- Complète les 3 scénarios : Prof (wizard+exercices), Étudiant (wizard+planning), Ingénieur (organisateur)
- Menu déroulant GraduationCap : Flashcards + Exercices réunis
- Fix: language non défini dans toolbar (useLanguage destructuring)
- Fix: équations 658071 → KaTeX dans exercices (preprocessMathInHtml partagé)
- lib/text/math-preprocess.ts : utilitaire partagé wizard + exercices
- Toast avec bouton 'Voir' pour rafraîchir après création exercices
- emitNoteChange pour rafraîchir la liste
- i18n FR/EN
- Générateur d'exercices déplacé du menu ⋯ vers le panneau IA (onglet Actions > Outils de génération)
- Même design que les cartes slides/diagrammes
- Fix: import useLanguage supprimé de la route API (hook client en serveur)
- i18n FR/EN
- Générateur d'exercices : bouton dans menu note → IA crée 5 exercices
- Niveaux variés (facile/moyen/difficile) avec emojis 🟢🟡🔴
- Corrigés détaillés dans des toggles (cliquer pour révéler)
- Callout warning pour le niveau
- Notes créées dans le même carnet
- Planning de révision : bouton dans barre carnet → IA crée planning
- Choix date d'examen
- Répétition espacée (première lecture → revoir → révision globale)
- Rappels automatiques ajoutés aux notes (9h le jour J)
- Vue chronologique avec activités et notes par jour
- Services : exercise-generator.service.ts + study-planner.service.ts
- Endpoints : /api/ai/generate-exercises + /api/ai/study-plan
- i18n FR/EN complet
- Wizard IA: création de carnet complet (étudiant/prof/ingénieur)
- 3 profils, choix niveau, nombre de notes (3-12)
- Étapes numérotées, messages de progression, écran de succès
- Notes riches avec callouts, toggles, équations, colonnes
- Structured View auto-créé avec propriétés Statut/Difficulté
- Embeddings en arrière-plan
- Export PDF: clone le DOM réel, rend KaTeX, préserve couleurs callouts
- Fix: boutons toggle/callout en hover-only
- Fix: parsing JSON robuste (backslashes LaTeX)
- Fix: flushSync warning (queueMicrotask)
- Fix: drag handle clamp viewport
- Bouton wizard dans la sidebar (✨ à côté du +)
- i18n FR/EN complet
- 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>
Livre US-FLASHCARDS avec decks, session de révision, stats et migration Prisma. Finalise le Web Clipper (i18n 15 langues) et corrige les erreurs ESLint bloquant la CI.
Co-authored-by: Cursor <cursoragent@cursor.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>
Use getChatProvider() + provider.getModel() instead of
resolveAiRouteWithTiming which doesn't return a provider function.
Follow the pattern used in chat/insights/route.ts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The AI router only supports lanes: 'chat', 'tags', 'embedding'.
'suggest-charts' was not a valid lane causing 500 errors.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add step-by-step console logging in API route
- Show actual error message in dialog
- Add debug info section
- Wrap each section in try-catch to isolate failure point
- Remove conflicting tool approach, use direct JSON
- Add fallback: extract numbers from regex if AI fails
- Add debug section to show what content was analyzed
- Be more lenient: any 2+ numbers = valid chart
- Better error messages
- Add console logging for debugging
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1. Script warning in layout.tsx
- Use Next.js Script component instead of plain <script>
2. QUOTA_EXCEEDED bug for chart suggestions
- Add 'suggest_charts' to VALID_FEATURES
- Add 'suggest_charts' to TIER_LIMITS for all tiers
- Fix route to use 'suggest_charts' instead of invalid 'ai' feature
This fixes the issue where users with valid credit were getting
QUOTA_EXCEEDED errors because 'ai' was not a valid feature name.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add quotaExceeded flag to response for better error UX
- Show dedicated quota exceeded state with upgrade button
- Improve AI prompt to better detect data patterns
- Add chart type-specific colors (blue, indigo, emerald, violet, etc.)
- Replace generic primary/10 colors with varied accent colors
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Implement slash command "/suggest-charts" that analyzes note content
and suggests 3 appropriate chart types with visual previews.
Created:
- chart-suggestion.tool.ts: AI tool for data extraction and chart recommendations
- suggest-charts/route.ts: API endpoint for chart suggestions
- chart-suggestion.service.ts: Frontend service layer
- chart-suggestions-dialog.tsx: Modal with 3 chart proposals and thumbnails
- tiptap-chart-extension.tsx: TipTap Node extension for rendering chart blocks
Modified:
- rich-text-editor.tsx: Added slash command, toolbar button, and dialog integration
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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>
Google OAuth was implemented locally but never deployed; the login button
only renders when AUTH_GOOGLE_ID and AUTH_GOOGLE_SECRET are set. Also
restores /api/ai/test-* endpoints removed by mistake and wires Google
credentials into deploy workflows.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Sidebar: dynamic brand-accent colors, brainstorm section restyled
- AI chat general: popup panel with expand/collapse, hides when contextual AI open
- AI chat contextual: tabs reordered (Actions first), X close button, height fix
- Settings: all tabs restyled, 6 new color presets (sage, terracotta, iron, etc.)
- Global color cleanup: emerald/orange hardcoded → brand-accent dynamic
- Brainstorm page: orange → brand-accent throughout
- PageEntry animation component added to key pages
- Floating AI button: bg-brand-accent instead of hardcoded black
- i18n: all 15 locales updated with new AI/billing keys
- Billing: freemium quota tracking, BYOK, stripe subscription scaffolding
- Admin: integrated into new design
- AGENTS.md + CLAUDE.md project rules added
- Redesign agents page with architectural-grid (8) design system:
rounded-2xl cards, serif headings, motion tabs, dashed templates section
- Replace agent form popup with full-page detail view (SettingsView style)
with dark planning card, section tooltips, and help button
- Hide advanced mode for slide/excalidraw generators
- Add 'describe images' action to contextual AI assistant
- Add copy button to action/resource preview with HTTP fallback
- Add delete history button to agent run log panel
- Increase AI word limit from 2000 to 5000 (reformulate + transform-markdown)
- Increase max steps slider from 25 to 50
- Fix image description error with clear model compatibility message
- Fix doubled execution count display in agent detail view
- Remove dead files: notes-list-view.tsx, notes-view-toggle.tsx
- Remove 'list' view mode from NotesViewMode type
- Add missing i18n keys (back, configuration, options, copy, cleared)
- Agent-created notes are now type 'markdown' by default (raw markdown content)
- Switching note type from markdown → richtext auto-converts content to HTML
via /api/ai/convert-markdown endpoint using the existing markdownToHtml utility
- Users can freely switch between markdown and richtext in the note type selector
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Same fix as reformulate — raise limit from 500 to 2000 and use i18n
error keys instead of hardcoded English messages.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Raise MAX_WORDS from 500 to 2000 for text reformulation
- Error messages now use i18n keys (ai.wordCountMin/Max) instead of
hardcoded English strings
- Client translates server errors using the user's UI language
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add image description service + API route for AI-powered image analysis
- Image title generation returns 3 selectable suggestions via TitleSuggestions component
- Add "Describe images" action in AI assistant (individual + collective)
- Fix pin refresh propagation in card and tabs view
- Fix note creation refresh in tabs mode, pass all notes to tabs view
- Add RTL support (dir="auto") on note content elements
- Pass UI language dynamically to AI endpoints instead of hardcoded 'fr'
- Add 18 missing i18n keys in both en.json and fr.json
- Sparkles button on images for AI title generation (bottom-right, pulse animation)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Commit untracked 20260428150000_add_note_history migration (creates
NoteHistory table + noteHistory column) that was causing 500s in prod
- Exclude static files (.json, .svg, .ico, etc.) from auth middleware
to fix manifest.json 403
- Add console.error to echo API routes for production debug visibility
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Log key points in /api/ai/tags and ContextualAutoTagService to trace
where label suggestions fail: notebook lookup, AI raw response,
JSON parsing, filtered results.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Use prisma.$transaction in auto-label-creation.service with tx client
- Fix DELETE /api/labels to properly JSON.parse + disconnect labelRelations
- Fix PUT /api/labels rename to handle JSON labels
- Graceful error handling in /api/ai/tags and /api/ai/auto-labels
- Client-side label-deleted event in home-client, notes-tabs-view, label-management-dialog
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>
- app/api/ai/tags/route.ts: getAIProvider → getTagsProvider (was using
embedding model instead of tags model for legacy tag generation)
- lib/ai/services/auto-label-creation.service.ts: same fix
- hooks/use-auto-tagging.ts: remove notebookId gate that blocked all
suggestions in "General Notes" — the API has a legacy path for this
- app/actions/admin-settings.ts: revalidateTag → updateTag (Next.js 16
requires 2 args for revalidateTag)
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