fix(brainstorm): notebookId URL param + lookup carnet + bouton 'Open notebook'
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 4m13s
CI / Deploy production (on server) (push) Has been skipped

- brainstorm-page.tsx: lit urlNotebookId depuis URL params
- useConvertIdea accepte targetNotebookId (hook mis à jour)
- handleConvert prend le carnet ciblé en paramètre
- URL notebookId propage via router.push depuis le modal de confirmation
- toast inclut le nom du carnet et un bouton 'Open notebook' qui redirige vers /home?notebook=X
- peek panel affiche un lien vers le carnet source en haut du titre
- useNotebooks pour le lookup du nom depuis notebooks

Vrai fix: les notes vont maintenant là où l'utilisateur a choisi,
pas dans un carnet auto-créé sans qu'il s'en aperçoive.
This commit is contained in:
Antigravity
2026-07-05 20:01:12 +00:00
parent 02b835fb13
commit 5aa7202abe
4 changed files with 31 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
import { type ReactNode } from 'react'
import { motion, AnimatePresence, useReducedMotion } from 'motion/react'
import { X, Maximize2, Loader2 } from 'lucide-react'
import { X, Maximize2, Loader2, FolderOpen } from 'lucide-react'
import { useLanguage } from '@/lib/i18n'
import type { Note } from '@/lib/types'
import { NotePeekContent } from './note-peek-content'
@@ -77,6 +77,15 @@ export function NotePeekPanel({
renderContent(note, blockId)
) : (
<>
{note.notebookId && (
<a
href={`/home?notebook=${note.notebookId}`}
className="inline-flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-widest text-brand-accent hover:text-brand-accent/70 transition-colors mb-2 cursor-pointer"
>
<FolderOpen size={11} />
{t('brainstorm.openNotebook') || 'Open notebook'}
</a>
)}
<h2 className="text-xl font-serif font-medium text-ink dark:text-dark-ink mb-6">
{note.title || t('notePeek.untitled') || 'Untitled'}
</h2>