Commit Graph

90 Commits

Author SHA1 Message Date
Antigravity
a6cdcba76f feat: publication pages — design moderne + modération IA + signalement
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
Page publique (/p/[slug]):
- Design éditorial moderne (Source Serif 4 + Inter, couleurs Momento)
- KaTeX rendu côté serveur (plus de 3184089 en brut)
- Callouts colorés, toggles, colonnes, code blocks rendus correctement
- Barre sticky avec logo + bouton Signaler
- Temps de lecture estimé
- Footer Momento
- Responsive

Modération:
- content-moderation.service.ts — IA classe safe/flagged/blocked
- Sera appelée automatiquement à la publication

Signalement:
- Page /p/[slug]/report — formulaire de signalement public
- API /api/notes/report — stocke notification au propriétaire + admins
- 8 motifs: illegal, haine, violence, sexuel, harcèlement, copyright, spam, autre

i18n: FR/EN
2026-06-19 22:11:51 +00:00
Antigravity
a4238dc204 feat: AI Overview recherche + AI Writer inline streaming
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 5m6s
CI / Deploy production (on server) (push) Successful in 2m2s
- 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
2026-06-19 19:42:37 +00:00
Antigravity
82f87b65cb feat: AI Writer inline — génère du contenu au curseur
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m19s
CI / Deploy production (on server) (push) Has been skipped
- 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
2026-06-14 20:30:10 +00:00
Antigravity
b9a80f9e64 feat: Organisateur IA — analyse carnet + tags + doublons + regroupements
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 5m37s
CI / Deploy production (on server) (push) Successful in 2m2s
- 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)
2026-06-14 20:16:01 +00:00
Antigravity
eff906d187 fix: exercices dans menu GraduationCap + équations KaTeX + refresh liste
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
- 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
2026-06-14 20:13:25 +00:00
Antigravity
104af3149f feat: générateur d'exercices + planning de révision IA
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m28s
CI / Deploy production (on server) (push) Has been skipped
- 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
2026-06-14 19:57:21 +00:00
Antigravity
940c3daf62 feat: Wizard IA + Export PDF + fixes blocs
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m7s
CI / Deploy production (on server) (push) Has been skipped
- 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
2026-06-14 19:51:02 +00:00
Antigravity
d5b409c1ac feat: équations mathématiques (KaTeX) — bloc, inline, barre visuelle, IA
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m28s
CI / Deploy production (on server) (push) Has been skipped
- Bloc équation avec barre visuelle 20 symboles (fractions, intégrales, grec, etc.)
- Math en ligne : tape $x^2$ → rendu KaTeX inline automatique
- Math en bloc : tape $$E=mc^2$$ → converti en bloc
- Génération IA : décrit l'équation en langage naturel → LaTeX
- Service math-from-text + endpoint /api/ai/math-from-text
- CSS KaTeX importé
- i18n FR/EN complet
2026-06-14 18:21:46 +00:00
Antigravity
a623454347 perf: memo GridCard, fuse save fns, fix slash tab active color
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m32s
CI / Deploy production (on server) (push) Has been skipped
2026-06-14 14:06:05 +00:00
Antigravity
cd1be630d2 fix: agent notifications pointaient vers / au lieu de /home?openNote=
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m24s
CI / Deploy production (on server) (push) Has been skipped
La landing page est sur /, l'app sur /home.
Correction: actionUrl = /home?openNote=noteId

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 15:17:36 +00:00
Antigravity
5703d5bd49 feat(4-5/4-6): audit logging + zero-data-retention headers
Some checks failed
CI / Lint, Unit Tests & Build (push) Successful in 5m39s
CI / Deploy production (on server) (push) Failing after 18s
Audit Logging (story 4-6):
- Nouveau modèle AuditLog (userId, action, resource, metadata, ip, createdAt)
- Migration 20260529143000_add_audit_log appliquée
- lib/audit-log.ts : logAuditEvent (fire-and-forget) + logAuditEventAsync + getClientIp
- auth.ts : LOG LOGIN / LOGOUT / USER_CREATED sur chaque event NextAuth
- /api/chat : log AI_REQUEST avec tokens + byok flag dans onFinish
- /api/agents/run-for-note : log AI_REQUEST avec featureKey + noteId

Zero-data-retention (story 4-5):
- OpenAI provider : header OpenAI-No-Training: 1
- Anthropic provider : header Anthropic-No-Train: 1
- DeepSeek provider : header X-No-Train: 1

