Commit Graph

13 Commits

Author SHA1 Message Date
Antigravity
261eee2953 refactor: factorisation peek panel — NotePeekPanel réutilisable
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 6m6s
CI / Deploy production (on server) (push) Successful in 26s
Architecture:
- components/note-peek/use-note-peek.ts: hook (fetch + state + events)
- components/note-peek/note-peek-content.tsx: rendu markdown/richtext/KaTeX
- components/note-peek/note-peek-panel.tsx: panel (overlay + inline modes)
- components/note-peek/index.ts: exports
- lib/use-scroll-to-block.ts: utilitaire scroll vers data-id

insights/page.tsx:
- ~95 lignes (state + fetch + KaTeX useEffect + AnimatePresence) → 10 lignes
- peek.open(noteId) remplace handleNoteClick complexe
- <NotePeekPanel mode=overlay /> remplace tout le JSX du panel

NotePeekPanel gère:
- markdown (MarkdownContent) + richtext (DOMPurify + KaTeX lazy)
- RTL (slide gauche pour fa/ar)
- prefers-reduced-motion
- role=dialog + aria-modal (overlay mode)
- loading spinner
- bouton Maximize2 + X
- renderContent prop pour custom (éditeur read-only)
2026-07-04 23:37:37 +00:00
Antigravity
6536180e91 fix(insights): notes markdown + equations LaTeX rendues correctement
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 5m27s
CI / Deploy production (on server) (push) Successful in 24s
Markdown notes:
- peekNote.isMarkdown → MarkdownContent (react-markdown + remarkMath + rehypeKatex)
- GFM tables, code blocks, etc. supportés nativement

Rich text notes:
- KaTeX CSS importé (katex.min.css)
- useEffect rend les equations data-latex via katex.renderToString
- math-equation-block → display mode
- inline-math → inline mode

KaTeX lazy-loadé (await import('katex')) — pas dans le bundle initial
2026-07-04 23:16:53 +00:00
Antigravity
c8bed7f138 fix(insights): peek panel rend correctement le contenu TipTap
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
Avant: prose prose-sm générique → titres/images/tables/callouts/toggles cassés
Maintenant: prose-lg + editor-body + 20+ overrides CSS pour:
- h1/h2/h3 tailles serif comme l'éditeur
- listes, blockquotes, code blocks, pre
- images arrondies + max-width
- tables avec borders
- callouts (data-callout-type)
- toggles (data-type=toggle-block)
- math (data-math)
- hr separators
2026-07-04 23:13:29 +00:00
Antigravity
e72ca26f97 fix(ux-audit): CRITICAL + HIGH fixes — a11y, reduced-motion, forms, keyboard nav
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 6m24s
CI / Deploy production (on server) (push) Successful in 23s
Global (globals.css):
- prefers-reduced-motion: désactive toutes les animations/transitions
- focus-visible:ring global sur tous les éléments interactifs

Search modal:
- role="dialog" + aria-modal="true" + aria-label
- onClick backdrop ferme la modale

Insights peek:
- DOMPurify.sanitize() sur dangerouslySetInnerHTML (XSS fix)

Login form:
- autoComplete="email" / "current-password"
- htmlFor sur tous les labels

Register form:
- autoComplete="name" / "email" / "new-password"
- htmlFor sur tous les labels

GridCard (notes-list-views):
- Actions visibles sur mobile (opacity-100 sm:opacity-0)
- aria-sort sur colonne triable
- role="button" + tabIndex + onKeyDown sur lignes table

Editorial view:
- role="button" + tabIndex + onKeyDown sur articles
- Menu trigger aria-label + visible mobile

Toolbar:
- aria-label voice i18n
2026-07-04 21:37:56 +00:00
Antigravity
72f9798e97 fix(insights): sidebar user-controlled + cluster chips organisées
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 5m25s
CI / Deploy production (on server) (push) Successful in 23s
Sidebar (UX: User Freedom):
- Visible par défaut sur /insights (pas caché par le système)
- Toggle via bouton hamburger: toggle-insights-sidebar event
- Préférence persistée en localStorage (insights-sidebar-collapsed)
- User décide: voir ou cacher le sidebar

