Commit Graph

205 Commits

Author SHA1 Message Date
Nils-Johan Gynther 187d0283a5 feat(flyer-import): integrate AI-based flyer parsing with image support
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m31s
Test Suite / flutter-quality (push) Failing after 3m48s
Test Suite / backend-pr-quick (push) Failing after 13m57s
- Add support for PNG, JPEG, and WebP image formats in flyer import
- Replace external importer service with internal AI-based parsing pipeline
- Add new services: TextExtractorService, AiFlyerParserService, FlyerNormalizerService
- Integrate Mistral AI, pdf-parse, and tesseract.js dependencies
- Add quality confidence indicators and warning panels in Flutter UI
- Update package.json with new dependencies and transform ignore patterns
- Add documentation for flyer importer system
- Add Kilo AI planning file for Happy Island project

BREAKING CHANGE: Flyer import now uses internal AI parsing instead of external importer service
2026-05-19 19:57:54 +02:00
Nils-Johan Gynther 0ce1db5471 chore: update flyer import features and resources
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 2m43s
Test Suite / flutter-quality (push) Failing after 1m33s
- Remove outdated Willys flyer PDF (0001-0008_WIL_V21_ED1pdf.pdf)
- Add new Willys flyer PDF (willys_reklamblad.pdf)
- Improve offer detection logic in backend flyer-import service
- Add offer limit text extraction and sanitization in Flutter UI
- Fix Swedish character encoding issues in UI text
2026-05-18 23:40:05 +02:00
Nils-Johan Gynther e658f2e6f1 chore(ci): update project documentation and flyer import features
Update project documentation with recent CI improvements and flyer import enhancements:

