feat(dashboard): tableau de bord Second Brain configurable avec chargement progressif
Briefing granulaire, pistes rapides puis enrichissement async, layout persisté v5, suggestions agents, intégration Gmail et navigation sidebar alignée sur /home. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import { getNoteById } from '@/app/actions/notes'
|
||||
import { useNoteRefresh } from './NoteRefreshContext'
|
||||
import { toast } from 'sonner'
|
||||
import { queryKeys } from '@/lib/query-keys'
|
||||
import { useLanguage } from '@/lib/i18n'
|
||||
|
||||
// ===== INPUT TYPES =====
|
||||
export interface CreateNotebookInput {
|
||||
@@ -101,6 +102,7 @@ interface NotebooksProviderProps {
|
||||
export function NotebooksProvider({ children, initialNotebooks = [] }: NotebooksProviderProps) {
|
||||
// ===== BASE STATE =====
|
||||
const queryClient = useQueryClient()
|
||||
const { t } = useLanguage()
|
||||
const [notebooks, setNotebooks] = useState<Notebook[]>(initialNotebooks)
|
||||
const [currentNotebook, setCurrentNotebook] = useState<Notebook | null>(null)
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
@@ -401,14 +403,12 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks
|
||||
emitNoteChange({ type: 'updated', note: movedNote })
|
||||
}
|
||||
} catch (error) {
|
||||
toast.error('Failed to move note. Please try again.')
|
||||
toast.error(t('notes.moveFailed'))
|
||||
throw error
|
||||
} finally {
|
||||
setIsMovingNote(false)
|
||||
}
|
||||
}, [queryClient, triggerNotebooksRefresh])
|
||||
|
||||
// ===== ACTIONS: AI (STUBS) =====
|
||||
}, [queryClient, triggerNotebooksRefresh, t])
|
||||
const suggestNotebookForNote = useCallback(async (_noteContent: string) => {
|
||||
// Stub pour l'instant - retourne null
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user