Cluster chips:
- Triées par taille (plus grand cluster en premier)
- Compteur de notes par cluster (badge arrondi)
- max-w-[120px] sur le nom pour éviter overflow
- padding/gap plus compacts (px-2.5 py-1 gap-1.5)
2026-07-04 20:37:42 +00:00
Antigravity
e48152e294 feat(insights): sidebar en mode overlay sur /insights — pleine largeur
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
AGENTS.md: 'pas la liste carnets sur /insights'
- sidebar.tsx: isImmersiveRoute sur /insights → fixed overlay au lieu de relative
- Toutes tailles d'écran: sidebar caché par défaut, s'ouvre en drawer
- Bouton hamburger visible sur desktop + mobile (pas lg:hidden)
- Insights prend 100% de la largeur → graphe + dashboard plus spacious
2026-07-04 20:32:35 +00:00
Antigravity
d48312dfc2 feat(insights): peek panel au clic sur un nœud — slide droite, contenu note
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
- handleNoteClick fetch la note + ouvre peek panel au lieu de naviguer
- Panel fixed right (left en RTL), spring animation (stiffness 340 damping 34)
- Header avec titre + boutons Maximize2 (ouvrir note complète) et X (fermer)
- Content rendu en read-only via dangerouslySetInnerHTML
- prefers-reduced-motion: animation désactivée
- responsive: w-full sur mobile, 50vw/640px max sur desktop
2026-07-04 20:29:21 +00:00
Antigravity
056b0260cf fix(insights): a11y + UX Pro Max audit — accessible list view, reduced-motion, focus, lazy-load
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
Accessibility (CRITIQUE per UI/UX Pro Max skill):
- NetworkGraph Accessibility Grade D → added accessible List view alternative
  (toggle Graph/List with cluster→notes table, keyboard navigable)
- aria-label text summary on graph container for screen readers
- role=button + tabIndex + onKeyDown on bridge note cards (keyboard accessible)
- focus-visible:ring on all interactive cards (isolated clusters, bridges, list items)

UX (HIGH):
- prefers-reduced-motion: whileHover disabled when user prefers reduced motion
- cursor-pointer verified + focus-visible:ring-ochre on all clickable cards
- Mobile sidebar: hamburger Menu button in header (dispatches open-mobile-sidebar)

Performance (MEDIUM):
- NetworkGraph lazy-loaded via next/dynamic (D3 ~200KB deferred, ssr:false)
- Loading spinner shown while D3 chunk loads

i18n:
- listView, graphAriaLabel, listAriaLabel added to 15 locales
2026-06-28 09:24:34 +00:00
Antigravity
b3fb46fc52 feat(insights): UX gap closure — i18n, network graph, recalc panel, toasts
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m6s
CI / Deploy production (on server) (push) Has been skipped
Bugs fixes:
- network-graph.tsx: 2 strings hardcoded FR → props i18n (untitledLabel, resetFocusLabel)
- Panneau recalcul: clés i18n réutilisées avec mauvais sens → nouvelles clés recalcSystem.*
- 13 locales: section insightsView.* complète (67 clés × 13 = 871 traductions)

UX features:
- Hint /insights ≠ /graph (semanticGraphLegend + lien vers /graph)
- Toasts succès/échec/zéro-clusters après analyse (analysisSuccess/Failed/NoClusters)
- État vide différencié: emptyNeedMoreNotes si < 10 notes
- Tips contextuels sections Bridge Notes et Suggestions

Sprint:
- 4 epics marqués done (3,4,5,6 — toutes stories terminées)
- sprint-status.yaml last_updated corrigé
2026-06-28 08:06:05 +00:00
Antigravity
eab4b3e27b feat: Memory Echo chunk-level — détecte connexions au niveau section
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled
Quand la similarité whole-note ne passe pas le seuil, vérifie les chunks.
Si une section spécifique de la note A résonne avec une section de la note B,
la connexion est créée avec le snippet précis qui a matché.

SQL: cross-join LATERAL sur NoteEmbeddingChunk avec pgvector <=>.
Fallback gracieux si la table chunks est vide ou erreur.
2026-06-20 17:09:34 +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