Commit Graph

44 Commits

Author SHA1 Message Date
Sepehr Ramezani
c4c8f6a417 fix(memory-echo): feedback-adjusted thresholds and remove duplicate close button
- Thumbs down now increases the similarity threshold by +0.15 for the
  notes involved, making it harder for irrelevant connections to reappear
- Thumbs up slightly lowers the threshold by -0.05, boosting similar
  future connections
- Remove duplicate close button in ComparisonModal (kept only the
  native Dialog close button)
- Normalize all embeddings to same model/dimension (2560) to fix
  random similarity scores caused by mixed embedding models

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-19 22:23:29 +02:00
Sepehr Ramezani
389f85937a fix(memory-echo): fix broken AI provider config and auto-generate missing embeddings
- Fix critical bug: used prisma.systemConfig.findFirst() which returned
  a single {key,value} record instead of the full config object needed
  by getAIProvider(). Replaced with getSystemConfig() that returns all
  config as a proper Record<string,string>.
- Add ensureEmbeddings() to auto-generate embeddings for notes that
  lack them before searching for connections. This fixes the case where
  notes created without an AI provider configured never got embeddings,
  making Memory Echo silently return zero connections.
- Restore demo mode polling (15s interval after dismiss) in the
  notification component.
- Integrate ComparisonModal and FusionModal in the notification card
  with merge button for direct note fusion from the notification.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-19 22:05:19 +02:00
Sepehr Ramezani
25529a24b8 refactor(ux): consolidate BMAD skills, update design system, and clean up Prisma generated client 2026-04-19 19:21:27 +02:00
Sepehr Ramezani
5296c4da2c fix(agents): badge "Nouveau" disparaît après modification de l'agent
Compare createdAt et updatedAt au lieu du seuil de 24h.
Prisma met à jour updatedAt automatiquement à chaque édition.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-19 15:13:43 +02:00
Sepehr Ramezani
5c63dfdd0c feat(agents): add search/filter, "New" badge, and duplicate name resolution
- Add search bar with real-time filtering on agent name and description
- Add type filter chips (All, Veilleur, Chercheur, Surveillant, Personnalisé)
- Add "New" badge on agents created within the last 24h (hydration-safe)
- Auto-increment template names on duplicate install (e.g. "Veille Tech 2")
- Add i18n keys for new UI elements in both fr and en locales

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-19 15:11:32 +02:00
Sepehr Ramezani
08ab0d1a1e fix(rtl): remplacer les propriétés physiques par logiques pour le support RTL
La sidebar et le lab header utilisaient border-r, pr-4, ml-2, ml-auto
au lieu des propriétés logiques CSS (border-e, pe-4, ms-2, ms-auto).
En mode RTL (persan/arabe), ces propriétés physiques ne s'inversent pas,
ce qui causait la sidebar à basculer du mauvais côté lors de la
navigation vers Lab/Excalidraw.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-19 10:01:10 +02:00
Sepehr Ramezani
c5b495c03f fix(agents): empêcher le déplacement des cartes lors du toggle
Le tri par `updatedAt` provoquait un saut de position quand on toggait
un agent car Prisma mettait à jour `updatedAt` automatiquement.

- Tri stable par `createdAt` au lieu de `updatedAt`
- Mise à jour optimiste locale via `onToggle` au lieu d'un re-fetch complet
- Rollback automatique en cas d'erreur serveur
- Désactivation du bouton toggle pendant l'opération (anti double-clic)
- Suppression du `revalidatePath` superflu dans `toggleAgent`

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-18 19:18:49 +02:00
Sepehr Ramezani
f822a6eb18 fix: corriger 4 erreurs console post-migration RSC
- Hydration mismatch @dnd-kit: ajouter id="notes-tabs-dnd" et id="masonry-dnd"
  aux DndContext pour éviter les IDs auto-incrémentaux non-déterministes
  (DndDescribedBy-0 server vs DndDescribedBy-3 client)
- setState in render: refactorer handleDragEnd dans MasonryGrid — remplacer
  le double setLocalNotes() par arrayMove direct + ref pour la persistance
  (évite Cannot update Router while rendering MasonryGrid)
- DialogTitle manquant: ajouter DialogHeader+DialogTitle sr-only dans le
  loading state de AutoLabelSuggestionDialog (Radix accessibility requirement)
