Commit Graph

374 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
4d2d39fb5a feat: Implement custom view tracking 2025-10-10 15:53:56 +00:00
gpt-engineer-app[bot]
a30511fb50 Refactor: Approve lovable tool use 2025-10-10 13:15:12 +00:00
gpt-engineer-app[bot]
61c7a551c2 Approve database migration 2025-10-10 13:04:36 +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
gpt-engineer-app[bot]
1d45294703 Implement realtime queue fix 2025-10-09 13:54:39 +00:00
gpt-engineer-app[bot]
57368eb309 Fix: Correctly drop and recreate claim_next_submission function 2025-10-09 13:43:23 +00:00
gpt-engineer-app[bot]
6ec5ca3bc4 Fix database trigger for moderation queue 2025-10-09 13:38:49 +00:00
gpt-engineer-app[bot]
5f22281961 Fix moderation queue refresh logic 2025-10-09 13:33:11 +00:00
gpt-engineer-app[bot]
9471d25939 Fix: Re-add RLS policy for user profiles 2025-10-09 12:09:04 +00:00
gpt-engineer-app[bot]
036baf9f6d Fix profile data exposure 2025-10-09 12:05:08 +00:00
gpt-engineer-app[bot]
dc53f04d87 Fix RLS policy for profiles 2025-10-09 12:02:31 +00:00
gpt-engineer-app[bot]
07f14cdcb5 Fix: Address security findings 2025-10-09 00:34:37 +00:00
gpt-engineer-app[bot]
10098e3bcc Fix: Implement field-level privacy for profiles 2025-10-08 23:23:03 +00:00
gpt-engineer-app[bot]
5578db1697 Fix: Explicitly declare security invoker for view 2025-10-08 22:55:44 +00:00
gpt-engineer-app[bot]
e1615903e6 Fix: Restrict access to profiles table 2025-10-08 22:44:23 +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
ce91c387bc Enable JWT verification for image upload function
Update supabase/config.toml to set verify_jwt to true for the upload-image function.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 364fb426-1d27-49b2-a244-a34e41c335e4
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:28:25 +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
pac7
b8787ee6de Improve security by verifying user authentication and authorization
Update the 'process-selective-approval' Supabase function to enforce authentication and authorization checks before processing requests. Also, modify the 'upload-image' function to prevent banned users from uploading images. Additionally, enable future React Router v7 features for enhanced navigation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 6d6e48da-5b1b-47f9-a65c-9fa4a352936a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/6d6e48da-5b1b-47f9-a65c-9fa4a352936a/u05utRo
2025-10-07 20:12:39 +00:00
pac7
6737431379 Improve error handling and navigation safety across the application
Add robust error handling for image uploads, improve navigation logic in AutocompleteSearch with toast notifications for missing identifiers, refine useIsMobile hook return type, and update Supabase function error reporting to handle non-Error types.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a759d451-40bf-440d-96f5-a19ad6af18a8
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-07 15:25:37 +00:00
pac7
88ed3207c4 Improve error handling and authentication for uploads and notifications
Refactor PhotoUpload component to fetch session token before polling, enhance error handling in NotificationService and versioningHelpers with `instanceof Error` checks, and add comprehensive validation for request body fields in the create-novu-subscriber Supabase function.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8d708ff6-09f1-4b67-8edc-de3fcb2349b3
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-07 14:55:35 +00:00
pac7
f4020969d8 Add authentication to image upload and status checking endpoints
Implement JWT-based authentication for POST (upload) and GET (status check) requests to the image handling functions, verifying user identity via Supabase Auth.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8d708ff6-09f1-4b67-8edc-de3fcb2349b3
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-07 14:52:37 +00:00
pac7
1addcbc0dd Improve error handling and environment configuration across the application
Enhance input validation, update environment variable usage for Supabase and Turnstile, and refine image upload and auth logic for better robustness and developer experience.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cb061c75-702e-4b89-a8d1-77a96cdcdfbb
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/cb061c75-702e-4b89-a8d1-77a96cdcdfbb/ANdRXVZ
2025-10-07 14:42:22 +00:00
gpt-engineer-app[bot]
e1e8fa2ddc Fix auto-refresh and queue claiming 2025-10-06 18:58:21 +00:00
gpt-engineer-app[bot]
2f71312f7c Implement Test Data Generator 2025-10-06 18:48:24 +00:00
gpt-engineer-app[bot]
f5c59aa072 Fix admin dashboard auto-refresh 2025-10-06 18:36:43 +00:00
gpt-engineer-app[bot]
63a7877314 Refactor: Approve tool use 2025-10-06 18:24:20 +00:00
gpt-engineer-app[bot]
3210147654 Fix: Add dashboard widget for flow violations 2025-10-06 17:01:41 +00:00
gpt-engineer-app[bot]
fae8542c45 Fix: Correct RLS policies and function security 2025-10-06 16:50:00 +00:00