fix: corriger 4 erreurs console post-migration RSC

- Hydration mismatch @dnd-kit: ajouter id="notes-tabs-dnd" et id="masonry-dnd"
  aux DndContext pour éviter les IDs auto-incrémentaux non-déterministes
  (DndDescribedBy-0 server vs DndDescribedBy-3 client)
- setState in render: refactorer handleDragEnd dans MasonryGrid — remplacer
  le double setLocalNotes() par arrayMove direct + ref pour la persistance
  (évite Cannot update Router while rendering MasonryGrid)
- DialogTitle manquant: ajouter DialogHeader+DialogTitle sr-only dans le
  loading state de AutoLabelSuggestionDialog (Radix accessibility requirement)
- Ajouter useRef pour tracker localNotes sans capturer de stale closure
This commit is contained in:
Sepehr Ramezani
2026-04-17 21:49:13 +02:00
parent cb8bcd13ba
commit f822a6eb18
3 changed files with 22 additions and 13 deletions

View File

@@ -132,6 +132,9 @@ export function AutoLabelSuggestionDialog({
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="max-w-md">
<DialogHeader>
<DialogTitle className="sr-only">{t('ai.autoLabels.analyzing')}</DialogTitle>
</DialogHeader>
<div className="flex flex-col items-center justify-center py-12">
<Loader2 className="h-8 w-8 animate-spin text-primary" />
<p className="mt-4 text-sm text-muted-foreground">