Commit Graph

542 Commits

Author SHA1 Message Date
Antigravity
3cae8a2e99 fix(ci): optimize workflow for docker-host runner and faster execution
- Fix runner label: ubuntu-24.04 → docker-host
- Add npm cache for faster installs
- Remove PostgreSQL service (not needed for unit tests)
- Keep Vitest unit tests (fast logic tests)
- Remove Playwright E2E tests (too slow for CI, run locally)
- Remove unnecessary database setup step

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 19:53:08 +00:00
Antigravity
f46654f574 feat: editor improvements and architectural grid prototype
Multiple feature additions and improvements across the application:

- NextGen Editor: drag handles, smart paste, block actions
- Structured views: Kanban and table layouts for notes
- Architectural Grid: new brainstorming/agent interface prototype
- Flashcards: SM-2 revision algorithm with AI generation
- MCP server: robustness improvements
- Graph/PDF chat: fix click propagation and copy behavior
- Various UI/UX enhancements and bug fixes

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 19:45:15 +00:00
Antigravity
2de66a863d feat(ci): add rollback mechanism and Telegram notifications
CI/CD Pipeline Improvement - Add automated rollback on deployment
failure and Telegram notifications for CI/deploy status.

Changes:
- scripts/deploy-prod.sh: Add rollback_save_image(), rollback_restore_image(),
  and telegram_notify() functions
- scripts/deploy-prod.sh: Save current Docker image before building new one
- scripts/deploy-prod.sh: Rollback to previous image on health check failure
- .gitea/workflows/ci.yaml: Add Telegram notifications for CI failures
- memento-note/eslint.config.mjs: Disable experimental React Compiler rules

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 19:36:57 +00:00
Antigravity
5442af4c55 fix(drag-handle): restore visibility CSS cascade and pointer-events 2026-05-25 11:01:42 +00:00
Antigravity
0784c94242 feat(notes): vues structurées tableau/kanban, flashcards et MCP robuste
Some checks failed
CI / Lint, Test & Build (push) Failing after 57s
CI / Deploy production (on server) (push) Has been skipped
Ajoute la base organisable par carnet (schéma, champs partagés, valeurs par note)
avec activation guidée, tableau éditable, kanban et suppression de colonnes.
Corrige le multiselect en vue tableau et enrichit sidebar, grille et i18n FR/EN.
Inclut aussi les améliorations flashcards SM-2, l'audit consentement IA et la
robustesse du serveur MCP (config, validation, rate-limit, métriques).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-24 23:03:16 +00:00
Antigravity
ecd7e57c2e fix(editor): save-on-close & correct image tracking
Some checks failed
CI / Lint, Test & Build (push) Failing after 1m7s
CI / Deploy production (on server) (push) Has been skipped
- Auto-sauvegarde à la fermeture de l'éditeur fullPage si isDirty (évite
  que la vignette reste après suppression d'image sans Ctrl+S)
- Correction de resolveImagesForSave : fusion des images contenu HTML +
  images standalone (hors éditeur) en excluant les removedImageUrls,
  pour ne pas perdre les images uploadées séparément à la sauvegarde
2026-05-24 21:37:09 +00:00
Antigravity
36336e6b0d feat(flashcards): révision SM-2, génération IA et page /revision
Some checks failed
CI / Lint, Test & Build (push) Failing after 32s
CI / Deploy production (on server) (push) Has been skipped
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>
2026-05-24 19:22:20 +00:00
Antigravity
8697ae244f fix(graph-pdf-chat): resolution de la propagation des clics sur le graphe et arret du detournement de copie sur le chat PDF
Some checks failed
CI / Lint, Test & Build (push) Failing after 47s
CI / Deploy production (on server) (push) Has been skipped
2026-05-24 19:12:36 +00:00
Antigravity
682f8b7118 fix(pdf-upload): correction de l ouverture en double et integration de la colonne d embedding manquante pour DocumentChunk
Some checks failed
CI / Lint, Test & Build (push) Failing after 47s
CI / Deploy production (on server) (push) Has been skipped
2026-05-24 19:05:39 +00:00
Antigravity
7a8307f4b4 fix(graph): resolution des bugs du graphe globale, support RTL, dates localisees et simulation D3 ultra-stable
Some checks failed
CI / Lint, Test & Build (push) Failing after 53s
CI / Deploy production (on server) (push) Has been skipped
2026-05-24 19:02:54 +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
2aed148dc2 fix(chart): simplify node insertion using commands API
Use editor.commands.insertContent with JSON node definition instead of
direct transaction manipulation. This is more reliable for custom nodes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 10:16:15 +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
468a2bffc8 fix(chart): use direct TipTap node creation via transaction
Instead of relying on HTML parsing which can be inconsistent,
create the chartBlock node directly using TipTap's schema and transaction API.
This ensures the custom node is properly created and rendered as a visual chart.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 10:05:07 +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
835e1872bb fix(chart): convert markdown to HTML for TipTap insertion
- Convert chart markdown to <pre><code class="language-chart"> HTML format
- Fix parseHTML to store code content in node attrs
- Fix renderHTML to output actual code content instead of placeholder

