Commit Graph

485 Commits

Author SHA1 Message Date
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
gpt-engineer-app[bot]
5eba459d0e Fix: Apply smart merge to all refreshes 2025-10-06 19:47:43 +00:00
gpt-engineer-app[bot]
c3b0ae3d76 Refactor: Apply smart merging to all refreshes 2025-10-06 19:43:36 +00:00
gpt-engineer-app[bot]
fd20c02e5e Implement comprehensive fix 2025-10-06 19:38:39 +00:00
gpt-engineer-app[bot]
d965d2c299 Refactor: Stabilize admin panel auto-refresh 2025-10-06 19:31:15 +00:00
gpt-engineer-app[bot]
71f497a001 Fix N+1 query and UI flashing 2025-10-06 19:19:02 +00:00
gpt-engineer-app[bot]
cc3ec7a6e4 Fix auto-refresh and queue claiming 2025-10-06 19:01:49 +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]
c2c70524f7 Fix photo_delete display issues 2025-10-06 18:16:49 +00:00
gpt-engineer-app[bot]
3f1e4abb62 Fix submission display issues 2025-10-06 18:07:19 +00:00
gpt-engineer-app[bot]
2fc67ebf39 Fix submission display issues 2025-10-06 17:59:34 +00:00
gpt-engineer-app[bot]
25f79a4667 Refactor system log to own page 2025-10-06 17:55:33 +00:00
gpt-engineer-app[bot]
d6bddd6459 feat: Implement system activity log (Phases 1-3) 2025-10-06 17:52:08 +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]
124fe5e76e Implement remaining monitoring features 2025-10-06 16:58:08 +00:00
gpt-engineer-app[bot]
f86b772eca Refactor History component 2025-10-06 16:37:56 +00:00
gpt-engineer-app[bot]
522802f005 Fix: Optimize detail pages for desktop 2025-10-06 16:29:23 +00:00