feat: hierarchical notebooks (tree), remove all list view code, delete 22 unused files
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m3s

- Add parentId to Notebook model (tree structure)
- Update sidebar to render parent/child notebooks with expand/collapse
- Add sub-notebook creation from parent notebook
- Remove 'list' from NotesViewMode type everywhere
- Delete 22 unused components, hooks, and UI files
- Wrap revalidatePath in try-catch to prevent save 500
- Update notebook API to support parentId in creation
This commit is contained in:
Antigravity
2026-05-09 21:02:23 +00:00
parent 5a6ec4808f
commit d90b29b34f
30 changed files with 155 additions and 4280 deletions

View File

@@ -14,7 +14,7 @@ export type UserAISettingsData = {
preferredLanguage?: 'auto' | 'en' | 'fr' | 'es' | 'de' | 'fa' | 'it' | 'pt' | 'ru' | 'zh' | 'ja' | 'ko' | 'ar' | 'hi' | 'nl' | 'pl'
demoMode?: boolean
showRecentNotes?: boolean
notesViewMode?: 'masonry' | 'tabs' | 'list'
notesViewMode?: 'masonry' | 'tabs'
emailNotifications?: boolean
desktopNotifications?: boolean
anonymousAnalytics?: boolean
@@ -64,8 +64,7 @@ function pickUserAISettingsForDb(input: UserAISettingsData): Partial<Record<User
if (
out.notesViewMode != null &&
out.notesViewMode !== 'masonry' &&
out.notesViewMode !== 'tabs' &&
out.notesViewMode !== 'list'
out.notesViewMode !== 'tabs'
) {
delete out.notesViewMode
}
@@ -170,9 +169,7 @@ const getCachedAISettings = unstable_cache(
? ('masonry' as const)
: raw === 'tabs'
? ('tabs' as const)
: raw === 'list'
? ('list' as const)
: ('masonry' as const)
: ('masonry' as const)
return {
titleSuggestions: settings.titleSuggestions,