feat: indicateur versioning sur cartes + toolbar éditeur
Some checks failed
CI / Lint, Unit Tests & Build (push) Successful in 5m35s
CI / Deploy production (on server) (push) Failing after 3s

Note card:
- Icône History en overlay bottom-right (visible si historyEnabled=true)
- Discrète: text-muted-foreground/50, ne pollue pas l'UI
- Tooltip 'Historique des versions activé'

Toolbar éditeur:
- Icône History à côté du statut Saved/Dirty
- Visible seulement en sm+ (desktop)
- cursor-help + tooltip

i18n:
- notes.historyEnabledTooltip ajouté aux 15 locales (FR/EN traduits, 13 EN placeholder)
This commit is contained in:
Antigravity
2026-06-28 09:45:29 +00:00
parent a1399a3d7b
commit 334fce5fc1
18 changed files with 53 additions and 19 deletions

View File

@@ -1,8 +1,8 @@
{ {
"version": 1, "version": 1,
"lastRunAtMs": 1782633053032, "lastRunAtMs": 1782633053032,
"turnsSinceLastRun": 7, "turnsSinceLastRun": 8,
"lastTranscriptMtimeMs": 1782633052959.9294, "lastTranscriptMtimeMs": 1782633052959.9294,
"lastProcessedGenerationId": "5c41c5b1-0c40-4c8e-a6df-b22e873df8f6", "lastProcessedGenerationId": "6d690dcb-cba6-47d2-9361-43956be8667e",
"trialStartedAtMs": null "trialStartedAtMs": null
} }

View File

