Commit Graph

13 Commits

Author SHA1 Message Date
4491e4c6f1 feat(09-01): add classification column to setupItems with service layer and tests
- Add classification text column (default 'base') to setupItems schema
- Add classificationSchema and updateClassificationSchema Zod validators
- Add UpdateClassification type inferred from Zod schema
- Implement updateItemClassification service function
- Modify getSetupWithItems to return classification field
- Modify syncSetupItems to preserve classifications across re-sync
- Add tests for classification CRUD, preservation, and cross-setup independence
- Generate and apply Drizzle migration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 15:11:18 +01:00
9342085dd1 test(08-01): add failing tests for candidate status field
- 5 tests: create with/without status, update status, getThreadWithCandidates includes status
- Test helper updated with status column in thread_candidates CREATE TABLE

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 14:07:51 +01:00
431c179814 test(07-01): add failing tests for formatWeight unit conversion
- Tests for all 4 units (g, oz, lb, kg) with known gram values
- Null and undefined handling for each unit
- Default parameter backward compatibility
- Zero and precision edge cases
- 11 pass (existing behavior), 10 fail (new unit conversion)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:15:09 +01:00
b496462df5 chore: auto-fix Biome formatting and configure lint rules
All checks were successful
CI / ci (push) Successful in 15s
Run biome check --write --unsafe to fix tabs, import ordering, and
non-null assertions across entire codebase. Disable a11y rules not
applicable to this single-user app. Exclude auto-generated routeTree.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 19:51:34 +01:00
546dff151b feat(06-01): migrate categories from emoji to Lucide icon field
- Rename emoji column to icon in schema, Zod schemas, and all services
- Add Drizzle migration with emoji-to-icon data conversion
- Update test helper, seed, and all test files for icon field
- All 87 tests pass with new icon-based schema

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 17:48:23 +01:00
ed8508110f feat(04-01): update thread service, routes, and hooks for categoryId
- createThread now inserts categoryId from data
- getAllThreads joins categories table, returns categoryName/categoryEmoji
- updateThread accepts optional categoryId
- ThreadListItem interface includes category fields
- useCreateThread hook sends categoryId
- Fix test files to pass categoryId when creating threads

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 16:31:48 +01:00
629e14f60c feat(04-01): add categoryId to threads schema, Zod schemas, and test helper
- Add categoryId column with FK to categories on threads table
- Update createThreadSchema to require categoryId
- Update updateThreadSchema to allow optional categoryId
- Update test helper CREATE TABLE to include category_id

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 16:30:46 +01:00
1e4e74f8d2 test(03-01): add failing tests for setup backend
- Add setups and setupItems tables to DB schema
- Add Zod schemas for setup create/update/sync
- Add Setup/SetupItem types to shared types
- Add setup tables to test helper
- Write service and route tests (RED - no implementation yet)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 12:42:15 +01:00
37c9999d07 test(02-01): add failing integration tests for thread API routes
- 14 integration tests covering all thread and candidate endpoints
- Thread CRUD, candidate CRUD, and resolution endpoint tests
- Covers error cases: 400 validation, 404 not found, resolved re-resolve

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 11:38:35 +01:00
e146eeab80 test(02-01): add failing tests for thread service
- Add threads and threadCandidates tables to Drizzle schema
- Add Zod schemas for thread/candidate/resolve validation
- Add Thread/ThreadCandidate types to shared types
- Update test helper with threads and thread_candidates tables
- Write comprehensive failing tests for thread service

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 11:36:01 +01:00
029adf4dca feat(01-02): add Hono API routes with validation, image upload, and integration tests
- Item routes: GET, POST, PUT, DELETE with Zod validation and image cleanup
- Category routes: GET, POST, PUT, DELETE with Uncategorized protection
- Totals route: per-category and global aggregates
- Image upload: multipart file handling with type/size validation
- Routes use DI via Hono context variables for testability
- Integration tests: 10 tests covering all endpoints and edge cases
- All 30 tests passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 22:40:49 +01:00
f90677988d test(01-02): add failing tests for item, category, and totals services
- Item CRUD tests: create, getAll, getById, update, delete
- Category CRUD tests: create, getAll, update, delete with reassignment
- Totals tests: per-category and global aggregates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 22:38:40 +01:00
7412ef1d86 feat(01-01): add database schema, shared Zod schemas, seed, and test infrastructure
- Create Drizzle schema with items, categories, and settings tables
- Set up database connection singleton with WAL mode and foreign keys
- Add seed script for default Uncategorized category
- Create shared Zod validation schemas for items and categories
- Export TypeScript types inferred from Zod and Drizzle schemas
- Add in-memory SQLite test helper for isolated test databases
- Wire seed into Hono server startup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 22:34:53 +01:00