Commit Graph

438 Commits

Author SHA1 Message Date
d0387cd9a0 fix: extract images from rich text HTML to enable image description quick action
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 34s
2026-05-02 23:41:46 +02:00
01cf5ccad7 fix: prevent bubble menu from being cut off at the top of notes
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 34s
2026-05-02 23:37:13 +02:00
e4ca7ba497 feat: slash menu navigation, removed gutter button, fixed AI richtext format, added image resize
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
2026-05-02 23:31:40 +02:00
6d6e12ba05 fix: move gutter button fully outside text margin and translate placeholder
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 33s
2026-05-02 22:50:39 +02:00
840a72948b style: make floating gutter button more dynamic and beautiful
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 33s
2026-05-02 22:47:13 +02:00
be8d8cb2ee feat: add floating gutter button (+) to trigger slash menu
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 33s
2026-05-02 22:41:20 +02:00
a44326b62b fix: remove super/subscript from slash menu, restore align cmds, complete i18n in BubbleToolbar
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
2026-05-02 22:35:30 +02:00
045c98924d feat: add superscript/subscript to BubbleMenu + fix slash menu descriptions
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 45s
2026-05-02 22:30:38 +02:00
dfc2e7dc81 fix: reset category on menu reopen + superscript/subscript require text selection
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
2026-05-02 22:26:04 +02:00
df791fc6c7 fix: render slash menu via React Portal under document.body - outside editor DOM hierarchy
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
2026-05-02 22:22:21 +02:00
f7ff2f8dfd fix: slash menu - stopPropagation on mousedown blocks ProseMirror selectionUpdate
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
2026-05-02 22:20:48 +02:00
1bbfb775bc fix: slash menu tabs - use menuInteracting ref to block selectionUpdate during menu clicks
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
2026-05-02 22:18:21 +02:00
e076601275 fix: slash menu tabs stay open (menuRef.contains check) + full i18n support
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
2026-05-02 22:14:57 +02:00
8ef67dcc1f fix: slash menu tabs - prevent editor focus loss on click with onMouseDown preventDefault
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 43s
2026-05-02 22:10:56 +02:00
8e07594ba2 feat: slash menu - category tabs, Tab key navigation, auto-scroll, description search
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 45s
2026-05-02 22:06:30 +02:00
7b9534703c feat: improve slash command menu - new blocks, formatting, IA Note section, premium design
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
2026-05-02 21:55:11 +02:00
bd5391e3f2 fix: simplify note-input toolbar by using compact mode for label, type selector, and ai button
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 45s
2026-05-02 21:45:48 +02:00
dc5f6b77d9 fix: note-input toolbar overflow and rename Assistant IA to IA Note
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 46s
2026-05-02 21:38:56 +02:00
99d0583871 feat: IA Note — rename panel, add Resource tab + chat hover-actions
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
- Renamed 'AI Copilot' / 'Assistant IA' → 'IA Note' everywhere in UI
- Added 3rd 'Ressource' tab in IA Note panel with:
  * Optional URL field that scrapes page text (via new scrapePageText action)
  * Textarea for paste (markdown, HTML, plain text)
  * 3 integration modes: Remplacer / Compléter (AI) / Fusionner (AI)
  * Dual-format preview: Rendu + Markdown brut before applying
- Added hover-actions on assistant chat messages:
  * Remplacer / Compléter / Fusionner appear on hover
  * Triggers same preview/apply flow via resource tab
- New API route: POST /api/ai/enrich-from-resource
  * Supports complete and merge modes with language-aware prompts
- Extended scrape.ts with scrapePageText() (full content extraction)
2026-05-02 21:06:25 +02:00
547c5ffecb fix: stop triggerRefresh() after note creation to prevent stale cache overwrite in production
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
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.
2026-05-02 20:28:03 +02:00
f93752de14 fix: dynamic note restore without page reload + fix note list sync bugs
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
- 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
2026-05-02 20:18:18 +02:00
a3651f1c96 fix: remove useEffect([note]) that was killing auto-save in NoteInlineEditor
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
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.
2026-05-02 19:54:45 +02:00
3818eb8237 feat: note history modal with restore, diff comparison, and dynamic UI updates
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m14s
- 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
2026-05-02 16:51:12 +02:00
Sepehr Ramezani
bd4dd0e9eb fix: show AI assistant button for all note types in card view toolbar
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 43s
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-01 17:08:31 +02:00
Sepehr Ramezani
8ee77956e8 fix: markdown-to-richtext conversion failure prevents type switch
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 46s
- 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>
2026-05-01 16:50:51 +02:00
Sepehr Ramezani
427e32e813 feat: add 6 pastel color themes (Rose, Green, Lavender, Sand, Ocean, Sunset)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 45s
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>
2026-05-01 16:38:43 +02:00
Sepehr Ramezani
fcb5932d33 fix: agent notes default to markdown, add convert-to-rich-text option
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 45s
- 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>
2026-05-01 16:32:49 +02:00
Sepehr Ramezani
dbd49d6fcb feat: 8 AI providers, rich text editor, agent notifications, UI contrast & font settings
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m25s
- Add DeepSeek, OpenRouter, Mistral, Z.AI, LM Studio as AI providers
  with editable model names via Combobox in admin settings