@@ -24,7 +24,7 @@ import {
AlertDialogHeader, AlertDialogHeader,
AlertDialogTitle, AlertDialogTitle,
} from '@/components/ui/alert-dialog' } from '@/components/ui/alert-dialog'
import { Pin, Bell, GripVertical, X, Link2, FolderOpen, StickyNote, LucideIcon, Folder, Briefcase, FileText, Zap, BarChart3, Globe, Sparkles, Book, Heart, Crown, Music, Building2, LogOut, Trash2, AlignLeft, FileCode2, PenLine, ListChecks, ChevronRight, Plus } from 'lucide-react' import { Pin, Bell, GripVertical, X, Link2, FolderOpen, StickyNote, LucideIcon, Folder, Briefcase, FileText, Zap, BarChart3, Globe, Sparkles, Book, Heart, Crown, Music, Building2, LogOut, Trash2, AlignLeft, FileCode2, PenLine, ListChecks, ChevronRight, Plus, History } from 'lucide-react'
import { useState, useEffect, useTransition, useOptimistic, memo, useMemo } from 'react' import { useState, useEffect, useTransition, useOptimistic, memo, useMemo } from 'react'
import dynamic from 'next/dynamic' import dynamic from 'next/dynamic'
import { useSession } from 'next-auth/react' import { useSession } from 'next-auth/react'
@@ -594,6 +594,16 @@ export const NoteCard = memo(function NoteCard({
/> />
)} )}
{/* Versioning indicator */}
{optimisticNote.historyEnabled && (
<div
className="absolute bottom-3 end-3 z-10"
title={t('notes.historyEnabledTooltip') || 'Version history enabled'}
>
<History className="h-3.5 w-3.5 text-muted-foreground/50" />
</div>
)}
{/* Fusion Badge */} {/* Fusion Badge */}
{note.aiProvider === 'fusion' && optimisticNote.autoGenerated !== null && ( {note.aiProvider === 'fusion' && optimisticNote.autoGenerated !== null && (
<div className="px-1.5 py-0.5 rounded text-[10px] font-medium bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-400 border border-purple-200 dark:border-purple-800 flex items-center gap-1 group/badge relative mb-2 w-fit"> <div className="px-1.5 py-0.5 rounded text-[10px] font-medium bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-400 border border-purple-200 dark:border-purple-800 flex items-center gap-1 group/badge relative mb-2 w-fit">

View File

@@ -19,7 +19,7 @@ import { Badge } from '@/components/ui/badge'
import { import {
X, Plus, Palette, Image as ImageIcon, Bell, Eye, Link as LinkIcon, Sparkles, X, Plus, Palette, Image as ImageIcon, Bell, Eye, Link as LinkIcon, Sparkles,
Maximize2, Copy, ArrowLeft, ChevronRight, PanelRight, Check, Loader2, Save, MoreHorizontal, Maximize2, Copy, ArrowLeft, ChevronRight, PanelRight, Check, Loader2, Save, MoreHorizontal,
Trash2, LogOut, Wand2, Share2, Wind, Paperclip, GraduationCap, FileDown, FileUp, Mic, MicOff, Printer, PenTool, Loader2 as Loader2Icon, Globe, ExternalLink Trash2, LogOut, Wand2, Share2, Wind, Paperclip, GraduationCap, FileDown, FileUp, Mic, MicOff, Printer, PenTool, Loader2 as Loader2Icon, Globe, ExternalLink, History
} from 'lucide-react' } from 'lucide-react'
import { FlashcardGenerateDialog } from '@/components/flashcards/flashcard-generate-dialog' import { FlashcardGenerateDialog } from '@/components/flashcards/flashcard-generate-dialog'
import { NoteShareDialog } from './note-share-dialog' import { NoteShareDialog } from './note-share-dialog'
@@ -549,6 +549,15 @@ export function NoteEditorToolbar({ mode, onClose, onToggleAttachments, attachme
: <><Check className="h-3 w-3 text-emerald-500" /><span>{t('notes.savedStatus')}</span></>} : <><Check className="h-3 w-3 text-emerald-500" /><span>{t('notes.savedStatus')}</span></>}
</span> </span>
{note.historyEnabled && (
<span
className="hidden sm:flex items-center gap-1 text-[11px] text-foreground/35 select-none cursor-help"
title={t('notes.historyEnabledTooltip') || 'Version history enabled'}
>
<History className="h-3 w-3" />
</span>
)}
{state.isMarkdown && !readOnly && ( {state.isMarkdown && !readOnly && (
<button <button
title={state.showMarkdownPreview ? t('notes.markdownEditingTitle') : t('notes.markdownPreviewTitle')} title={state.showMarkdownPreview ? t('notes.markdownEditingTitle') : t('notes.markdownPreviewTitle')}

View File

@@ -282,7 +282,8 @@
"unarchived": "إلغاء الأرشفة", "unarchived": "إلغاء الأرشفة",
"uploading": "جاري الرفع...", "uploading": "جاري الرفع...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "Entarchiviert", "unarchived": "Entarchiviert",
"uploading": "Wird hochgeladen...", "uploading": "Wird hochgeladen...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -315,7 +315,8 @@
"createFirst": "Create your first note", "createFirst": "Create your first note",
"unarchived": "Unarchived", "unarchived": "Unarchived",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "Desarchivado", "unarchived": "Desarchivado",
"uploading": "Subiendo...", "uploading": "Subiendo...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "خارج بایگانی", "unarchived": "خارج بایگانی",
"uploading": "در حال آپلود...", "uploading": "در حال آپلود...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -321,7 +321,8 @@
"createFirst": "Créez votre première note", "createFirst": "Créez votre première note",
"unarchived": "Désarchivée", "unarchived": "Désarchivée",
"savedJustNow": "Sauvegardé", "savedJustNow": "Sauvegardé",
"unsaved": "Non sauvegardé" "unsaved": "Non sauvegardé",
"historyEnabledTooltip": "Historique des versions activé — les modifications sont suivies"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "अनार्काइव नहीं", "unarchived": "अनार्काइव नहीं",
"uploading": "अपलोड हो रहा है...", "uploading": "अपलोड हो रहा है...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "Dearchiviato", "unarchived": "Dearchiviato",
"uploading": "Caricamento...", "uploading": "Caricamento...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "アーカイブ解除", "unarchived": "アーカイブ解除",
"uploading": "アップロード中...", "uploading": "アップロード中...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "보관 해제됨", "unarchived": "보관 해제됨",
"uploading": "업로드 중...", "uploading": "업로드 중...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "Gearchiveerd", "unarchived": "Gearchiveerd",
"uploading": "Uploaden...", "uploading": "Uploaden...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "Wycofane z archiwum", "unarchived": "Wycofane z archiwum",
"uploading": "Przesyłanie...", "uploading": "Przesyłanie...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "Desarquivado", "unarchived": "Desarquivado",
"uploading": "Enviando...", "uploading": "Enviando...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "Разархивировано", "unarchived": "Разархивировано",
"uploading": "Загрузка...", "uploading": "Загрузка...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",

View File

@@ -282,7 +282,8 @@
"unarchived": "已取消归档", "unarchived": "已取消归档",
"uploading": "上传中...", "uploading": "上传中...",
"savedJustNow": "Saved", "savedJustNow": "Saved",
"unsaved": "Unsaved changes" "unsaved": "Unsaved changes",
"historyEnabledTooltip": "Version history enabled — changes are tracked"
}, },
"pagination": { "pagination": {
"previous": "←", "previous": "←",