Commit Graph

682 Commits

Author SHA1 Message Date
f73b1422ab feat: Update AI service to use new Google Generative AI SDK
Some checks are pending
Deploy to Test Environment / deploy-to-test (push) Has started running
- Refactored AIService to integrate with the latest GoogleGenAI SDK, updating the generateContent method signature and response handling.
- Adjusted error handling and logging for improved clarity and consistency.
- Enhanced mock implementations in tests to align with the new SDK structure.
refactor: Modify Admin DB service to use Profile type
- Updated AdminRepository to replace User type with Profile in relevant methods.
- Enhanced test cases to utilize mock factories for creating Profile and AdminUserView objects.
fix: Improve error handling in BudgetRepository
- Implemented type-safe checks for PostgreSQL error codes to enhance error handling in createBudget method.
test: Refactor Deals DB tests for type safety
- Updated DealsRepository tests to use Pool type for mock instances, ensuring type safety.
chore: Add new mock factories for testing
- Introduced mock factories for UserWithPasswordHash, Profile, WatchedItemDeal, LeaderboardUser, and UnmatchedFlyerItem to streamline test data creation.
style: Clean up queue service tests
- Refactored queue service tests to improve readability and maintainability, including better handling of mock worker instances.
docs: Update types to include UserWithPasswordHash
- Added UserWithPasswordHash interface to types for better clarity on user authentication data structure.
chore: Remove deprecated Google AI SDK references
- Updated code and documentation to reflect the migration to the new Google Generative AI SDK, removing references to the deprecated SDK.
2025-12-14 17:14:44 -08:00
eb0e183f61 Refactor test setup and improve mock implementations
Some checks are pending
Deploy to Test Environment / deploy-to-test (push) Has started running
- Introduced `createTestApp` utility to standardize Express app creation for tests, including JSON parsing, mock logger, and error handling.
- Updated all route tests to utilize `createTestApp`, enhancing consistency and reducing boilerplate code.
- Implemented `mockLogger` for cleaner test output and easier logging mock management.
- Adjusted passport mocks to ensure proper user authentication simulation across tests.
- Enhanced type safety by augmenting Express Request interface with `req.log` and `req.user` properties.
- Removed redundant code and improved readability in various test files.
2025-12-14 14:47:19 -08:00
edb0f8a38c Refactor database tests to improve type safety and error handling
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Updated mock implementations in various database service tests to use specific types (Pool, PoolClient) instead of 'any'.
- Enhanced error handling in tests by explicitly defining error types and codes, improving clarity and maintainability.
- Removed unnecessary eslint-disable comments related to 'any' usage.
- Cleaned up transaction mock implementations to ensure proper type casting.
- Adjusted error handling in the UserRepository to provide more specific error messages for foreign key constraints.
- Improved test assertions to ensure they are more robust and type-safe.
2025-12-14 13:29:38 -08:00
56f14f6342 feat: Enhance API validation and error handling across routes
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Added tests for invalid request bodies in price and recipe routes.
- Improved type safety in request handlers using Zod schemas.
- Introduced a consistent validation pattern for empty request bodies.
- Enhanced error messages for invalid query parameters in stats and user routes.
- Implemented middleware to inject mock logging for tests.
- Created a custom type for validated requests to streamline type inference.
2025-12-14 12:53:10 -08:00
9757f9dd9f Refactor MainLayout to use new hooks for flyers and master items; consolidate error handling
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
Update error handling tests to ensure proper status assignment for errors
2025-12-14 11:05:04 -08:00
571ca59e82 refactor: Update tests and components for improved type safety and mock handling
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 3h11m16s
2025-12-14 01:38:21 -08:00
f891da687b Refactor tests to use mockClient for database interactions, improve error handling, and enhance modal functionality
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Updated personalization.db.test.ts to use mockClient for query calls in addWatchedItem tests.
- Simplified error handling in shopping.db.test.ts, ensuring clearer error messages.
- Added comprehensive tests for VoiceAssistant component, including rendering and interaction tests.
- Introduced useModal hook with tests to manage modal state effectively.
- Created deals.db.test.ts to test deals repository functionality with mocked database interactions.
- Implemented error handling tests for custom error classes in errors.db.test.ts.
- Developed googleGeocodingService.server.test.ts to validate geocoding service behavior with mocked fetch.
2025-12-14 01:12:33 -08:00
7615d7746e feat: Enhance logging and type safety across various components and services
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
2025-12-13 23:12:50 -08:00
77454b04c2 Add comprehensive tests for hooks, middleware, and routes
Some checks are pending
Deploy to Test Environment / deploy-to-test (push) Has started running
- Implement tests for `useFlyers`, `useMasterItems`, `useModal`, `useUserData` hooks to ensure correct functionality and error handling.
- Create tests for `fileUpload.middleware` and `validation.middleware` to validate file uploads and request data.
- Add tests for `AddressForm` and `AuthView` components to verify rendering, user interactions, and API calls.
- Develop tests for `deals.routes` to check authentication and response for best prices on watched items.
2025-12-13 21:30:43 -08:00
424cbaf0d4 feat: Implement deals repository and routes for fetching best watched item prices
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Added a new DealsRepository class to interact with the database for fetching the best sale prices of watched items.
- Created a new route `/api/users/deals/best-watched-prices` to handle requests for the best prices of items the authenticated user is watching.
- Enhanced logging in the FlyerDataTransformer and FlyerProcessingService for better traceability.
- Updated tests to ensure proper logging and functionality in the FlyerProcessingService.
- Refactored logger client to support structured logging for better consistency across the application.
2025-12-13 20:02:18 -08:00
2affda25dc Refactor geocoding services and improve logging
- Updated the Nominatim geocoding service to use a class-based structure and accept a logger instance for better logging control.
- Modified tests for the Nominatim service to align with the new structure and improved logging assertions.
- Removed the disabled notification service test file.
- Added a new GeocodingFailedError class to handle geocoding failures more explicitly.
- Enhanced error logging in the queue service to include structured error objects.
- Updated user service to accept a logger instance for better logging in address upsert operations.
- Added request-scoped logger to Express Request interface for type-safe logging in route handlers.
- Improved logging in utility functions for better debugging and error tracking.
- Created a new GoogleGeocodingService class for Google Maps geocoding with structured logging.
- Added tests for the useAiAnalysis hook to ensure proper functionality and error handling.
2025-12-13 17:52:30 -08:00
728f4a5f7e Refactor useWatchedItems hook to utilize useApi for API calls, update tests accordingly
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 18m15s
- Replaced direct API calls in useWatchedItems with useApi hook for add and remove watched items.
- Updated tests for useWatchedItems to mock useApi and verify API interactions.
- Consolidated error handling for API calls in useWatchedItems.
- Adjusted related hooks and components to ensure compatibility with the new structure.
- Added new ScaleIcon component for UI consistency.
- Implemented useFlyerItems and useFlyers hooks for fetching flyer data.
- Created useMasterItems and useUserData hooks for managing master grocery items and user data.
- Developed useInfiniteQuery hook for handling paginated API responses.
- Added comprehensive tests for useApi and useInfiniteQuery hooks.
- Introduced comparePrices API endpoint and corresponding client-side functionality.
2025-12-13 08:57:15 -08:00
117f034b2b ADR1-3 on routes + db files
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 17m30s
2025-12-12 16:09:59 -08:00
e37a32c890 route testing refactoring using zod - ADR-003
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 16m3s
2025-12-12 13:16:58 -08:00
d004efb84b testing ADR - architectural decisions
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 16m21s
2025-12-12 10:57:49 -08:00
1bd27d7112 testing ADR - architectural decisions
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 14m37s
2025-12-12 00:23:12 -08:00
0b3d095c9c ADR ++ good
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
2025-12-12 00:06:01 -08:00
8b06a66b17 testing ADR - architectural decisions
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
2025-12-12 00:01:35 -08:00
d3d637ebfe unit test fixes + error refactor
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 13m41s
2025-12-11 21:17:48 -08:00
5d7598eadf unit test fixes + error refactor
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 12m45s
2025-12-11 20:26:34 -08:00
27ef5901f1 unit test fixes + error refactor
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 11m53s
2025-12-11 19:20:38 -08:00
0bc65574c2 unit test fixes + error refactor
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 10m52s
2025-12-11 18:23:59 -08:00
5f1901b93d unit test fixes + error refactor
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 10m20s
2025-12-11 14:16:25 -08:00
d6f0b446a5 add price history routes and implement modal hook; enhance MainLayout tests with default mock values
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 9m36s
2025-12-11 03:26:05 -08:00
6aa72dd90b unit test fixin
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 8m50s
2025-12-11 00:53:24 -08:00
99d0dba296 better errors for routes
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 8m2s
2025-12-10 22:53:30 -08:00
b929925a6e lots more tests !
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 7m32s
2025-12-10 21:02:01 -08:00
d1ff066d1b deploy changes for prod/test
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy-production (push) Has been cancelled
Deploy to Web Server flyer-crawler.projectium.com / deploy-to-test (push) Has been cancelled
Deploy to Test Environment / deploy-to-test (push) Failing after 7m21s
2025-12-10 17:21:07 -08:00
5ad632b8d0 deploy changes for prod/test
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy-to-test (push) Failing after 7m16s
Deploy to Web Server flyer-crawler.projectium.com / deploy-production (push) Has been skipped
Deploy to Test Environment / deploy-to-test (push) Failing after 7m22s
2025-12-10 13:51:30 -08:00
37cb1825af deploy changes to test and production environments
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy-to-test (push) Failing after 7m17s
Deploy to Web Server flyer-crawler.projectium.com / deploy-production (push) Has been skipped
Deploy to Test Environment / deploy-to-test (push) Failing after 7m23s
2025-12-10 13:14:34 -08:00
8d12f744bc main page improvements
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 8m2s
2025-12-10 12:42:07 -08:00
0694a5501f added genai rate limiting
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 7m47s
2025-12-10 10:29:57 -08:00
331df90f1b testing flyer upload
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m12s
2025-12-10 09:44:46 -08:00
7dc53831ff some minor log in fixes - also new flyer function
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m14s
2025-12-10 09:31:22 -08:00
8da5a2118e registration errors in progress
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m16s
2025-12-10 08:41:30 -08:00
7912d29961 home page errors in progress
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 8m50s
2025-12-09 23:41:18 -08:00
12e6b0b44d home page errors in progress
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m0s
2025-12-09 23:29:17 -08:00
e39a7560ee home page errors in progress
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m57s
2025-12-09 23:11:09 -08:00
d230a2163e routes cleanup
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m3s
2025-12-09 22:17:39 -08:00
84ebbeb677 routes cleanup
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m57s
2025-12-09 20:46:25 -08:00
e16a519aa2 remove routes from 'public.routes'
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m11s
2025-12-09 20:06:56 -08:00
a30ec029d4 fix tests ugh
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m55s
2025-12-09 19:17:48 -08:00
23e0c44b61 fix tests ugh
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m53s
2025-12-09 18:48:17 -08:00
4674309ea1 fix tests ugh
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m55s
2025-12-09 18:18:56 -08:00
b3372b6fa3 fix tests ugh
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m57s
2025-12-09 17:38:23 -08:00
6354189d5c fix tests ugh
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m59s
2025-12-09 17:06:43 -08:00
3a66f31d55 fix tests ugh
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m53s
2025-12-09 16:03:11 -08:00
c60e19a03b fix logging tests
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m55s
2025-12-09 15:19:27 -08:00
8bfadcd2d9 fix logging tests
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m52s
2025-12-09 14:52:46 -08:00
9f50d7d942 fix logging tests
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m53s
2025-12-09 14:23:58 -08:00