- Ajouter useRef pour tracker localNotes sans capturer de stale closure
2026-04-17 21:49:13 +02:00
Sepehr Ramezani
cb8bcd13ba perf: Phase 1+2+3 — Turbopack, Prisma select, RSC page, CSS masonry + dnd-kit
- Turbopack activé (dev: next dev --turbopack)
- NOTE_LIST_SELECT: exclut embedding (~6KB/note) des requêtes de liste
- getAllNotes/getNotes/getArchivedNotes/getNotesWithReminders optimisés
- searchNotes: filtrage DB-side au lieu de full-scan JS en mémoire
- getAllNotes: requêtes ownNotes + sharedNotes parallélisées avec Promise.all
- syncLabels: upsert en transaction () vs N boucles séquentielles
- app/(main)/page.tsx converti en Server Component (RSC)
- HomeClient: composant client hydraté avec données pré-chargées
- NoteEditor/BatchOrganizationDialog/AutoLabelSuggestionDialog: lazy-loaded avec dynamic()
- MasonryGrid: remplace Muuri par CSS grid auto-fill + @dnd-kit/sortable
- 13 packages supprimés: muuri, web-animations-js, react-masonry-css, react-grid-layout
- next.config.ts nettoyé: suppression webpack override, activation image optimization
2026-04-17 21:39:21 +02:00
Sepehr Ramezani
2eceb32fd4 chore: snapshot before performance optimization 2026-04-17 21:14:43 +02:00
Sepehr Ramezani
b6a548acd8 feat: RTL/i18n, AI translate+undo, no-refresh saves, settings perf
- RTL: force dir=rtl on LabelFilter, NotesViewToggle, LabelManagementDialog
- i18n: add missing keys (notifications, privacy, edit/preview, AI translate/undo)
- Settings pages: convert to Server Components (general, appearance) + loading skeleton
- AI menu: add Translate option (10 languages) + Undo AI button in toolbar
- Fix: saveInline uses REST API instead of Server Action → eliminates all implicit refreshes in list mode
- Fix: NotesTabsView notes sync effect preserves selected note on content changes
- Fix: auto-tag suggestions now filter already-assigned labels
- Fix: color change in card view uses local state (no refresh)
- Fix: nav links use <Link> for prefetching (Settings, Admin)
- Fix: suppress duplicate label suggestions already on note
- Route: add /api/ai/translate endpoint
2026-04-15 23:48:28 +02:00
Sepehr Ramezani
39671c6472 fix(keep-notes): sidebar chevron, labels sync, batch org errors, perf guards
- Notebooks: chevron visible when expanded (remove overflow clip), functional expand state
- Labels: sync/cleanup by notebookId, reconcile after note move
- Settings: refresh notebooks after cleanup; label dialog routing
- ConnectionsBadge lazy-load; reminder check persistence; i18n keys

Made-with: Cursor
2026-04-13 22:07:09 +02:00
Sepehr Ramezani
fa7e166f3e feat: add reminders page, BMad skills upgrade, MCP server refactor
- Add reminders page with navigation support
- Upgrade BMad builder module to skills-based architecture
- Refactor MCP server: extract tools and auth into separate modules
- Add connections cache, custom AI provider support
- Update prisma schema and generated client
- Various UI/UX improvements and i18n updates
- Add service worker for PWA support

Made-with: Cursor
2026-04-13 21:02:53 +02:00
Sepehr Ramezani
18ed116e0d perf: eliminate N+1 getNoteAllUsers calls and merge loadSettings+loadNotes to fix double-render cascade
- Skip getNoteAllUsers server action for for own notes (majority of notes), Only fetch collaborators for shared notes.
- Merge loadSettings and loadNotes into single useEffect to prevent double loadNotes trigger when showRecentNotes state changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-01 22:27:29 +02:00
Sepehr Ramezani
377f0c739f fix: disable mobile drag, replace window.location.reload with router.refresh, use semantic icons
- Disable Muuri drag on mobile devices to prevent scroll conflicts
- Replace all remaining window.location.reload() with router.refresh() in settings/data, settings/general, and note-editor
- Replace duplicate X icons with semantic icons (Trash2 for fused badge, LogOut for leave share)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-01 21:34:22 +02:00
Sepehr Ramezani
8f35bac56f fix(perf): remove redundant router.refresh() calls from note-card.tsx
Remove 5 unnecessary router.refresh() calls in optimistic update handlers
(togglePin, toggleArchive, handleColorChange, handleCheckItem, handleRemoveFusedBadge).
These handlers already use addOptimisticNote() for instant UI feedback and
the server actions call revalidatePath('/') for cache invalidation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-01 21:13:01 +02:00
Sepehr Ramezani
df088510be fix(sidebar): remove footer links (Privacy, Terms, Open Source)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-29 22:26:10 +02:00
Sepehr Ramezani
806f4c4eeb fix(sidebar): eliminate full page reloads and fix notebook actions visibility
- Fix createNotebookOptimistic to call loadNotebooks() + triggerRefresh()
  after POST, so new notebooks appear immediately without page reload
