Le problème : la route POST /api/agents/run-for-note bloquait le thread
HTTP pendant toute la durée de génération (2-5 min), provoquant un
spinner infini sans résultat.
Solution :
- POST retourne immédiatement avec { agentId } et lance executeAgent
en arrière-plan (fire-and-forget, sans await)
- GET /api/agents/run-for-note?agentId= retourne le statut de la
dernière agentAction (running | success | failure) + canvasId/noteId
- Le client poll le statut toutes les 3 secondes jusqu'au résultat,
le toast persistant Sonner se met à jour automatiquement
- Cleanup du polling au démontage du composant
Co-authored-by: Cursor <cursoragent@cursor.com>
- Remplace git pull par git fetch + git reset --hard origin/main dans
le workflow CI pour éviter les conflits avec les fichiers locaux
- Ajoute un toast Sonner persistant (duration: Infinity) dès le clic sur
Générer, qui survit à la navigation et se met à jour en succès/erreur
avec action directe (Télécharger / Ouvrir)
Co-authored-by: Cursor <cursoragent@cursor.com>
- Nouveau endpoint POST /api/agents/run-for-note : crée un agent one-shot
(slide-generator ou excalidraw-generator) avec la note courante comme source
et l'exécute immédiatement
- ContextualAIChat : prop noteId + section "Générer depuis cette note" avec
deux boutons gradient (violet=slides, cyan=diagramme), spinner pendant la
génération, bouton de téléchargement .pptx ou lien "Ouvrir dans le Lab"
après succès
- note-editor.tsx : passage de note.id à ContextualAIChat
- i18n fr/en : nouvelles clés ai.generate.*
Co-authored-by: Cursor <cursoragent@cursor.com>
pptxgenjs sur Node.js ne peut pas charger les URLs qui nécessitent une auth
ou des cookies. On fetch maintenant chaque imageUrl côté serveur et on la
convertit en data URI base64 avant d'appeler buildPresentation.
Si le fetch échoue (timeout 8s, 4xx/5xx), l'imageUrl est supprimée et
le placeholder texte s'affiche à la place.
Co-authored-by: Cursor <cursoragent@cursor.com>
Slide generator (generate_pptx):
- Pivot vers génération PowerPoint natif (pptxgenjs) au lieu de Reveal.js HTML
- 4 nouveaux layouts diagramme : timeline, process, comparison, metrics
- 2 nouveaux layouts image : image-content (texte + image), image-full (plein cadre)
- Redesign visuel de tous les layouts (cover split, section full-bleed, header band)
- Palettes corrigées : bg blanc sur toutes les palettes, contrastes réels
- fit:shrink systématique sur tous les textes pour éviter les débordements
- Extraction automatique des images des notes (Markdown/HTML) et injection dans le prompt IA
- Prompt IA renforcé : impose "style" et "theme" explicitement dans le JSON, impose ≥2 layouts diagramme
- Fix overlap timeline : zones de texte calculées sans collision avec les cercles
- Notification agent mise à jour : bouton download .pptx au lieu d'ouvrir HTML
Excalidraw generator:
- Layout Dagre/ELK pour graphes auto-positionnés
- Styles visuels : coloré, austère, sketch-plus (Virgil font)
- Zones/containers pour architecture-cloud
- Sanitisation du graphe et métriques de qualité de layout
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add GripVertical handle (visible on hover) as reorder affordance
- Rows are now draggable; uses 'application/x-notebook' dataTransfer type
to coexist with existing note-to-notebook drag ('text/plain')
- Drop indicator: thin primary-colored line above the insertion target
- Dragged item fades to 40% opacity during drag
- On drop: calls updateNotebookOrderOptimistic → POST /api/notebooks/reorder → persisted in DB
- draggingNbRef (useRef) used for stale-closure-safe detection in dragover handler
In production (Docker/Next.js standalone), getAllNotes() can return cached results
when called immediately after createNote(skipRevalidation:true). This caused newly
created notes to disappear after the cache reload overwrote the optimistic local state.
Fix: remove triggerRefresh() from both handleCreateNote (NotesTabsView) and
handleNoteCreated (HomeClient). The note is already added optimistically to local
state and does not need a server round-trip.
- NoteHistoryModal: remove window.location.reload(), use onRestored(restored) callback
- NotesTabsView: revert sync derivation to useEffect, add prevNotesRef to detect
server-side content changes (restore) vs local edits — fixes note disappear bug
and cross-notebook notes appearing after refresh
- NoteInlineEditor key: include updatedAt so restoration remounts editor with fresh content
- note-card: render title/content/labels from note prop directly, not optimisticNote
The useEffect synced local state from props but fired on every keystroke
because onChange updates the parent, which creates a new note prop reference.
This cleared the save timer and isDirty flag before auto-save could fire,
making notes unsavable in tabs view. The key prop with updatedAt already
handles the restore remount case.
- 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
- If /api/ai/convert-markdown fails, abort the type change and show error toast
- Only switch to richtext after successful content conversion
- Switching back to markdown always works (no conversion needed)
- Add i18n keys for conversion success/failure messages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Each theme includes light and dark mode variants with carefully tuned
oklch colors for foreground, card, borders, sidebar, and all UI elements.
Total: 10 named themes + dark mode + auto (system preference).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>