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

@@ -154,15 +154,19 @@ export default function HomePage() {
// Load settings + notes in a single effect to avoid cascade re-renders
useEffect(() => {
let cancelled = false
const load = async () => {
// Load settings first
let showRecent = true
try {
const settings = await getAISettings()
if (cancelled) return
showRecent = settings?.showRecentNotes !== false
} catch (error) {
} catch {
// Default to true on error
}
if (cancelled) return
setShowRecentNotes(showRecent)
// Then load notes
@@ -174,12 +178,12 @@ export default function HomePage() {
const notebookFilter = searchParams.get('notebook')
let allNotes = search ? await searchNotes(search, semanticMode, notebookFilter || undefined) : await getAllNotes()
if (cancelled) return
// Filter by selected notebook
if (notebookFilter) {
allNotes = allNotes.filter((note: any) => note.notebookId === notebookFilter)
} else {
// If no notebook selected, only show notes without notebook (Notes générales)
allNotes = allNotes.filter((note: any) => !note.notebookId)
}
@@ -190,9 +194,7 @@ export default function HomePage() {
)
}
// Filter by color (filter notes that have labels with this color)
// Note: We use a ref-like pattern to avoid including labels in dependencies
// This prevents dialog closing when adding new labels
// Filter by color
if (colorFilter) {
const labelNamesWithColor = labels
.filter((label: any) => label.color === colorFilter)
@@ -226,7 +228,6 @@ export default function HomePage() {
if (notebookFilter) {
setRecentNotes(recentFiltered.filter((note: any) => note.notebookId === notebookFilter))
} else {
// Show ALL recent notes when in inbox (not just notes without notebooks)
setRecentNotes(recentFiltered)
}
} else {
@@ -238,6 +239,7 @@ export default function HomePage() {
}
load()
return () => { cancelled = true }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [searchParams, refreshKey]) // Intentionally omit 'labels' to prevent reload when adding tags
// Get notebooks context to display header