- Remove window.location.reload() from delete-notebook-dialog (context
  already handles state refresh)
- Rewrite edit-notebook-dialog to use updateNotebook() from context
  instead of raw fetch + full page reload
- Fix NoteRefreshContext: remove refreshKey from useCallback deps to
  prevent unstable triggerRefresh callback cascade
- Fix notebook actions menu visibility: consolidate NotebookActions and
  expand button into single positioned container with proper z-index
- Add actions menu to active/selected notebook (was previously missing)
- Use proper Notebook type instead of any in sidebar components
- Increase button pr-20 to pr-24 to reserve space for actions
- Remove redundant router.refresh() from create-notebook-dialog

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-29 22:23:25 +02:00
Sepehr Ramezani
8daf50ac3f fix: i18n system overhaul and sidebar UI bugs
- Fix LanguageProvider: add RTL support (ar/fa), translation caching,
  prevent blank flash during load, browser language detection
- Fix detect-user-language: extend whitelist from 5 to all 15 languages
- Remove hardcoded initialLanguage="fr" from auth layout
- Complete fr.json translation (all sections translated from English)
- Add missing admin.ai keys to all 13 non-English locales
- Translate ai.autoLabels, ai.batchOrganization, memoryEcho sections
  for all locales
- Remove duplicate top-level autoLabels/batchOrganization from en.json
- Fix notebook creation: replace window.location.reload() with
  createNotebookOptimistic + router.refresh()
- Fix notebook name truncation in sidebar with min-w-0
- Remove redundant router.refresh() after note creation in page.tsx

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-29 22:14:05 +02:00
Sepehr Ramezani
9eb3bd912a feat(ai): localize AI features 2026-02-15 17:38:16 +01:00
Sepehr Ramezani
8f9031f076 fix: update masonry grid sizing logic and notebook list padding 2026-02-14 14:20:32 +01:00
a0ffc9043b Améliorations UX: grille masonry et composants de notes 2026-02-01 09:29:09 +01:00
4a1b60e575 Fix syntax error and finalize robust note resizing 2026-01-24 20:02:38 +01:00
8e35780717 Attempt to fix note resizing with React keys and Muuri sync 2026-01-24 19:52:13 +01:00
d59ec592eb fix(grid): repair muuri drag&drop and visual styles
- Fix Muuri integration: add data-draggable and improve DOM sync
- Fix Drag Visuals: remove opacity/rotation/scale in NoteCard and CSS to prevent 'gray/crooked' look
- Feat(layout): switch to padding-based spacing strategy (16px gap)
- Fix(css): correct media queries to maintain consistent spacing
2026-01-24 17:53:40 +01:00
ddb67ba9e5 fix: unify theme system - fix theme switching persistence
- Unified localStorage key to 'theme-preference' across all components
- Fixed header.tsx using wrong localStorage key ('theme' instead of 'theme-preference')
- Added localStorage hybrid persistence for instant theme changes
- Removed router.refresh() which was causing stale data revert
- Replaced Blue theme with Sepia
- Consolidated auth() calls to prevent race conditions
- Updated UserSettingsData types to include all themes
2026-01-18 22:33:41 +01:00
ef60dafd73 WIP: Améliorations UX et corrections de bugs avant création des épiques 2026-01-17 11:10:50 +01:00
1cbada87f4 fix: prevent toasts from blocking UI interaction
CRITICAL FIX: Toast notifications were blocking all UI interaction,
requiring a page refresh (F5) to click buttons again.

Root cause: The [data-sonner-toaster] container was capturing all
pointer events, preventing clicks on the page underneath.

Solution:
- Added CSS: pointer-events: none on [data-sonner-toaster]
- Added CSS: pointer-events: auto on [data-sonner-toast]
- This allows the toast itself to be interactive (buttons, close)
- But lets clicks pass through to the page underneath

After this fix, users can continue working immediately after
a toast appears without refreshing the page.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 23:20:27 +01:00
8617117dec fix: remove Ollama default fallbacks in factory and Docker
ROOT CAUSE: The factory was defaulting to 'ollama' when no provider
was configured, and docker-compose.yml was always setting OLLAMA_BASE_URL
even when using OpenAI. This caused the app to try connecting to Ollama
even when OpenAI was configured in the admin.

