Commit Graph

14 Commits

Author SHA1 Message Date
Nils-Johan Gynther 026323b72a refactor(ai): enhance AI trace integration and OCR normalization
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 3m54s
Test Suite / flutter-quality (push) Failing after 1m29s
- Add FlyerTraceSupplement type for AI trace metadata
- Implement getFlyerTraceSupplements method to fetch trace supplements
- Update AiTraceService to include prompt/rawOutput and counters in flyer traces
- Add persistFlyerTrace method to FlyerImportService for trace persistence
- Enhance AiFlyerParserService to return structured trace data with prompts and retries
- Update FlyerNormalizerService with OCR typo fixes for cheese variants and spröd bakad firre
- Improve Flutter admin panel with selectable text, warnings display, and tooltips
- Add comprehensive tests for AI trace supplements and normalization rules
2026-05-21 19:11:54 +02:00
Nils-Johan Gynther 67a7590525 feat(ai): add AI trace tracking and admin panel
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 12m45s
Test Suite / flutter-quality (push) Failing after 7m24s
- Add AiTrace model to Prisma schema with relations to User
- Implement AiTraceService with CRUD operations for AI traces
- Add new admin panel for AI traces with filtering and detail views
- Integrate trace persistence in receipt import flow
- Add API endpoints for listing and retrieving AI traces
- Update Flutter admin UI with new AI tab and navigation
- Add new domain models for AI traces and details
- Add migration for AiTrace table creation

BREAKING CHANGE: None
2026-05-21 17:33:21 +02:00
Nils-Johan Gynther a1a2c33427 feat(shopping-list): add shopping list feature with flyer integration
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 5m8s
Test Suite / flutter-quality (push) Failing after 1m41s
This commit introduces a comprehensive shopping list feature with the following key changes:

Backend:
- Added ShoppingListItem model with relations to User, Product, and Category
- Added new fields to FlyerSession for source file metadata
- Added categoryId field to FlyerItem model
- Implemented session source file retrieval endpoint
- Added endpoint for updating flyer session items with category assignment
- Added endpoint for planning flyer selections to shopping list
- Implemented backfillCategoriesMine for AI-assisted category assignment
- Added ShoppingListModule and integrated with FlyerSelectionModule

Frontend:
- Added ShoppingListScreen and navigation route
- Implemented API paths and client methods for shopping list operations
- Added category tree loading for shopping list item creation
- Integrated shopping list functionality in flyer import tab
- Added category backfill trigger in inventory screen
- Updated FlyerImportItem model with categoryId support
- Added methods for updating flyer session items and retrieving source files

Database:
- Added new Prisma migration for flyer source metadata and shopping list items
- Updated schema with new relations and indexes

The shopping list feature allows users to:
1. Plan flyer selections directly to their shopping list
2. View and manage their shopping list items
3. Update flyer session items with proper categorization
4. Retrieve original flyer source files
5. Automatically backfill categories for uncategorized products
2026-05-20 09:07:30 +02:00
Nils-Johan Gynther 6cd5b80adb feat(flyer-import): add session management and retrieval endpoints
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m15s
Test Suite / flutter-quality (push) Failing after 1m25s
- Add new API endpoints for retrieving flyer import sessions:
  - GET /flyer-import/sessions/latest - Retrieve latest session for user
  - GET /flyer-import/sessions/:sessionId - Retrieve specific session
- Implement session persistence and restoration in Flutter UI
- Add toJson() methods to FlyerImportItem and FlyerImportResult for serialization
- Add new FlyerImportSession domain model for local session management
- Add unit test file for FlyerImportService
- Update FlyerImportController with new endpoints and user ID extraction
- Update FlyerImportService with session retrieval logic and response mapping
- Update API paths in Flutter client
- Add session restoration on widget init in FlyerImportTab
2026-05-19 21:55:55 +02:00
Nils-Johan Gynther d645d3ad9d feat: add Flutter quality checks and tests for category chips in inventory and pantry screens
Test Suite / test (24.15.0) (push) Has been cancelled
Test Suite / flutter-quality (push) Has been cancelled
2026-05-12 16:13:10 +02:00
Nils-Johan Gynther 111d196403 test: add fake token storage implementation for testing purposes 2026-04-23 21:25:00 +02:00
Nils-Johan Gynther db1128ceaf Refactor code structure for improved readability and maintainability
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 21:14:46 +02:00
Nils-Johan Gynther 108c633d0e refactor(tests): clean up profile_repository_test and enhance error handling in API calls 2026-04-23 19:06:29 +02:00
Nils-Johan Gynther 41aba1799d refactor(tests): reorder import statements for consistency in profile_repository_test 2026-04-23 18:52:54 +02:00
Nils-Johan Gynther 910c3a58dc refactor(tests): update profile_repository_test to include MockRef for improved testing 2026-04-23 18:50:24 +02:00
Nils-Johan Gynther 5644101b68 refactor(profile): update ProfileRepository to include MockRef for improved testing and enhance error handling in API calls 2026-04-23 18:01:13 +02:00
Nils-Johan Gynther 2256ddb29b refactor(profile): update ProfileRepository to include Ref for improved state management and enhance error handling in tests 2026-04-23 17:55:17 +02:00
Nils-Johan Gynther aefc8804ad Add unit tests for ProfileRepository and implement new shaders
- Created `NativeAssetsManifest.json` and added font and shader assets for unit tests.
- Implemented `ink_sparkle.frag` and `stretch_effect.frag` shaders for visual effects.
- Developed unit tests for `ProfileRepository` to validate API interactions for fetching and updating user profiles.
- Utilized Mockito for mocking API client responses in tests.
2026-04-23 17:50:48 +02:00
Nils-Johan Gynther c163821bad feat: refactor API paths for authentication, inventory, and recipes; add contract tests for repositories 2026-04-22 10:21:07 +02:00