chore: mark US-006 complete in prd.json and update progress log
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
4
prd.json
4
prd.json
@@ -104,8 +104,8 @@
|
|||||||
"Typecheck passes"
|
"Typecheck passes"
|
||||||
],
|
],
|
||||||
"priority": 6,
|
"priority": 6,
|
||||||
"passes": false,
|
"passes": true,
|
||||||
"notes": ""
|
"notes": "Completed: projects.list (filters by clientId + includeArchived via drizzle and()), projects.listAll (id+name only), projects.get (returns null if not found), projects.create (UUID + status='active' + createdAt), projects.update (partial set object), projects.delete (nulls tasks.projectId then deletes project)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "US-007",
|
"id": "US-007",
|
||||||
|
|||||||
18
progress.txt
18
progress.txt
@@ -51,6 +51,24 @@
|
|||||||
- The `writingMode: 'vertical-rl'` + `transform: 'rotate(180deg)'` CSS pattern creates bottom-to-top text for vertical affordance labels
|
- The `writingMode: 'vertical-rl'` + `transform: 'rotate(180deg)'` CSS pattern creates bottom-to-top text for vertical affordance labels
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 2026-02-19 - US-006
|
||||||
|
- What was implemented:
|
||||||
|
- Full `projectsRouter` replacing stubs in `src/main/router/index.ts`
|
||||||
|
- Added `and` to drizzle-orm imports
|
||||||
|
- `projects.list`: uses `and()` with optional conditions for `clientId` filter and archived filter (defaults to active only)
|
||||||
|
- `projects.listAll`: returns only `{ id, name }` columns for dropdown use
|
||||||
|
- `projects.get`: `.all()` then `result[0] ?? null` pattern for nullable single-record lookup
|
||||||
|
- `projects.create`: inserts with UUID, status='active', createdAt=Date.now()
|
||||||
|
- `projects.update`: partial set object — only sets defined fields
|
||||||
|
- `projects.delete`: nulls `tasks.projectId` for all tasks in the project, then deletes the project
|
||||||
|
- Files changed: `src/main/router/index.ts`, `prd.json`, `progress.txt`
|
||||||
|
- **Learnings for future iterations:**
|
||||||
|
- `and(...conditions)` from drizzle-orm accepts `(SQL | undefined)[]` — pass `undefined` for optional conditions and drizzle filters them out automatically
|
||||||
|
- For nullable single-record queries: use `.all()` and `result[0] ?? null` (strict mode forbids `.get()` direct null return without this pattern)
|
||||||
|
- `and()` returns `SQL<unknown> | undefined` which `.where()` accepts directly (no extra wrapping needed)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 2026-02-19 - US-005
|
## 2026-02-19 - US-005
|
||||||
- What was implemented:
|
- What was implemented:
|
||||||
- Full clients tRPC router replacing stubs in `src/main/router/index.ts`
|
- Full clients tRPC router replacing stubs in `src/main/router/index.ts`
|
||||||
|
|||||||
Reference in New Issue
Block a user