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:
@@ -1082,6 +1082,27 @@ export async function getRecentNotes(limit: number = 3) {
|
||||
}
|
||||
}
|
||||
|
||||
// Get count of unassigned notes (Inbox count) — notes without a notebook
|
||||
export async function getInboxCount() {
|
||||
const session = await auth()
|
||||
if (!session?.user?.id) return 0
|
||||
|
||||
try {
|
||||
const count = await prisma.note.count({
|
||||
where: {
|
||||
userId: session.user.id,
|
||||
notebookId: null,
|
||||
isArchived: false,
|
||||
trashedAt: null,
|
||||
},
|
||||
})
|
||||
return count
|
||||
} catch (error) {
|
||||
console.error('Error counting inbox notes:', error)
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
// Dismiss a note from Recent section
|
||||
export async function dismissFromRecent(id: string) {
|
||||
const session = await auth();
|
||||
|
||||
Reference in New Issue
Block a user