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

@@ -82,6 +82,7 @@ model Notebook {
icon String?
color String?
order Int
parentId String?
userId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -91,9 +92,12 @@ model Notebook {
notes Note[]
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
workflows Workflow[]
parent Notebook? @relation("NotebookTree", fields: [parentId], references: [id], onDelete: Cascade)
children Notebook[] @relation("NotebookTree")
@@index([userId, order])
@@index([userId])
@@index([parentId])
}
model Label {