Redesign notes list and editor to match Keep-style mockups.

Add checklist, activity link, location, analyze flag, and audio attachments with a real API-backed masonry UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-05 19:13:01 +03:30
co-authored by Cursor
parent 32af147237
commit 4e3dbb4e00
7 changed files with 2049 additions and 838 deletions
@@ -0,0 +1,21 @@
-- AlterTable
ALTER TABLE "Note" ADD COLUMN IF NOT EXISTS "checklist" JSONB;
ALTER TABLE "Note" ADD COLUMN IF NOT EXISTS "activityId" TEXT;
ALTER TABLE "Note" ADD COLUMN IF NOT EXISTS "locationText" TEXT;
ALTER TABLE "Note" ADD COLUMN IF NOT EXISTS "analyzeEnabled" BOOLEAN NOT NULL DEFAULT true;
-- CreateIndex
CREATE INDEX IF NOT EXISTS "Note_activityId_idx" ON "Note"("activityId");
-- AddForeignKey
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_constraint WHERE conname = 'Note_activityId_fkey'
) THEN
ALTER TABLE "Note"
ADD CONSTRAINT "Note_activityId_fkey"
FOREIGN KEY ("activityId") REFERENCES "Activity"("id")
ON DELETE SET NULL ON UPDATE CASCADE;
END IF;
END $$;
+8
View File
@@ -383,6 +383,7 @@ model Activity {
assignee User? @relation("ActivityAssignee", fields: [assigneeId], references: [id], onDelete: SetNull)
createdById String?
createdBy User? @relation("ActivityCreator", fields: [createdById], references: [id], onDelete: SetNull)
notes Note[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -405,12 +406,18 @@ model Note {
color String? @default("default")
tags String[] @default([])
reminderAt DateTime?
/// [{ id: string, text: string, done: boolean }]
checklist Json?
locationText String?
analyzeEnabled Boolean @default(true)
personId String?
person Person? @relation(fields: [personId], references: [id], onDelete: SetNull)
companyId String?
company Company? @relation(fields: [companyId], references: [id], onDelete: SetNull)
dealId String?
deal Deal? @relation(fields: [dealId], references: [id], onDelete: SetNull)
activityId String?
activity Activity? @relation(fields: [activityId], references: [id], onDelete: SetNull)
authorId String?
author User? @relation("NoteAuthor", fields: [authorId], references: [id], onDelete: SetNull)
attachments NoteAttachment[]
@@ -424,6 +431,7 @@ model Note {
@@index([personId])
@@index([companyId])
@@index([dealId])
@@index([activityId])
@@index([authorId])
}