fix(keep-notes): sidebar chevron, labels sync, batch org errors, perf guards

- Notebooks: chevron visible when expanded (remove overflow clip), functional expand state
- Labels: sync/cleanup by notebookId, reconcile after note move
- Settings: refresh notebooks after cleanup; label dialog routing
- ConnectionsBadge lazy-load; reminder check persistence; i18n keys

Made-with: Cursor
This commit is contained in:
Sepehr Ramezani
2026-04-13 22:07:09 +02:00
parent fa7e166f3e
commit 39671c6472
16 changed files with 469 additions and 303 deletions

View File

@@ -42,6 +42,7 @@ export async function POST(request: NextRequest) {
data: plan,
})
} catch (error) {
console.error('[batch-organize POST] Error:', error)
return NextResponse.json(
{
success: false,

View File

@@ -2,6 +2,7 @@ import { NextRequest, NextResponse } from 'next/server'
import prisma from '@/lib/prisma'
import { auth } from '@/auth'
import { revalidatePath } from 'next/cache'
import { reconcileLabelsAfterNoteMove } from '@/app/actions/notes'
// POST /api/notes/[id]/move - Move a note to a notebook (or to Inbox)
export async function POST(
@@ -60,10 +61,12 @@ export async function POST(
// Update the note's notebook
// notebookId = null or "" means move to Inbox (Notes générales)
const targetNotebookId = notebookId && notebookId !== '' ? notebookId : null
const updatedNote = await prisma.note.update({
where: { id },
data: {
notebookId: notebookId && notebookId !== '' ? notebookId : null
notebookId: targetNotebookId
},
include: {
notebook: {
@@ -72,6 +75,8 @@ export async function POST(
}
})
await reconcileLabelsAfterNoteMove(id, targetNotebookId)
revalidatePath('/')
return NextResponse.json({