Commit Graph

854 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
2ccbb51fb1 Fix validation errors and display 2025-10-10 00:38:04 +00:00
gpt-engineer-app[bot]
d09e62410f feat: Improve validation visibility in moderation queue 2025-10-09 20:31:47 +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]
8c5cf40ccb feat: Implement phases 5, 6, and 7 2025-10-09 18:52:38 +00:00
gpt-engineer-app[bot]
f8232e4555 feat: Implement comprehensive validation system 2025-10-09 18:15:38 +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]
a1953b8557 Fix TypeScript errors in moderation queue 2025-10-09 17:34:18 +00:00
gpt-engineer-app[bot]
3f2e6504aa Fix flashing and bouncing on admin page 2025-10-09 17:33:19 +00:00
gpt-engineer-app[bot]
9d3bdcf2e0 Fix flashing and bouncing 2025-10-09 17:17:20 +00:00
gpt-engineer-app[bot]
356cf2b54b Fix admin page flashing 2025-10-09 17:14:45 +00:00
gpt-engineer-app[bot]
9866b87f7f feat: Add detailed logging to PhotoSubmissionDisplay 2025-10-09 16:46:39 +00:00
gpt-engineer-app[bot]
3e698a3da8 Fix photo submission query 2025-10-09 16:41:40 +00:00
gpt-engineer-app[bot]
6782da1992 Fix: Display all fields for submissions 2025-10-09 16:00:16 +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]
039fe46e55 Refactor: Implement debouncing and anti-flashing fixes 2025-10-09 15:47:09 +00:00
gpt-engineer-app[bot]
f01c58a056 Fix moderation queue flashing 2025-10-09 15:35:30 +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]
5f22281961 Fix moderation queue refresh logic 2025-10-09 13:33:11 +00:00
gpt-engineer-app[bot]
cec8b0e0b5 Fix moderation queue infinite refresh 2025-10-09 13:18:08 +00:00
gpt-engineer-app[bot]
d4b41b6d75 Fix silent polling filter 2025-10-09 13:06:20 +00:00
gpt-engineer-app[bot]
a02442a3cc Fix silent polling logic 2025-10-09 13:00:53 +00:00
gpt-engineer-app[bot]
b1c62093aa Fix: Stop infinite fetchItems loop 2025-10-09 12:55:25 +00:00
gpt-engineer-app[bot]
c79b12da76 Refactor: Use admin settings for queue refresh 2025-10-09 12:45:28 +00:00
gpt-engineer-app[bot]
732efa9992 Fix: App not loading 2025-10-09 12:28:04 +00:00
gpt-engineer-app[bot]
fb4396e217 Fix moderation queue refreshing 2025-10-09 12:18:50 +00:00
gpt-engineer-app[bot]
72bfa69139 Fix: Remove SECURITY DEFINER views 2025-10-08 22:34:05 +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
166ef04589 Update sidebar to remove unused import
Remove the unused `useSidebar` import from the `AdminSidebar` component.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e0cbed76-4668-44f7-95b4-a456009b318d
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 19:42:30 +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
bfba3baf7e Improve component stability and user experience with safety checks
Implement robust error handling, safety checks for data structures, and state management improvements across various components to prevent runtime errors and enhance user experience.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a71e826a-1d38-4b6e-a34f-fbf5ba1f1b25
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 19:27:31 +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
21bd962767 Improve ride model card to show unknown for missing category or type
Update RideModelCardProps to accept null or undefined for category and type, returning 'Unknown' if they are not provided.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 567218be-0199-4aaa-af7e-8307f67d4453
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 18:32:24 +00:00
pac7
57082de69a Update company search navigation to handle missing identifiers gracefully
Modify AutocompleteSearch.tsx to remove direct use of companyId for navigation, instead handling unknown company types and missing identifiers by showing a toast and returning to search results.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 567218be-0199-4aaa-af7e-8307f67d4453
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 18:31:59 +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
3e2ce53fa7 Add tabs to organize moderation items and their statuses
Introduces a `QueueTab` type and state for 'mainQueue' and 'archive', updating `fetchItems` to accept the tab parameter. Modifies query logic to apply status filters based on the selected tab in `ModerationQueue.tsx`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e14c2292-b0e5-43fe-b301-a4ad668949e9
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-08 14:50:34 +00:00
pac7
0050032681 Implement claim and freeze system for moderation queue
Refactors the moderation queue to implement a "claim and freeze" model, preventing automatic updates during background polling and enforcing claim/lock isolation. Adds a `claimSubmission` function to `useModerationQueue` and modifies `ModerationQueue.tsx` to filter submissions based on claim status and update handling.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e14c2292-b0e5-43fe-b301-a4ad668949e9
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 14:48:15 +00:00
pac7
fb10642fed Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e14c2292-b0e5-43fe-b301-a4ad668949e9
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-08 14:40:20 +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
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
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
pac7
bf7dd93d9e Update image sources to use environment variables for dynamic image hosting
Updates image URLs across various components and pages to dynamically fetch images using Cloudflare's image hosting service, configured via environment variables. Also updates the theme provider import for Sonner toasts and modifies the Supabase upload function to use a configurable Supabase URL.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f1469493-0a69-4efc-91bd-478d1879573a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/f1469493-0a69-4efc-91bd-478d1879573a/HYhVkSk
2025-10-07 14:10:00 +00:00
gpt-engineer-app[bot]
ca7e5296ed Fix infinite loop in moderation queue 2025-10-06 21:07:21 +00:00
gpt-engineer-app[bot]
38db325135 Fix race condition in moderation queue 2025-10-06 20:49:14 +00:00
gpt-engineer-app[bot]
1c356ed69e Reconstruct fetchItems function 2025-10-06 20:24:46 +00:00