- Add ESLint configuration for backend and Dart lints for Flutter
- Document Prisma query logging via PRISMA_LOG_QUERIES environment variable
- Update NEXT_STEPS.md, README.md, and TEKNISK_BESKRIVNING.md with new features
- Add isOffer, offerLimitText, comparisonPrice, comparisonUnit, parseConfidence, and parseReasons fields to FlyerImportItem
- Update FlyerImportResponse type to include new fields
- Extend file picker to support image formats (png, jpg, jpeg, webp)
- Add offer badge display and price formatting in Flutter UI
- Implement PDF preview functionality for flyer import
2026-05-18 23:27:20 +02:00
Nils-Johan Gynther f6ccdd859f ci(github): add linting and improve CI workflow
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 5m14s
Test Suite / flutter-quality (push) Failing after 1m36s
- Add ESLint configuration for backend TypeScript code
- Include linting step in backend quality checks
- Add linting step to GitHub Actions CI workflow
- Enable configurable Prisma query logging via PRISMA_LOG_QUERIES environment variable
- Update PrismaService to support dynamic log levels based on PRISMA_LOG_QUERIES
- Replace BadRequestException with UnauthorizedException in receipt import security tests
2026-05-18 23:01:29 +02:00
Nils-Johan Gynther d5f903db98 chore(import): improve error handling and add 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) Failing after 3m41s
Test Suite / flutter-quality (push) Successful in 2m3s
- Replace BadRequestException with UnauthorizedException for authentication failures in flyer-import and flyer-selection controllers
- Add bulk selection endpoint in FlyerSelectionController for creating multiple selections in one request
- Update FlyerSelectionModule to include new FlyerSelectionMatcherService and FlyerSelectionSyncController
- Extend FlyerSelectionService with createMany method for bulk operations
- Add new DTOs for bulk selection and receipt matching functionality
- Update ReceiptImportService to accept FlyerSelectionService dependency and track successful rows
- Extend SaveReceiptResponse with flyerAutoSync field for receipt-to-flyer matching results
- Add new API paths for flyer import and selection endpoints
- Update Flutter UI to include Flyer import tab and adjust tab controller length
- Add new domain models and repository methods for flyer import functionality
- Update test files to include new FlyerSelectionService dependency
- Modify .kilo plan documentation to reflect current system architecture
2026-05-18 22:51:27 +02:00
Nils-Johan Gynther a31aff7c35 test: update admin aliases panel tests for product model changes
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 2m28s
Test Suite / flutter-quality (push) Successful in 2m21s
- Add imports for new domain models
- Update AdminProduct initialization to include canonicalName
- Update ReceiptAlias initialization to include ownerId and productName
- Replace Switch widget checks with SwitchListTile for global alias test
- Update test data to match new model structure
2026-05-18 18:48:26 +02:00
Nils-Johan Gynther e6961fc593 created kilo.json
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 2m33s
Test Suite / flutter-quality (push) Failing after 1m22s
2026-05-16 09:24:29 +02:00
Nils-Johan Gynther 3d9b124766 feat: add HelpText model, service, and controller for dynamic help text management
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 2m27s
Test Suite / flutter-quality (push) Successful in 1m47s
2026-05-13 16:20:04 +02:00
Nils-Johan Gynther 4492d7aa1c feat: enhance receipt alias management with global scope support and update validation
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 50s
Test Suite / flutter-quality (push) Successful in 50s
2026-05-12 22:20:48 +02:00
Nils-Johan Gynther 621ced0e43 refactor: streamline alias editing and improve category path handling in 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) Failing after 21s
Test Suite / flutter-quality (push) Successful in 57s
2026-05-12 21:53:19 +02:00
Nils-Johan Gynther 46b9be4791 feat: implement update functionality for receipt aliases and add corresponding tests
Test Suite / backend-pr-quick (24.15.0) (push) Has been skipped
Test Suite / quick-import-pr-quick (24.15.0) (push) Has been skipped
Test Suite / backend-full (24.15.0) (push) Failing after 22s
Test Suite / flutter-quality (push) Failing after 4s
2026-05-12 21:25:48 +02:00
Nils-Johan Gynther fb6b371fb7 feat: enhance error dialogs with delete functionality and improve documentation
Test Suite / backend-pr-quick (24.15.0) (push) Has been skipped
Test Suite / quick-import-pr-quick (24.15.0) (push) Has been skipped
Test Suite / backend-full (24.15.0) (push) Failing after 26s
Test Suite / flutter-quality (push) Failing after 4s
2026-05-12 21:11:54 +02:00
Nils-Johan Gynther 98ee8a3ad6 feat: implement real-time database synchronization with SSE and update backend modules
Test Suite / backend-pr-quick (24.15.0) (push) Has been cancelled
Test Suite / backend-full (24.15.0) (push) Has been cancelled
Test Suite / flutter-quality (push) Has been cancelled
2026-05-12 16:57:05 +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 08d14bf9e6 feat: remove obsolete cache tracking file from build directory 2026-05-12 16:12:51 +02:00
Nils-Johan Gynther cd84e25890 feat: enhance category handling with new category chip logic and user-specific product categorization
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 22:03:09 +02:00
Nils-Johan Gynther f19c157e8f feat: add updateCategoryMine endpoint to manage product category updates
Test Suite / test (24.15.0) (push) Has been cancelled
- Implemented a new PATCH endpoint in ProductsController to update the category of a user's product.
- Added corresponding service method in ProductsService to handle business logic and validation.
- Created UpdateCategoryMineDto for request validation.
- Enhanced error handling for forbidden actions and not found resources.
- Updated API error mapping in Flutter to handle specific forbidden messages.
- Modified ProductPickerField to allow product creation directly from the picker.
- Added tests for the new endpoint and service method to ensure proper functionality and error handling.
2026-05-11 21:41:42 +02:00
Nils-Johan Gynther 8e0166c68a feat: Improve category ID handling with dynamic parsing in inventory screens
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 21:18:06 +02:00
Nils-Johan Gynther 3e0af925d5 feat: Refactor inventory screens with category selection and product handling improvements
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 21:09:40 +02:00
Nils-Johan Gynther 2281df3716 feat: Add location display and category chips in pantry and inventory screens
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 20:53:11 +02:00
Nils-Johan Gynther 68476142c1 refactor: Remove PantryProduct class and simplify category resolution in PantryScreen
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 20:01:00 +02:00
Nils-Johan Gynther a635f1002a feat: Enhance inventory screens with category selection and product loading improvements
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 19:40:02 +02:00
Nils-Johan Gynther d05b7da8bc feat: Add isPrivate field to AdminProduct and update filtering logic in admin panels
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 19:30:42 +02:00
Nils-Johan Gynther a4f65c6065 feat: Implement caching for selectable products and enhance product filtering in admin panels
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 18:42:35 +02:00
Nils-Johan Gynther 9b4d1f94bf Refactor category handling in inventory and pantry forms
Test Suite / test (24.15.0) (push) Has been cancelled
- Introduced `_categorySearchController` and `_categoryOptions` in both `_InventoryFormDialogState` and `_PantryFormDialogState` to manage category selection more effectively.
- Implemented `_flattenCategoryOptions` method to create a flat list of category options from nested category nodes.
- Updated the initialization and disposal of the new controllers to ensure proper resource management.
- Made minor adjustments to the PopupMenuItem definitions in `AppShell` for consistency.
2026-05-11 17:03:58 +02:00
Nils-Johan Gynther 3ad6cfee50 feat: Introduce SearchableCategoryField component and integrate it into admin panels for enhanced category selection
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 12:20:57 +02:00
Nils-Johan Gynther f132983b75 feat: Implement admin pantry item management with create and update functionality, including category selection and validation
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 11:18:13 +02:00
Nils-Johan Gynther 573c12cdc3 feat: Add _getMap and _postMap methods for improved API handling and refactor resetPassword to use _postMap
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 10:40:54 +02:00
Nils-Johan Gynther 56050a896b feat: Enhance apple categorization logic and improve bulk category update feedback
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 10:31:57 +02:00
Nils-Johan Gynther 06056c6182 feat: Improve bulk category update functionality with validation and clearer logic
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 10:22:17 +02:00
Nils-Johan Gynther afbc5b91b2 feat: Enhance admin panel navigation and UI by implementing tab management and improving layout structure
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 10:10:03 +02:00
Nils-Johan Gynther 06492ff099 feat: Refactor admin database panel to improve tab management and enhance UI structure with dedicated tab configuration
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 09:55:52 +02:00
Nils-Johan Gynther 1d2c3c9032 feat: Refactor inventory screen to improve type safety and enhance UI structure with dedicated widget methods
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 09:40:42 +02:00
Nils-Johan Gynther d4a7983afb feat: Add bulk delete and merge functionality for inventory items with DTOs and API endpoints
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 09:36:15 +02:00
Nils-Johan Gynther 8e6e0e96b8 feat: Enhance admin user management with search, filtering, and sorting capabilities
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 09:22:19 +02:00
Nils-Johan Gynther 84ccabe2fe feat: Add functionality to move inventory items to pantry and enhance pantry management
Test Suite / test (24.15.0) (push) Has been cancelled
- Implemented moveInventoryItemToPantry method in InventoryRepository to facilitate moving items from inventory to pantry.
- Enhanced InventoryScreen with a new header section providing context about the inventory.
- Added a button in SwipeableInventoryTile to move items to pantry with appropriate error handling.
- Introduced movePantryItemToInventory method in PantryRepository to support moving items back to inventory.
- Refactored PantryScreen to rename _addToInventory to _moveToInventory for clarity and updated UI to reflect changes.
- Added AdminPantryItem model to represent pantry items in the admin panel.
- Created AdminPantryPanel for managing pantry items, including moving items to inventory and listing users.
- Developed AdminPrivateProductsPanel for managing private products, allowing promotion to global products.
2026-05-11 09:06:30 +02:00
Nils-Johan Gynther ca8987d9e4 Add comprehensive documentation for Flutter frontend migration and backend review
Test Suite / test (24.15.0) (push) Has been cancelled
- Introduced user guide for Flutter frontend in README.md, detailing user flows and recent improvements.
- Created next steps roadmap for Flutter migration in next_steps_flutter.md, outlining current tasks and priorities.
- Developed technical description for Flutter frontend in teknisk_beskrivning_flutter.md, covering architecture and security status.
- Removed outdated migration documentation for Prisma P3009 and added recovery steps for failed migrations in migrering-MSI.md.
- Established a release checklist for product launches in produktlansering.md, ensuring security and stability measures are met.
- Formulated a systematic backend review and optimization plan in review_backend.md, focusing on reducing complexity and improving performance.
2026-05-10 00:28:59 +02:00
Nils-Johan Gynther 1709bb1dad Implement admin inventory management features including CRUD operations, merging, filtering, sorting, previewing, and security enhancements. Update documentation and add comprehensive test coverage for security and validation.
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-10 00:20:25 +02:00
Nils-Johan Gynther 65137b41fb feat: implement alias strategy for receipt import with user-scoped and global fallback, enhance validation and normalization, and update UI components
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-09 23:41:42 +02:00
Nils-Johan Gynther 7aa93ff5d0 refactor: streamline error handling by removing redundant SnackBar calls in AdminProductsPanel
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-09 23:26:56 +02:00
Nils-Johan Gynther 14a1107466 feat: add private product management endpoints for updating canonical names and merging products
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-09 23:19:28 +02:00
Nils-Johan Gynther 9f3f5c1cef feat: add canonical name endpoint and update product renaming functionality in admin panel
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-09 22:58:23 +02:00
Nils-Johan Gynther b121000bf7 feat: enhance receipt import matching logic to include category path resolution and improve edit handling
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-09 16:06:19 +02:00
Nils-Johan Gynther 8354abbc8f feat: implement save receipt functionality with transaction handling and DTOs
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-09 15:04:23 +02:00
Nils-Johan Gynther bd78b1de81 feat: add "See receipt" button and preview modal in receipt import flow
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-08 16:56:03 +02:00
Nils-Johan Gynther e3bbd7d99e feat: replace ListView with SingleChildScrollView for better layout in admin panels
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-08 16:31:09 +02:00
Nils-Johan Gynther a5273158e2 fix: correct type casting in onChanged callback in ProductPickerField
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-08 15:33:20 +02:00
Nils-Johan Gynther fc366547c7 feat: clean up imports and fix minor formatting issues in various files
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-08 15:31:30 +02:00
Nils-Johan Gynther 84dbe8490d feat: remove unused methods and improve widget styling in various screens
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-08 15:28:54 +02:00
Nils-Johan Gynther 5019bf6acf feat: add import for ProductOption in receipt_import_tab
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-08 14:33:58 +02:00