Add safe database migration workflow and note history infrastructure.
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s

This introduces guarded migrations with automatic backups, fixes note creation after DB reset, and wires snapshot/restore history across notes surfaces.
This commit is contained in:
Sepehr Ramezani
2026-04-28 16:50:57 +02:00
parent 0fbb8aa599
commit ed807d3b2a
23 changed files with 8052 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import { getAllNotes } from '@/app/actions/notes'
import { getAISettings } from '@/app/actions/ai-settings'
import { HomeClient } from '@/components/home-client'
export default async function HomePage() {
const [allNotes, settings] = await Promise.all([
getAllNotes(),
getAISettings(),
])
const notesViewMode =
settings?.notesViewMode === 'masonry'
? 'masonry' as const
: settings?.notesViewMode === 'tabs' || settings?.notesViewMode === 'list'
? 'tabs' as const
: 'masonry' as const
return (
<HomeClient
initialNotes={allNotes}
initialSettings={{
showRecentNotes: settings?.showRecentNotes !== false,
notesViewMode,
noteHistory: settings?.noteHistory === true,
}}
/>
)
}