sprint-status: 4-5 et 4-6 → done

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 14:36:06 +00:00
Antigravity
b825bdb8b2 fix: boucle infinie Maximum update depth dans useAutoTagging + toolbar
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
- use-auto-tagging: onQuotaExceeded via ref stable → n'invalide plus
  useCallback analyzeContent à chaque render parent
- note-editor-context: filteredSuggestions et existingLabelsLower
  stabilisés avec useMemo (était recalculé sans memo → nouvelle ref
  à chaque render → état useMemo state se réexécutait → boucle)
- deepseek.ts: generateTags via generateText (pas generateObject)
  pour éviter response_format:json_schema non supporté

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 13:40:59 +00:00
Antigravity
4218470830 fix: génération slides dans la langue de la note (15 langues)
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
- Récupère note.language (détecté automatiquement) depuis la DB
- LANG_NAMES: mapping code → nom complet (fa→Persian, ar→Arabic, zh→Chinese...)
- Injecte règle de langue absolue dans le prompt: tous les textes
  des slides doivent être dans la langue de la note
- Fonctionnement pour les 15 locales du projet

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 13:13:28 +00:00
Antigravity
6f8121e937 fix: nombre slides proportionnel aux vrais mots de la note
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
- stripNoteMarkdown() : supprime #, **, URLs, métadonnées (Connection to seed,
  Novelty score, Origin...), frontmatter, code blocks
