feat: mobile app complet + flashcards fixes + drag handle améliorations
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m32s
CI / Deploy production (on server) (push) Has been skipped

Mobile app:
- Révision flashcards : liste decks, session flip-card SM-2, couleurs harmonisées web
- Génération flashcards depuis note (FlashcardSheet + route /api/mobile/flashcards/generate)
- Audio Whisper : hook useAudioRecorder reécrit, MicButton avec erreurs
- IA : AISheet (améliorer/clarifier/résumer), TitleSheet (titre automatique)
- Suppression note (soft delete + confirmation Alert)
- Note du jour : titre lisible + HTML (plus JSON TipTap brut)
- Parser TipTap→HTML côté mobile (tipTapToHtml)
- Icône 🎓 dans header note → génération flashcards
- Endpoint flashcardGenerate dans config.ts

Web fixes:
- Bug flashcards groupées par carnet → deck par note (migration + schema)
- Bug filtre 'cartes dues' ignoré (suppression fallback buildSessionQueue)
- Suppression UI création deck manuelle (inutile)
- Fix setViewType is not defined dans home-client.tsx

Drag handle menu:
- Fix : clearNodes() avant transformation (heading→liste/code/citation)
- Ajout : option 'Texte' (paragraphe) dans Transformer en
- Ajout : Monter / Descendre le bloc
- Ajout : Copier le contenu du bloc
- Fix : sous-menu hover stable (délai 200ms)
- Fix : Supprimer en rouge via classe --danger (plus :first-child)
- i18n : nouvelles clés dans 15 locales

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Antigravity
2026-05-29 18:49:40 +00:00
parent 1121b8c345
commit 0fa8978395
54 changed files with 2648 additions and 245 deletions

View File

@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react'
import {
View, Text, ScrollView, TouchableOpacity,
View, Text, ScrollView, TouchableOpacity, Alert,
ActivityIndicator, RefreshControl, StyleSheet,
} from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'
@@ -42,10 +42,18 @@ export default function HomeScreen() {
useEffect(() => { load() }, [])
const handleDailyNote = async () => {
const res = await apiFetch(ENDPOINTS.dailyNote)
if (res.ok) {
try {
const res = await apiFetch(ENDPOINTS.dailyNote)
if (!res.ok) {
Alert.alert('Erreur', 'Impossible de charger la note du jour.')
return
}
const data = await res.json()
router.push({ pathname: '/note/[id]', params: { id: data.id } })
const id = data.id ?? data.note?.id
if (!id) { Alert.alert('Erreur', 'Note introuvable.'); return }
router.push({ pathname: '/note/[id]', params: { id } })
} catch {
Alert.alert('Erreur réseau', 'Vérifiez votre connexion.')
}
}
@@ -79,13 +87,13 @@ export default function HomeScreen() {
</View>
<Text style={s.quickLabel}>Note du jour</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => router.push({ pathname: '/(tabs)/search' })} style={s.quickCard} activeOpacity={0.7}>
<TouchableOpacity onPress={() => router.push({ pathname: '/note/create' })} style={s.quickCard} activeOpacity={0.7}>
<View style={[s.quickIcon, { backgroundColor: '#edf0f7' }]}>
<PenLine size={20} color="#5b7ec7" />
</View>
<Text style={s.quickLabel}>Nouvelle note</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => router.push({ pathname: '/(tabs)/search' })} style={s.quickCard} activeOpacity={0.7}>
<TouchableOpacity onPress={() => router.push({ pathname: '/(tabs)/revision' })} style={s.quickCard} activeOpacity={0.7}>
<View style={[s.quickIcon, { backgroundColor: '#eef7ed' }]}>
<GraduationCap size={20} color="#4a9b61" />
</View>