CRITICAL CHANGES:
1. lib/ai/factory.ts - Removed 'ollama' default fallback
   - getTagsProvider() now throws error if AI_PROVIDER_TAGS not set
   - getEmbeddingsProvider() now throws error if AI_PROVIDER_EMBEDDING not set
   - Forces explicit configuration instead of silent fallback to Ollama

2. docker-compose.yml - Removed default OLLAMA_BASE_URL
   - Changed: OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://ollama:11434}
   - To: OLLAMA_BASE_URL=${OLLAMA_BASE_URL}
   - Only set if explicitly defined in .env.docker

3. Application name: Mento → Memento (correct spelling)
   - Updated in: sidebar, README, deploy.sh, DOCKER_DEPLOYMENT.md

4. app/api/ai/config/route.ts - Return 'not set' instead of 'ollama'
   - Makes it clear when provider is not configured

IMPACT: The app will now properly use OpenAI when configured in the
admin interface, instead of silently falling back to Ollama.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 23:08:20 +01:00
58e486c68e fix: rename application from Keep to Mento in UI and docs
- Update sidebar.tsx to display "Mento" instead of "Keep"
- Update README.md title from "Keep Notes" to "Mento"
- Update DOCKER_DEPLOYMENT.md references to "Mento"
- Update deploy.sh script comments to use "Mento"
- Add DOCKER-SETUP.md with Docker configuration guide

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 22:37:38 +01:00
4fa418438f fix: display notebook icons correctly instead of icon names
Fixes issue where notebook dropdown showed icon name (e.g., "folder")
instead of the actual icon component.

Problem:
- note-card.tsx was displaying {notebook.icon} as text
- Users saw "folder", "book", etc. instead of icons

Solution:
- Import Lucide icon components (Folder, Book, Briefcase, etc.)
- Add ICON_MAP matching icon names to components
- Use getNotebookIcon() function to resolve icon name to component
- Render component as <NotebookIcon className="h-4 w-4 mr-2" />

Changes:
- components/note-card.tsx:
  - Add LucideIcon and icon imports
  - Add ICON_MAP and getNotebookIcon() helper
  - Update notebook dropdown to render icon components

Result:
✓ Notebook icons now display correctly in dropdown menu
✓ Consistent with notebooks-list.tsx implementation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 22:02:31 +01:00
9428631570 fix: remove unused CreateLabelDialog import from notebooks-list 2026-01-12 00:00:11 +01:00
da77adc4b1 chore: sync changes 2026-01-11 23:52:53 +01:00
7fb486c9a4 feat: Complete internationalization and code cleanup
## Translation Files
- Add 11 new language files (es, de, pt, ru, zh, ja, ko, ar, hi, nl, pl)
- Add 100+ missing translation keys across all 15 languages
- New sections: notebook, pagination, ai.batchOrganization, ai.autoLabels
- Update nav section with workspace, quickAccess, myLibrary keys

## Component Updates
- Update 15+ components to use translation keys instead of hardcoded text
- Components: notebook dialogs, sidebar, header, note-input, ghost-tags, etc.
- Replace 80+ hardcoded English/French strings with t() calls
- Ensure consistent UI across all supported languages

## Code Quality
- Remove 77+ console.log statements from codebase
- Clean up API routes, components, hooks, and services
- Keep only essential error handling (no debugging logs)

## UI/UX Improvements
- Update Keep logo to yellow post-it style (from-yellow-400 to-amber-500)
- Change selection colors to #FEF3C6 (notebooks) and #EFB162 (nav items)
- Make "+" button permanently visible in notebooks section
- Fix grammar and syntax errors in multiple components

## Bug Fixes
- Fix JSON syntax errors in it.json, nl.json, pl.json, zh.json
- Fix syntax errors in notebook-suggestion-toast.tsx
- Fix syntax errors in use-auto-tagging.ts
- Fix syntax errors in paragraph-refactor.service.ts
- Fix duplicate "fusion" section in nl.json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Ou une version plus courte si vous préférez :

feat(i18n): Add 15 languages, remove logs, update UI components