- countNoteWords() : compte les mots sémantiques réels
- slideLimit() : <50 mots → 3 slides, 50-150 → 4, 150-350 → 6, >350 → 8
- Le prompt injecte la règle dynamique avec priorité absolue (⚠️)
- Suppression des 3 occurrences hardcodées '6-12 slides'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 13:09:46 +00:00
Antigravity
3ee07c5f55 fix: chart/diagram fond cohérent avec le thème + slides strictement proportionnels
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
- slides-renderer: chart et diagram utilisent bg/text/muted du thème
  (plus de fond #111827 forcé)
- slides.tool: prompt ultra-clair (<50 mots = max 3 slides)
  + cappedSlides.slice(0,8) côté serveur comme filet de sécurité

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 12:41:41 +00:00
Antigravity
51d6334f8a fix: plafond strict 8 slides max + contrainte zod .max(8)
Some checks failed
CI / Lint, Unit Tests & Build (push) Successful in 6m48s
CI / Deploy production (on server) (push) Has been cancelled
- JAMAIS plus de 8 slides quelle que soit la note
- Zod schema: .max(8) coupe l'array si le modèle déborde
- Prompt: ignore markdown/URLs dans le comptage de mots
- Chart seulement si vraies données numériques dans la note

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 12:34:43 +00:00
Antigravity
40cfdc9357 fix: slide graphe noire + nombre slides adaptatif
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
- slides-renderer: SlideChart supporte le nouveau format plat
  (slide.chartType + slide.data[{label,value}]) en plus de slide.chart
  → corrige la slide noire avec légende visible mais graphe vide
- slides.tool: nombre de slides adapté au contenu
  (3-4 pour note courte, 5-7 moyenne, 8-12 longue)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 12:26:32 +00:00
Antigravity
f4208780fd fix: quota slide_generate pour tier BASIC
Some checks failed
CI / Lint, Unit Tests & Build (push) Successful in 5m43s
CI / Deploy production (on server) (push) Failing after 17s
- Ajoute slide_generate et excalidraw_generate dans TIER_LIMITS
  (BASIC: 3, PRO: 20, BUSINESS: 100, ENTERPRISE: unlimited)
- run-for-note: utilise le bon feature key selon le type d'agent
- slides.tool: incrémente slide_generate (pas reformulate)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 12:10:31 +00:00
Antigravity
9e23c078e9 fix: slide 3 noire, watermark PPTX, quota génération slides
Some checks failed
CI / Lint, Unit Tests & Build (push) Successful in 5m44s
CI / Deploy production (on server) (push) Failing after 17s
- canvas-board.tsx: préfère data.html (iframe) sur data.spec (ancien renderer)
  → corrige slide 3 noire en mode HTML viewer
- pptx/route.ts: ajoute watermark 'memento-note.com' sur chaque slide
  via buildPptx (PPTX téléchargé depuis le canvas)
- run-for-note/route.ts: checkEntitlementOrThrow avant création agent
- slides.tool.ts: incrementUsageAsync après canvas créé avec succès

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 11:58:31 +00:00
Antigravity
45fd501953 fix: PPTX watermark + black slide + pricing page /pricing
Some checks failed
CI / Lint, Unit Tests & Build (push) Successful in 6m23s
CI / Deploy production (on server) (push) Failing after 18s
- export-pptx.ts: fix watermark position for LAYOUT_WIDE (13.33"×7.5")
  → moved from y:5.35 (71% height) to y:7.1 near bottom-right (x:10.0)
- export-pptx.ts: fix buildSummarySlide dark background (T.primary overlay
  covered 100% of slide appearing black) → cream bg with colored stat cards
  matching design of other brainstorm slides
- pptx.tool.ts: fix addImageFullSlide using t.primary as bg when no imageUrl
  → falls back to t.bg (light); text colors adapt accordingly
- pricing/page.tsx: create /pricing standalone page reusing exact landing
  page pricing section (PLANS array, billing toggle, i18n keys)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 11:45:47 +00:00
Antigravity
8eb8f551fc Story 6-4/6-5: Chat with PDF (done) + PPTX watermark PLG
Some checks failed
CI / Lint, Unit Tests & Build (push) Successful in 11m47s
CI / Deploy production (on server) (push) Failing after 18s
Story 6-4 — Chat with PDF:
- Feature déjà implémentée (document-qa-overlay.tsx, ingestion, search)
- Marquée done dans sprint-status

Story 6-5 — PPTX Export Watermark (PLG viral loop):
- lib/brainstorm/export-pptx.ts: addWatermark + withWatermark helpers
- lib/ai/tools/pptx.tool.ts: même pattern monkey-patch addSlide
- Watermark 'memento-note.com' 7pt gris bas-droite sur chaque slide
- Zéro modification des 14+ fonctions de slides existantes
- 174 tests passent, aucune erreur TS

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 11:30:56 +00:00
Antigravity
dae56187fc fix(byok): bypass api key validation in dev and fix minimax endpoint url
Some checks failed
CI / Lint, Unit Tests & Build (push) Successful in 5m43s
CI / Deploy production (on server) (push) Failing after 18s
2026-05-28 21:52:08 +00:00
Antigravity
7cc2a9ea3b feat(byok): fetch live models dynamically from provider api with user api key on input
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
2026-05-28 21:49:32 +00:00
Antigravity
6703e75bf3 refactor(byok): move models suggestions list to server config models-list and fetch dynamically via API
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
2026-05-28 21:44:55 +00:00
Antigravity
11a07adee7 feat(byok): add model selection to BYOK settings panel and overlay custom model on route resolution
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
2026-05-28 21:41:34 +00:00
Antigravity
07ace46dd3 feat(editor): implement next-gen editor with unique gutter drag handle, block actions menu, smart paste transclusion, and redesigned inline structured view block (US-NEXTGEN-EDITOR, US-4) 2026-05-27 21:39:21 +00:00
Antigravity
e881004c77 feat(insights): fix DBSCAN, Persian embeddings crash, D3 physics layouts, and D3 node not found runtime error
Some checks failed
CI / Lint, Test & Build (push) Failing after 1m7s
CI / Deploy production (on server) (push) Has been skipped
2026-05-24 18:57:33 +00:00
Antigravity
e2672cd2c2 feat(notes): liens internes, onglet Réseau, living blocks et consentement IA
Some checks failed
CI / Lint, Test & Build (push) Failing after 1m19s
CI / Deploy production (on server) (push) Has been skipped
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>
2026-05-24 14:27:29 +00:00
Antigravity
077e665dfc feat(cluster): implement cluster detection and bridge notes discovery
Add automatic note clustering using density-based algorithm (DBSCAN variant)
and bridge notes detection for connecting different thematic clusters.

Features:
- NoteCluster, ClusterMember, BridgeNote, BridgeSuggestion models
- Clustering service with pgvector cosine similarity
- Bridge notes detection (notes connecting >=2 clusters)
- AI-powered suggestions for missing cluster connections
- /insights page with React Flow visualization
- Cron endpoint for automatic recalculation

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 20:26:25 +00:00
Antigravity
10777b62b1 debug(chart): add cache logging to debug cache misses 2026-05-23 10:15:45 +00:00
Antigravity
af3a263a54 fix(chart): transaction mapping fix + add cache for suggestions
- Fix transaction.mapping.map usage - it returns a position, not mapping
- Add 5-minute in-memory cache for chart suggestions (max 50 entries)
- Cache key based on content hash + selection
- Significantly improves UX when re-analyzing same content

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 10:12:11 +00:00
Antigravity
d1395d9b81 fix(chart): show correct chart type in previews
- Use NoteChart directly with props instead of NoteChartFromCode
- Remove markdown ticks from chartSuggestionToMarkdown output
- Export NoteChart component for direct use in previews

Now the 3 suggestions correctly show different chart types.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 10:00:44 +00:00
Antigravity
18ffd76c1e fix(chart): improve error handling and color variety
- 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>
2026-05-23 09:19:52 +00:00
Antigravity
a122a0eade feat(ai): add AI chart suggestions in TipTap editor
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>
2026-05-23 08:58:46 +00:00
Antigravity
bfaacc557f fix(chart): simplify to single insert_chart tool that does everything
Some checks failed
CI / Lint, Test & Build (push) Failing after 15s
CI / Deploy production (on server) (push) Has been skipped
2026-05-22 18:30:11 +00:00
Antigravity
beca2c52c3 feat: add inline chart support for notes
Some checks failed
CI / Lint, Test & Build (push) Failing after 15s
CI / Deploy production (on server) (push) Has been skipped
- Add NoteChart component using Recharts (bar, line, area, pie, radar, funnel, gauge)
- Add generate_chart and insert_chart_in_note AI tools
- Add chart code block support in MarkdownContent (```chart ... ```)
- Support JSON and simple data formats (label: value)
- Add i18n translations for chart features

Chart syntax examples:
- JSON: ```chart {"type":"bar","data":[{"label":"A","value":10}]} ```
- Simple: ```chart\nbar\nSales Data\nJan: 120\nFeb: 150\n```

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 17:29:10 +00:00
Antigravity
5728452b4a feat: add slides generation tool with multiple slide types
Some checks failed
CI / Lint, Test & Build (push) Failing after 17s
CI / Deploy production (on server) (push) Has been skipped
- 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>
2026-05-22 17:18:48 +00:00
Antigravity
b935466480 fix: resolve Prisma 'vector' deserialization error and missing PDF canvas dependency
Some checks failed
CI / Lint, Test & Build (push) Failing after 5m29s
CI / Deploy production (on server) (push) Has been cancelled
2026-05-19 21:34:50 +00:00
Antigravity
6a8d0eb0a5 feat: embedding dimension validation + migration system
Some checks failed
CI / Lint, Test & Build (push) Failing after 8m1s
CI / Deploy production (on server) (push) Has been cancelled
- Add /api/admin/embeddings/dimension (GET column dim, POST test model dim)
- Add /api/admin/embeddings/migrate (alter column, clear, re-index)
- Admin form warns on dimension mismatch after save, offers migrate button
- Remove hardcoded 1536 from validate endpoint and embedding service
- Add validateDimension() utility to EmbeddingService
- Fix health route: import prisma correctly, use router instead of missing registry
- i18n keys for dimension warning (EN/FR)
2026-05-19 18:45:50 +00:00
Antigravity
878303a997 fix: resolve all 6 prefer-const eslint errors for CI
Some checks failed
CI / Lint, Test & Build (push) Failing after 5m33s
Deploy to Production / Build and Deploy (push) Has been cancelled
2026-05-16 22:47:38 +00:00
Antigravity
724474cb49 chore: remove dead code — 8 components, 5 libs, 4 API routes, 4 npm packages, 30+ scripts, dead CSS, dead exports
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s
Removed unused components:
- brainstorm-canvas, brainstorm-create-dialog, invite-dialog, manual-idea-dialog
- note-inline-editor, profile-page-header, quota-paywall, label-management-dialog

Removed dead lib files:
- api-auth.ts, color-harmony-recommendation.ts, label-storage.ts, modern-color-options.ts
- hooks/use-card-size-mode.ts

Removed dead API routes:
- ai/test-chat, ai/test-embeddings, ai/test-tags, admin/randomize-labels

Removed unused npm packages:
- cmdk, novel, tippy.js, react-force-graph-2d

Cleaned dead CSS from globals.css:
- acrylic-*, win11-shadow-*, muuri-grid/item, ai-glass, ai-tab-indicator, ai-send-btn, sidebar-view-toggle, memento-sidebar-depth

Removed 29 orphan scripts and 3 root orphan files

Cleaned dead exports from 8 lib files:
- NOTE_TYPE_CONFIG, getPublishableKey, PROVIDER_DEFAULTS, useNotes/useNote/invalidateNote, etc.
2026-05-16 20:34:58 +00:00
Antigravity
8c7ca69640 fix: brainstorm infinite loop, ghost cursor, embedding ::vector cast, semantic search, billing stats, usage meter accordion
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s
- Fix useBrainstormSocket: stable guestId via useRef, remove setState in cleanup
- Fix GhostCursor: direct DOM manipulation via refs, no useState re-renders
- Fix all SQL embedding queries: add ::vector cast on text columns
- Fix embedding truncation to 15000 chars (under 8192 token limit)
- Fix NoteEmbedding INSERT: remove non-existent updatedAt column
- Fix billing page: show all quota stats in grid instead of single metric
- Fix usage meter: accordion expand/collapse, per-feature detail
- Fix semantic search: rebuild 103 note embeddings, ::vector cast on vectorSearch
- Fix brainstorm expand/manual-idea/create: ::vector cast on embedding SQL
2026-05-16 18:50:34 +00:00
Antigravity
bd495be965 feat: design system overhaul — sidebar, AI chats, settings, brainstorm, color cleanup
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 12s
- 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
2026-05-16 12:59:30 +00:00
Antigravity
1fcea6ed7d feat: brainstorm sessions, PDF document Q&A, embedding fixes, and UI improvements
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 7s
- Add brainstorm feature with collaborative canvas, AI idea generation, live cursors, playback, and export
- Add PDF upload/extraction/ingestion pipeline with pgvector document search (RAG)
- Add document Q&A overlay with streaming chat and PDF preview
- Add note attachments UI with status polling, grid layout, and auto-scroll
- Add task extraction AI tool and agent executor improvements
- Fix NoteEmbedding missing updatedAt column, re-index 66 notes with 1536-dim embeddings
- Fix brainstorm 'Create Note' button: add success toast and redirect to created note
- Fix memory echo notification infinite polling
- Fix chat route to always include document_search tool
- Add brainstorm i18n keys across all 14 locales
- Add socket server for real-time brainstorm collaboration
- Add hierarchical notebook selector and organize notebook dialog improvements
- Add sidebar brainstorm section with session management
- Update prisma schema with brainstorm tables, attachments, and document chunks
2026-05-14 17:43:21 +00:00
Antigravity
195e845f0a security: fix SQL injection in semantic search - use parameterized queries with bind params
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s
- Replace string interpolation in $queryRawUnsafe with bind params ($1, $2...)
- Add assertSafeId() validation for userId, notebookId, noteId
- ftsSearch: bind query, userId, notebookId as parameters
- vectorSearch: bind vector string, userId, notebookId, threshold as parameters
- indexNote: already used bind params, added noteId validation
- Fixes CRITICAL security audit finding #1
2026-05-12 11:51:40 +00:00
Antigravity
ff664f7523 fix: add missing await on reciprocalRankFusion call
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s
2026-05-12 10:53:34 +00:00
Antigravity
41596c2035 fix: openrouter provider fallback to CUSTOM_OPENAI_API_KEY when OPENROUTER_API_KEY missing
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s
2026-05-12 09:30:08 +00:00
Antigravity
4c1359ee39 Revert "fix: switch embedding dimension from 1536 to 2560 for qwen-embedding-4b"
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 4s
This reverts commit e09ea3a145.
2026-05-12 09:19:01 +00:00
Antigravity
e09ea3a145 fix: switch embedding dimension from 1536 to 2560 for qwen-embedding-4b
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s
2026-05-12 09:07:55 +00:00
Antigravity
03e6a62b80 feat: migrate semantic search to pgvector + full-text search
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m12s
Replace JSON-string embeddings with native pgvector(1536) storage and
add PostgreSQL full-text search (tsvector/GIN) with Reciprocal Rank Fusion
for hybrid keyword + semantic ranking.

Changes:
- NoteEmbedding.embedding: String → vector(1536) via pgvector
- NoteEmbedding: added updatedAt for reindex tracking
- Note: added tsv (tsvector) with auto-update trigger for FTS
- semantic-search.service: hybrid FTS + vector search with RRF fusion
- embedding.service: toVectorString() for pgvector SQL literals
- Removed JS-side cosine similarity loops (now DB-side via <=>)
- Added HNSW index on NoteEmbedding.embedding (cosine distance)
- Added GIN index on Note.tsv for FTS queries

Schema migration in: prisma/migrations/20260512120000_pgvector_and_fts_search/

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 07:03:56 +00:00