This fixes charts rendering as raw markdown text instead of visual charts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:51:30 +00:00
Antigravity
10e529deff fix(chart): use correct AI provider pattern
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>
2026-05-23 09:45:06 +00:00
Antigravity
675e4c9957 fix(chart): use 'chat' lane instead of invalid 'suggest-charts'
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>
2026-05-23 09:40:01 +00:00
Antigravity
76cbdd338b fix(chart): add detailed error logging to debug 500 error
- 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
2026-05-23 09:39:16 +00:00
Antigravity
54385e9f10 fix(chart): rewrite suggestion logic with better error handling
- 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>
2026-05-23 09:36:26 +00:00
Antigravity
625a79a1f9 fix: multiple issues
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>
2026-05-23 09:31:38 +00:00
Antigravity
77f69fc1d1 fix(i18n): wrap CookieConsentRoot with LanguageProvider
The CookieConsentBanner uses useLanguage() hook but was rendered
outside of LanguageProvider in RootLayout. Added LanguageProvider
wrapper to fix the runtime error.
2026-05-23 09:27:29 +00:00
Antigravity
a20cee0f63 fix(chart): replace non-existent Upgrade icon with Sparkles 2026-05-23 09:23:39 +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
4e8f45deae feat(graph): add interactive notebook filters and detail panel tags to graph view 2026-05-23 08:34:39 +00:00
Antigravity
d589b8aa7e feat(graph): improve note graph relationships by integrating wikilinks and semantic AI echo insights 2026-05-23 08:26:13 +00:00
Antigravity
ca0637cc6e fix(chart): prevent infinite loops and remove hardcoded text
Some checks failed
CI / Lint, Test & Build (push) Failing after 9s
CI / Deploy production (on server) (push) Has been skipped
- Memoize ChartWrapper to prevent infinite re-renders in MarkdownContent
- Remove hardcoded French text (multilingual app)
- Return null for invalid charts instead of error messages
2026-05-22 18:33:55 +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
a00b39728b feat(ai): add generate_chart and insert_chart_in_note to system prompt
Some checks failed
CI / Lint, Test & Build (push) Failing after 12s
CI / Deploy production (on server) (push) Has been skipped
2026-05-22 18:26:33 +00:00
Antigravity
5bd3f7f5ec fix(chart): prevent infinite re-render loop by using useState/useEffect for dark mode detection
Some checks failed
CI / Lint, Test & Build (push) Failing after 16s
CI / Deploy production (on server) (push) Has been skipped
2026-05-22 18:20:42 +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
0f6b9509da fix(deploy): restart monitoring exporters on every deploy to apply config
All checks were successful
CI / Lint, Test & Build (push) Successful in 2m40s
CI / Deploy production (on server) (push) Successful in 19s
2026-05-21 20:54:48 +00:00
Antigravity
e774dcee70 fix(monitoring): fix postgres-exporter credentials, cadvisor docker labels, node-exporter pid host
All checks were successful
CI / Lint, Test & Build (push) Successful in 1m42s
CI / Deploy production (on server) (push) Successful in 21s
2026-05-21 20:50:13 +00:00
Antigravity
b02f19b1a0 fix(deploy): preserve Prometheus TSDB history — only recreate if config changed
All checks were successful
CI / Lint, Test & Build (push) Successful in 1m50s
CI / Deploy production (on server) (push) Successful in 20s
2026-05-21 20:40:56 +00:00
Antigravity
a8f3ce0ae6 feat(monitoring): add /api/metrics endpoint for Prometheus scraping
All checks were successful
CI / Lint, Test & Build (push) Successful in 2m37s
CI / Deploy production (on server) (push) Successful in 20s
2026-05-21 20:32:12 +00:00
Antigravity
fde4689ac0 fix(deploy): dockerignore exceptions for prebuilt artifact files
All checks were successful
CI / Lint, Test & Build (push) Successful in 3m51s
CI / Deploy production (on server) (push) Successful in 1m6s
2026-05-21 20:24:06 +00:00
Antigravity
0e61055bc0 fix(ci): disable node npm caching and remove invalid next webpack flag to prevent hangs
Some checks failed
CI / Lint, Test & Build (push) Successful in 1m42s
CI / Deploy production (on server) (push) Failing after 8s
2026-05-21 20:20:10 +00:00
Antigravity
87ec01fdd5 fix(ci): add needs clause to deploy job and force recreate prometheus on deploy
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Test & Build (push) Has been cancelled
2026-05-21 20:11:04 +00:00
Antigravity
d7e72008ec fix(ci): install node in runner for download-artifact and connect prometheus to memento-net
Some checks failed
CI / Deploy production (on server) (push) Successful in 3m28s
CI / Lint, Test & Build (push) Has been cancelled
2026-05-21 20:07:06 +00:00
Antigravity
7cf921a802 feat(monitoring): auto-provision Prometheus datasource and dashboards in Grafana
All checks were successful
CI / Lint, Test & Build (push) Successful in 12m6s
CI / Deploy production (on server) (push) Successful in 1m58s
2026-05-21 19:46:04 +00:00
Antigravity
a801d18b12 fix(deploy): robust health check via node inside container
Some checks failed
CI / Deploy production (on server) (push) Successful in 1m55s
CI / Lint, Test & Build (push) Has been cancelled
2026-05-21 19:39:17 +00:00
Antigravity
2ae08538f0 fix(deploy): use correct container name memento-web in docker inspect
Some checks failed
CI / Lint, Test & Build (push) Successful in 12m2s
CI / Deploy production (on server) (push) Failing after 5m11s
2026-05-21 19:11:43 +00:00
Antigravity
55fb081e94 fix(deploy): use container IP dynamically for build-info health check in CI runner
Some checks failed
CI / Lint, Test & Build (push) Successful in 12m4s
CI / Deploy production (on server) (push) Failing after 3m58s
2026-05-21 18:54:09 +00:00
Antigravity
f38e08e289 fix(ci): make sudo invocation conditional in postgresql-client installation
Some checks failed
CI / Deploy production (on server) (push) Failing after 4m0s
CI / Lint, Test & Build (push) Has been cancelled
2026-05-21 18:48:25 +00:00
Antigravity
d31ab190eb fix(ci): remove postgres service port mapping to prevent docker-host port conflicts
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Test & Build (push) Has been cancelled
2026-05-21 18:42:10 +00:00