- Create 11 new translation files (es, de, pt, ru, zh, ja, ko, ar, hi, nl, pl)
- Add 100+ translation keys: notebook, pagination, AI features
- Update 15+ components to use translations (80+ strings)
- Remove 77+ console.log statements from codebase
- Fix JSON syntax errors in 4 translation files
- Fix component syntax errors (toast, hooks, services)
- Update logo to yellow post-it style
- Change selection colors (#FEF3C6, #EFB162)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 22:26:13 +01:00
fc2c40249e feat: AI provider testing page + multi-provider support + UX design spec
- Add AI Provider Testing page (/admin/ai-test) with Tags and Embeddings tests
- Add new AI providers: CustomOpenAI, DeepSeek, OpenRouter
- Add API routes for AI config, models listing, and testing endpoints
- Add UX Design Specification document for Phase 1 MVP AI
- Add PRD Phase 1 MVP AI planning document
- Update admin settings and sidebar navigation
- Fix AI factory for multi-provider support
2026-01-10 11:23:22 +01:00
640fcb26f7 fix: improve note interactions and markdown LaTeX support
## Bug Fixes

### Note Card Actions
- Fix broken size change functionality (missing state declaration)
- Implement React 19 useOptimistic for instant UI feedback
- Add startTransition for non-blocking updates
- Ensure smooth animations without page refresh
- All note actions now work: pin, archive, color, size, checklist

### Markdown LaTeX Rendering
- Add remark-math and rehype-katex plugins
- Support inline equations with dollar sign syntax
- Support block equations with double dollar sign syntax
- Import KaTeX CSS for proper styling
- Equations now render correctly instead of showing raw LaTeX

## Technical Details

- Replace undefined currentNote references with optimistic state
- Add optimistic updates before server actions for instant feedback
- Use router.refresh() in transitions for smart cache invalidation
- Install remark-math, rehype-katex, and katex packages

## Testing

- Build passes successfully with no TypeScript errors
- Dev server hot-reloads changes correctly
2026-01-09 22:13:49 +01:00
3c4b9d6176 feat(ai): implement intelligent auto-tagging system
- Added multi-provider AI infrastructure (OpenAI/Ollama)
- Implemented real-time tag suggestions with debounced analysis
- Created AI diagnostics and database maintenance tools in Settings
- Added automated garbage collection for orphan labels
- Refined UX with deterministic color hashing and interactive ghost tags
2026-01-08 22:59:52 +01:00
15a95fb319 Add BMAD framework, authentication, and new features 2026-01-08 21:23:23 +01:00
dfa88c5b63 feat: implement label management with color filtering 2026-01-04 22:47:54 +01:00
a154192410 Fix tests and add changelog 2026-01-04 21:33:10 +01:00
f0b41572bc feat: Memento avec dates, Markdown, reminders et auth
Tests Playwright validés :
- Création de notes: OK
- Modification titre: OK
- Modification contenu: OK
- Markdown éditable avec preview: OK

Fonctionnalités:
- date-fns: dates relatives sur cards
- react-markdown + remark-gfm
- Markdown avec toggle edit/preview
- Recherche améliorée (titre/contenu/labels/checkItems)
- Reminder recurrence/location (schema)
- NextAuth.js + User/Account/Session
- userId dans Note (optionnel)
- 4 migrations créées

Ready for production + auth integration
2026-01-04 16:04:24 +01:00
2de2958b7a feat: Replace alert() with professional toast notification system
- Remove buggy Undo/Redo that saved character-by-character
- Simplify state to plain useState like Google Keep
- Create toast component with success/error/warning/info types
- Toast notifications auto-dismiss after 3s with smooth animations
- Add ToastProvider in layout
- Remove all JavaScript alert() calls
- Production-ready notification system
2026-01-04 14:36:15 +01:00
8d95f34fcc fix: Add debounced Undo/Redo system to avoid character-by-character history
- Add debounced state updates for title and content (500ms delay)
- Immediate UI updates with delayed history saving
- Prevent one-letter-per-undo issue
- Add cleanup for debounce timers on unmount
2026-01-04 14:28:11 +01:00
355ffb59bb feat: Add robust Undo/Redo system and improve note input
- Implement useUndoRedo hook with proper state management (max 50 history)
- Add Undo/Redo buttons with keyboard shortcuts (Ctrl+Z/Ctrl+Y)
- Fix image upload with proper sizing (max-w-full max-h-96 object-contain)
- Add image validation (type and 5MB size limit)
- Implement reminder system with date validation
- Add comprehensive input validation with user-friendly error messages
- Improve error handling with try-catch blocks
- Add MCP-GUIDE.md with complete MCP documentation and examples

Breaking changes: None
Production ready: Yes
2026-01-04 14:22:36 +01:00