Commit Graph

91 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
4d96f45e74 feat: Implement Novu package migration 2025-10-12 15:40:37 +00:00
gpt-engineer-app[bot]
391e6a07fd Refactor account deletion flow 2025-10-12 14:31:26 +00:00
gpt-engineer-app[bot]
8d814d43a1 Refactor avatar deletion logic 2025-10-12 14:22:27 +00:00
gpt-engineer-app[bot]
3a38b47108 Implement account deletion system 2025-10-12 14:17:54 +00:00
gpt-engineer-app[bot]
c5ad432667 feat: Update Discord username in edge function 2025-10-12 00:51:45 +00:00
gpt-engineer-app[bot]
cf94eef683 Fix Discord OAuth data format 2025-10-12 00:43:58 +00:00
gpt-engineer-app[bot]
721fe82a00 Fix Discord OAuth data extraction 2025-10-12 00:35:04 +00:00
gpt-engineer-app[bot]
0b97904064 Fix: Correct Discord identity data access 2025-10-12 00:31:37 +00:00
gpt-engineer-app[bot]
5fb92f97bd Fix Discord OAuth profile handling 2025-10-12 00:29:25 +00:00
gpt-engineer-app[bot]
3d91092953 Fix: Use correct Cloudflare credentials 2025-10-12 00:24:58 +00:00
gpt-engineer-app[bot]
5f8cb16453 Fix: Use account hash for Cloudflare avatars 2025-10-12 00:19:04 +00:00
gpt-engineer-app[bot]
8d5e235772 Fix Cloudflare avatar upload 2025-10-12 00:11:01 +00:00
gpt-engineer-app[bot]
d6f9f4d9a3 feat: Implement OAuth profile enhancement 2025-10-11 23:56:44 +00:00
gpt-engineer-app[bot]
5adf855b04 Fix: Implement company submission and validation plan 2025-10-10 19:28:15 +00:00
gpt-engineer-app[bot]
45dcb5fe5c Fix: Ensure parks are available for ride generation 2025-10-10 18:20:38 +00:00
gpt-engineer-app[bot]
7a1607f149 Fix company type distribution logic 2025-10-10 18:15:56 +00:00
gpt-engineer-app[bot]
0aee7673ec Fix ride model submission constraint 2025-10-10 18:11:05 +00:00
gpt-engineer-app[bot]
93e908aef7 Refactor: Implement multi-stage generation 2025-10-10 18:07:54 +00:00
gpt-engineer-app[bot]
a7dec173df Fix: Ensure all entity types are generated 2025-10-10 18:00:15 +00:00
gpt-engineer-app[bot]
e9adf70eb8 Fix ride model generation 2025-10-10 17:58:06 +00:00
gpt-engineer-app[bot]
b256b6f9ab Fix company count calculation 2025-10-10 17:52:50 +00:00
gpt-engineer-app[bot]
7b2e890165 feat: Add debug logging for company generation 2025-10-10 17:48:24 +00:00
gpt-engineer-app[bot]
0c3d3ac0a9 Fix company generation pluralization 2025-10-10 17:35:55 +00:00
gpt-engineer-app[bot]
b155d8c327 Fix: Reorder company generation before parks 2025-10-10 17:27:55 +00:00
gpt-engineer-app[bot]
bc36583598 Refactor: Approve test data generator tool use 2025-10-10 16:44:08 +00:00
gpt-engineer-app[bot]
a30511fb50 Refactor: Approve lovable tool use 2025-10-10 13:15:12 +00:00
gpt-engineer-app[bot]
37daceff75 Fix: Resolve form validation and type errors 2025-10-09 19:46:08 +00:00
gpt-engineer-app[bot]
73eb8a60e5 Fix retry flashing and reloading 2025-10-09 18:04:02 +00:00
gpt-engineer-app[bot]
88bcb00157 Fix Retry flashing and dependency validation 2025-10-09 17:55:58 +00:00
gpt-engineer-app[bot]
ff7c90e62d Fix edge function role check 2025-10-09 17:07:42 +00:00
gpt-engineer-app[bot]
cf31f94c44 Fix fetchItems calls and edge function error 2025-10-09 15:53:01 +00:00
gpt-engineer-app[bot]
1557def354 feat: Implement test data generation improvements 2025-10-09 14:49:54 +00:00
pac7
b580db3fb0 Improve error handling and stability across the application
Refactor error handling in `useEntityVersions` and `useSearch` hooks, enhance `NotificationService` with better error extraction and logging, and implement critical fallback mechanisms in the `detect-location` function's rate limit cleanup. Update CORS configuration in `upload-image` function for stricter origin checks and better security.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f4df1950-6410-48d0-b2de-f4096732504b
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 20:23:01 +00:00
pac7
13a4d8f64c Improve error handling and display for searches and uploads
Enhance user feedback by displaying search errors, refine photo submission fetching, add rate limiting cleanup logic, improve image upload cleanup, and strengthen moderator permission checks.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2741d09b-80fb-4f0a-bfd6-ababb2ac4bfc
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 19:55:55 +00:00
pac7
023f56eed7 Improve image upload functionality for authenticated users
Refactor `supabase/functions/upload-image/index.ts` to extract Supabase client creation into a new helper function `createAuthenticatedSupabaseClient`. This improves code organization and reusability by centralizing the logic for initializing an authenticated Supabase client using JWT authentication.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e0cbed76-4668-44f7-95b4-a456009b318d
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 19:40:07 +00:00
pac7
4bdbdac7c3 Improve form validation and image handling for entities
Refactor validation logic for 'founded_year' in multiple form components, enhance image cleanup in `EntityMultiImageUploader`, update `useEntityVersions` to prevent race conditions, improve error handling for recent searches in `useSearch`, refine rate limiting logic in `detect-location` Supabase function, and update CORS configuration for `upload-image` Supabase function.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b9af4867-23a7-43cc-baeb-4a97f66b4150
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 18:58:43 +00:00
pac7
ed7580fefc Update image upload to securely handle cross-origin requests
Refactor CORS configuration in the image upload Supabase function to implement environment-aware origin validation and allow-credentials for improved security.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 567218be-0199-4aaa-af7e-8307f67d4453
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 18:30:37 +00:00
pac7
3832439d67 Improve image upload and test data generation functionalities
Refactors `uploadPendingImages` to use `Promise.allSettled` for parallel uploads and implements JSON path queries in `clearTestData` and `getTestDataStats` for more robust test data management. Enhances `seed-test-data` function to support creating data conflicts and version chains, and adds validation for `imageId` format in `upload-image` function. Updates `AutocompleteSearch` to use a default search types constant.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: dc31cf9d-7a06-4420-8ade-e7b7f5200e71
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 18:14:34 +00:00
pac7
0f2219f849 Improve image handling, optimize hooks, and add rate limiting
This commit introduces several improvements:
- Enhances `RideModelCard` by safely accessing and displaying ride count and image data, preventing potential errors.
- Refactors `useEntityVersions` and `useSearch` hooks to use `useCallback` and improve performance and prevent race conditions.
- Introduces a `MAX_MAP_SIZE` and cleanup mechanism for the rate limiting map in `detect-location` Supabase function to prevent memory leaks.
- Adds robust error handling and cleanup for image uploads in `uploadPendingImages`.
- Modifies `ManufacturerModels` to correctly map and display ride counts.
- Includes error handling for topological sort in `process-selective-approval` Supabase function.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 39bb006b-d046-477f-a1f9-b7821836f3a1
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 17:55:37 +00:00
pac7
61285b0261 Add rate limiting to location detection and standardize error messages
Introduces rate limiting to the `detect-location` function and refactors error responses in `upload-image` to provide consistent, descriptive messages.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b3d7d4df-59a9-4a9c-971d-175b92dadbfa
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/b3d7d4df-59a9-4a9c-971d-175b92dadbfa/1VcvPNb
2025-10-08 17:18:00 +00:00
pac7
012f2995fa Improve error handling and input validation for notification preferences
Add input validation for userId and channelPreferences, and enhance error reporting for Novu API calls by returning detailed results for each channel update.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8c5cf3e-a80e-462f-b090-b081acdcf03a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 14:05:36 +00:00
pac7
94631fd31b Update user notification preferences in Novu system
Modify the Supabase function to iterate through channel preferences and update each individually using the Novu SDK, including error handling for each channel update.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8c5cf3e-a80e-462f-b090-b081acdcf03a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 14:02:03 +00:00
pac7
543e7fe81e Improve error handling and data assignment in test data seeding
Fixes TypeScript errors in the seed data edge function by correctly assigning `userId` instead of `user.id` and safely accessing error messages.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8c5cf3e-a80e-462f-b090-b081acdcf03a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 13:56:00 +00:00
pac7
aee512b8a1 Improve security by auditing service role key usage in edge functions
Audit and document the usage of service role keys in multiple Supabase edge functions (cancel-email-change, process-selective-approval, seed-test-data) to ensure secure and scoped access.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fe5b902e-beda-40fc-bf87-a3c4ab300e3a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:56:58 +00:00
pac7
2b1dcd70ef Improve error reporting for location detection to include status codes
Update the detect-location Supabase function to return a 500 status code and an error message on failure, improving debugging and error monitoring.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fe5b902e-beda-40fc-bf87-a3c4ab300e3a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:53:14 +00:00
pac7
32a83013e5 Update email cancellation and location detection functions
Refactor Supabase function to use explicit JWT verification via auth.getUser, and enhance the location detection function with configurable geolocation API endpoints.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 364fb426-1d27-49b2-a244-a34e41c335e4
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:32:19 +00:00
pac7
2fc78cbde5 Improve error handling and dependency checks for data processing
Address issues in FieldHistoryDialog by clearing changes on error, enhance useEntityVersions to provide default profiles for missing users, add localStorage availability check in useLocationAutoDetect, and improve dependency resolution logic in supabase/functions/process-selective-approval.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 334e80ad-8f74-4e3a-acec-6dd811858e98
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:23:22 +00:00
pac7
163b721271 Improve email sending by adding error handling and fixing security
Add try-catch blocks to Supabase functions for robust error handling during email sending and response processing.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a46bc7a0-bbf8-43ab-97c0-a58c66c2e365
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:07:42 +00:00
pac7
0b57cba16f Improve security and error handling in backend functions
Update Supabase functions for cancel-email-change, detect-location, send-escalation-notification, and upload-image to enhance security and implement robust error handling.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a46bc7a0-bbf8-43ab-97c0-a58c66c2e365
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:06:35 +00:00
pac7
ccea99fecd Securely handle email change cancellations and improve Supabase function error handling
Update supabase/functions/cancel-email-change/index.ts to use secure base64 decoding for JWTs and enhance error handling for Supabase functions.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a46bc7a0-bbf8-43ab-97c0-a58c66c2e365
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:04:35 +00:00