Commit Graph

1033 Commits

Author SHA1 Message Date
pac7
0ba594c16d Improve error handling and fix minor code issues
Address HMR errors, enhance Supabase Edge Function error handling, and resolve minor code quality issues in hooks.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 5191c2bb-cd42-429f-a7dc-1c028b81e199
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/5191c2bb-cd42-429f-a7dc-1c028b81e199/b4xFOCI
2025-10-08 17:29:24 +00:00
pac7
fff532a191 Improve theme hook performance by removing unused dependency
Optimize useNovuTheme hook by removing the unused theme variable from the useMemo dependency array, preventing unnecessary recalculations.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 5191c2bb-cd42-429f-a7dc-1c028b81e199
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/5191c2bb-cd42-429f-a7dc-1c028b81e199/U85RZre
2025-10-08 17:27:23 +00:00
pac7
6270241109 Improve logging and error handling for better system stability
Update application to implement more robust logging mechanisms and improve error handling routines, ensuring greater system stability and easier debugging.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 5191c2bb-cd42-429f-a7dc-1c028b81e199
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/5191c2bb-cd42-429f-a7dc-1c028b81e199/U85RZre
2025-10-08 17:24:39 +00:00
pac7
a3598cf01d Improve application reliability and error handling
Add rate limiting to location detection, standardize error responses, verify HMR stability, and validate Cloudflare integration.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b3d7d4df-59a9-4a9c-971d-175b92dadbfa
Replit-Commit-Checkpoint-Type: full_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:40 +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
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
eb39e794e0 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:31:52 +00:00
pac7
c5d008687e Improve application stability and security with bug fixes and updates
Implement several bug fixes and security enhancements, including improved Novu API integration, enhanced input validation, corrected TypeScript errors, verified memory management, enabled JWT verification for image uploads, replaced manual JWT decoding with Supabase verification, and made the Geolocation API configurable.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8c5cf3e-a80e-462f-b090-b081acdcf03a
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-08 14:06:39 +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
9eb5e61d4a Saved your changes before starting work
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8c5cf3e-a80e-462f-b090-b081acdcf03a
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-08 13:36:06 +00:00
pac7
039d1b460b Improve authentication hook and data fetching logic
Fix memory leaks in the authentication hook by correctly clearing timeouts. Address incorrect dependency arrays in effects and improve data fetching reliability by memoizing functions. Refactor error handling in location detection function to return appropriate status codes. Ensure compatibility with Fast Refresh and optimize hook dependencies.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fe5b902e-beda-40fc-bf87-a3c4ab300e3a
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-08 12:57:22 +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
852adc51d6 Improve mobile detection hook for better cross-device compatibility
Update useIsMobile hook to use MediaQueryList.matches for detecting mobile devices, addressing SSR compatibility and improving initial value setting and event listening.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fe5b902e-beda-40fc-bf87-a3c4ab300e3a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:54:03 +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
3606e2ab54 Improve data fetching performance and fix fast refresh issues
Refactor `fetchData` in `ManufacturerModels.tsx` using `useCallback` to prevent unnecessary re-renders and memoize the function. Add `fetchData` to the `useEffect` dependency array in `ManufacturerModels.tsx` to ensure it's correctly called. Address Fast Refresh compatibility in `useAuth.tsx` and correct `setInterval` dependency in `useModerationQueue.ts`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fe5b902e-beda-40fc-bf87-a3c4ab300e3a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:52:32 +00:00
pac7
9a1c41c874 Improve performance and fix potential issues in manufacturer ride pages
Refactor `fetchData` in `ManufacturerRides.tsx` to use `useCallback` for memoization, resolving `useEffect` dependency issues and preventing unnecessary re-renders.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fe5b902e-beda-40fc-bf87-a3c4ab300e3a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:52:00 +00:00
pac7
4718db4002 Improve authentication hook to avoid development refresh issues
Refactors the AuthProvider component in `src/hooks/useAuth.tsx` to properly export the component, addressing Fast Refresh compatibility warnings and improving developer experience.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fe5b902e-beda-40fc-bf87-a3c4ab300e3a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-08 12:51:25 +00:00
pac7
994a07f4af Update user authentication to correctly track previous email addresses
Replaces `previousEmail` state with a ref (`previousEmailRef`) to accurately track the user's old email address during authentication flow, specifically for handling email change notifications.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a16cce43-1d93-4e5c-a1e6-6ca90e68cc4f
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-08 12:44:37 +00:00
pac7
ced8fb6015 Improve security and configuration of multiple web application functions
Update JWT verification in image upload and email change functions, make geolocation API configurable, and enhance error handling in Supabase Edge Functions.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 364fb426-1d27-49b2-a244-a34e41c335e4
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-08 12:33:05 +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
9f93c3a4b9 Improve ticket filtering to show only high and medium priority issues
No diff provided.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 334e80ad-8f74-4e3a-acec-6dd811858e98
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-08 12:24:04 +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
6f74fcaed7 Improve security and error handling in theme park application
Address JWT decoding vulnerability in email change function and enhance Supabase Edge Function error handling.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a46bc7a0-bbf8-43ab-97c0-a58c66c2e365
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-08 12:08:32 +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
8f0e31ec9f Saved your changes before starting work
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a46bc7a0-bbf8-43ab-97c0-a58c66c2e365
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-07 20:20:22 +00:00
pac7
6c59f150e8 Improve security and code quality with authorization fixes and updates
Update Edge Functions for JWT verification and banned user checks, add React Router v7 compatibility flags, and simplify the moderation API by removing client-supplied userId.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 6d6e48da-5b1b-47f9-a65c-9fa4a352936a
Replit-Commit-Checkpoint-Type: full_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:13:17 +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
ff4a1521bb Saved your changes before starting work
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 6d6e48da-5b1b-47f9-a65c-9fa4a352936a
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-07 19:54:54 +00:00
pac7
04527e854d Fix critical issues that are preventing core functionality
No changes detected.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8e00d8b1-e8de-4f48-99ca-dbba7279e1a6
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/8e00d8b1-e8de-4f48-99ca-dbba7279e1a6/NrmVbQd
2025-10-07 15:47:00 +00:00
pac7
8afa0bbad2 Improve reliability when updating data subscriptions
Add try-catch block to handle potential errors during Supabase channel removal in `useEntityVersions.ts`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8e00d8b1-e8de-4f48-99ca-dbba7279e1a6
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-07 15:46:16 +00:00
pac7
f97bb91b11 Improve handling of recent searches to prevent errors
Add error handling and validation for parsing recent searches from localStorage in src/hooks/useSearch.tsx.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8e00d8b1-e8de-4f48-99ca-dbba7279e1a6
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-07 15:44:45 +00:00
pac7
856be29a9d Improve server access by allowing any host to connect
Update vite.config.ts to set server.allowedHosts to true.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8e00d8b1-e8de-4f48-99ca-dbba7279e1a6
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-07 15:44:19 +00:00
pac7
ce0942f3db Fix errors that prevent users from accessing certain features
No changes were made to the codebase.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 853a87ae-e13d-4762-9a69-fbd3990ed527
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-07 15:38:12 +00:00
pac7
ab05998b58 Improve logging and update development server port
Add error handling for notification log insertion and change Vite dev server port from 8080 to 5000.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 853a87ae-e13d-4762-9a69-fbd3990ed527
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-07 15:37:50 +00:00
pac7
f02ba17760 Improve project documentation with updated technical details
Update README with detailed descriptions of the frontend and backend architecture, including tech stacks, component structures, routing, and database schema.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a759d451-40bf-440d-96f5-a19ad6af18a8
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-07 15:27:03 +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
8c2ec57f9f Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a759d451-40bf-440d-96f5-a19ad6af18a8
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-07 15:03:28 +00:00
pac7
1241670492 Improve security, performance, and error handling across the application
Enhance security by adding authentication to image uploads, optimize token fetching in PhotoUpload.tsx, and improve input validation and error handling in multiple backend functions and services.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8d708ff6-09f1-4b67-8edc-de3fcb2349b3
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-07 14:56: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
0ebff53b41 Improve security and fix race conditions and memory leaks
Update environment variables for Supabase and Cloudflare, fix race conditions in hooks, and resolve memory leaks in the upload component.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cb061c75-702e-4b89-a8d1-77a96cdcdfbb
Replit-Commit-Checkpoint-Type: full_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:43:14 +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
01c2df62a8 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cb061c75-702e-4b89-a8d1-77a96cdcdfbb
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-07 14:21:53 +00:00