- Fix OpenRouter broken by normalizeProvider bug in config.ts
- Convert agent-created notes from Markdown to HTML (TipTap rich text)
- Add Notification model + in-app notifications for agent results
- Agent notification click opens the created note directly
- Add note count display on notebook and inbox headers
- Fix checklist toggle in card view (persist state via localCheckItems)
- Add checklist creation option in tabs/list view (dropdown on + button)
- Fix image description ENOENT error with HTTP fallback
- Improve UI contrast across all themes (input, border, checkbox visibility)
- Add font family setting (Inter vs System Default) in Appearance settings
- Fix CSS font-sans variable conflict (removed dead Geist references)
- Update README with new features and 8 providers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-01 16:14:07 +02:00
1345403a31 feat: Notion-like rich text editor with TipTap, 4 note types, slash commands & bubble menu
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m33s
2026-05-01 01:11:03 +02:00
7053e242d2 fix: increase markdown transform word limit to 2000 + i18n errors
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 43s
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>
2026-04-30 21:29:17 +02:00
907dcf33d6 fix: increase reformulate word limit to 2000 + i18n error messages
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 4s
- 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>
2026-04-30 21:09:13 +02:00
fa72672aac security: fix critical auth gaps, SSRF, IDOR, and embedding error handling
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 39s
CRITICAL:
- Add auth + admin check to 10 unprotected API routes (test-*, debug/*,
  config, models, fix-labels)
- Add CRON_SECRET bearer auth to /api/cron/reminders (was fully open)
- Add SSRF protection to getOllamaModels (blocks private/internal IPs)

HIGH:
- Fix getAllLabels() missing userId filter (leaked all users' labels)
- Fix /api/labels OR clause leaking other users' labels
- Fix IDOR in toggleAgent/getAgentActions (add ownership check)
- Fix getEmbeddings() returning [] on error in all 5 providers (corrupted
  semantic search with NaN cosine similarity) — now throws instead

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 21:02:13 +02:00
0a900b3582 feat: reminder button in list/tabs view, notifications show reminders, trash count live update
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 43s
- 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>
2026-04-30 20:43:02 +02:00
07f8a60b69 fix: Ollama base URL not read from per-purpose config keys in Docker + i18n for all locales
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
The admin form saves Ollama URLs as OLLAMA_BASE_URL_TAGS/EMBEDDING/CHAT,
but the factory only read OLLAMA_BASE_URL — causing 500 errors in Docker
where no localhost fallback exists.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:26:45 +02:00
a482aaaad6 fix: AI assistant in note-input still searches other notes when scoped to "this note"
When chatScope is "this note", the AI had access to note_search and note_read
tools which let it pull content from any note. Now these tools are excluded via
a webOnly flag in buildToolsForChat — only web_search/web_scrape remain if
the user toggled web search.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:10:20 +02:00
cd6819b905 fix: chat "this note" context searches all notes + Ollama model selector missing search
- When chat scope is "this note" (noteContext present), skip RAG/semantic
  search entirely. Previously the AI received all user notes as context
  even when scoped to a single note, causing irrelevant responses.
- Replace 3 native <select> elements for Ollama models with searchable
  Combobox component (tags, embeddings, chat providers).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:04:34 +02:00
43f73a2ec7 fix: auto-generated title not visible in tabs view after note creation
The sync effect in notes-tabs-view was always preferring local.title over
fresh.title from the DB. When a note was created with an AI-generated title,
triggerRefresh() fetched the note with its title from DB, but the merge
overwrote it with the empty local title. Now uses local.title || fresh.title
so fresh titles show through when local is empty.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 18:47:41 +02:00
d91072ed6b feat: image AI titles (3 suggestions), describe-images action, pin/list fixes, i18n
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
- 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>
2026-04-29 22:34:13 +02:00
fc06519f56 i18n: complete missing French translations (65 entries)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 43s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 22:46:52 +02:00
f0c4cf3600 fix: add success animation when enabling note history + update historyNote state
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 42s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 22:40:49 +02:00
b9175ce32d fix: redesign note history disabled state with centered icon + better copy
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 42s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 22:28:30 +02:00
6f2b0279ff fix: wrong title suggestion API URL (404) + per-note history check
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 42s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 22:24:05 +02:00
b92f6384a4 fix: chat memory lost between messages + per-note history
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m11s
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>
2026-04-28 22:18:46 +02:00
0bccc41ccc fix: chat loses conversation context between messages
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 43s
Remove revalidatePath('/chat') from createConversation — it caused
the server to re-render the /chat page after each new conversation,
which reset the useChat hook state and created a new conversation
for every message instead of continuing the existing one.

Sidebar now refreshes client-side after streaming completes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 21:54:21 +02:00
4f3ed18d7c fix: use non-capturing group in middleware matcher (Next.js 16 build fix)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 42s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 21:39:26 +02:00
ba6f0e9290 fix: add missing NoteHistory migration, fix manifest 403, add API error logging
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 43s
- 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>
2026-04-28 21:37:22 +02:00
39c705592a feat: robust automatic DB migration for Docker deployments
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
Backup before migration (pg_dump/SQLite copy), DB connection wait with
retries, idempotent prisma migrate deploy, old backup cleanup (keep 5),
and server refuses to start if migration fails.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 21:30:45 +02:00
69ea064ca8 feat: smart note history with manual/auto modes, delete entries, i18n fixes
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m16s
- 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>
2026-04-28 21:05:55 +02:00
Sepehr Ramezani
ed807d3b2a Add safe database migration workflow and note history infrastructure.
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s
This introduces guarded migrations with automatic backups, fixes note creation after DB reset, and wires snapshot/restore history across notes surfaces.
2026-04-28 17:14:26 +02:00
0fbb8aa599 fix: serve uploaded images via API route (public/ is read-only in production)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 42s
Next.js bakes public/ at build time — dynamically uploaded files were
never served in Docker standalone mode. Store uploads in data/uploads/
and serve via /api/uploads/ with a rewrite for backward compatibility.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:56:22 +02:00