From 30fde857f458a6bf182afce4ce6af4802ed4cca9 Mon Sep 17 00:00:00 2001 From: Roberto Musso Date: Thu, 19 Feb 2026 17:05:29 +0100 Subject: [PATCH] chore: mark US-008 complete in prd.json and update progress log Co-Authored-By: Claude Sonnet 4.6 --- prd.json | 4 ++-- progress.txt | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/prd.json b/prd.json index 9101acb..d2b53a6 100644 --- a/prd.json +++ b/prd.json @@ -142,8 +142,8 @@ "Typecheck passes" ], "priority": 8, - "passes": false, - "notes": "" + "passes": true, + "notes": "Completed: checkpoints.list (ordered by date, optional projectId filter), checkpoints.create (UUID + createdAt + defaults for isAiSuggested/isApproved), checkpoints.update (partial set), checkpoints.delete. notes.list (returns id/projectId/title/createdAt/updatedAt — no content), notes.get (full record or null), notes.create (UUID + createdAt + updatedAt), notes.update (partial set, always updates updatedAt), notes.delete." }, { "id": "US-009", diff --git a/progress.txt b/progress.txt index 665e986..dd56737 100644 --- a/progress.txt +++ b/progress.txt @@ -17,6 +17,27 @@ --- +## 2026-02-19 - US-008 +- What was implemented: + - Full `checkpointsRouter` replacing stubs in `src/main/router/index.ts` + - Full `notesRouter` replacing stubs in `src/main/router/index.ts` + - Added `checkpoints` and `notes` to the schema import + - `checkpoints.list`: optional `projectId` filter, ordered by `asc(checkpoints.date)` + - `checkpoints.create`: inserts with UUID, createdAt=Date.now(), defaults isAiSuggested/isApproved to 0 + - `checkpoints.update`: partial set for title/date/isApproved + - `checkpoints.delete`: deletes by id, returns `{ success: true }` + - `notes.list`: returns `{ id, projectId, title, createdAt, updatedAt }` only — no content (performance) + - `notes.get`: returns full record or null via `.all()[0] ?? null` pattern + - `notes.create`: inserts with UUID, createdAt=updatedAt=Date.now() + - `notes.update`: partial set, always sets updatedAt=Date.now() regardless of which fields changed + - `notes.delete`: deletes by id, returns `{ success: true }` +- Files changed: `src/main/router/index.ts`, `prd.json`, `progress.txt` +- **Learnings for future iterations:** + - `notes.update` must always set `updatedAt` — build the set object with updatedAt outside the conditional block + - `notes.list` intentionally excludes `content` column for performance; use `notes.get` for full record + - `checkpoints.projectId` is `.notNull()` in schema (unlike tasks.projectId which is nullable) — no null coalescing needed +--- + ## 2026-02-19 - US-003 - What was implemented: - Installed: electron-trpc, @trpc/server, @trpc/client, @trpc/react-query, @tanstack/react-query, zod