Commit Graph

2068 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
5cc5d3eab6 testing changes with virtual file cleanup 2025-11-12 15:12:30 +00:00
gpt-engineer-app[bot]
706e36c847 Add staggered expand animation
Implement sequential delays for detailed view expansions:
- Add staggerIndex prop support to DetailedViewCollapsible and apply per-item animation delays.
- Pass item index in SubmissionItemsList when rendering detailed sections.
- Ensure each detailed view expands with a 50ms incremental delay (up to a max) for a staggered effect.

X-Lovable-Edit-ID: edt-6eb47d5c-853d-43ab-96a7-16a5cc006c30
2025-11-12 14:56:11 +00:00
gpt-engineer-app[bot]
a1beba6996 testing changes with virtual file cleanup 2025-11-12 14:56:11 +00:00
gpt-engineer-app[bot]
d7158756ef Animate detailed view transitions
Improve user experience by adding smooth animation transitions to expand/collapse of All Fields (Detailed View) sections, enhance collapsible base to support animation, and apply transitions to detailed view wrapper and chevron indicators.

X-Lovable-Edit-ID: edt-9a567ba5-b52f-46b3-bdef-b847b9ba7963
2025-11-12 14:53:19 +00:00
gpt-engineer-app[bot]
3330a8fac9 testing changes with virtual file cleanup 2025-11-12 14:53:18 +00:00
gpt-engineer-app[bot]
c09a343d08 Add moderation_preferences column
Adds a JSONB moderation_preferences column to user_preferences (with default '{}'), plus comment and GIN index, enabling per-user persistence of detailed view state and resolving TS errors.

X-Lovable-Edit-ID: edt-b953d926-c053-45f2-b434-2b776f3d9569
2025-11-12 14:50:57 +00:00
gpt-engineer-app[bot]
9893567a30 testing changes with virtual file cleanup 2025-11-12 14:50:56 +00:00
gpt-engineer-app[bot]
771405961f Add tooltip for expanded count
Enhance persistence for moderator preferences

- Add tooltip to moderation queue toggle showing number of items with detailed views expanded (based on global state, tooltip adapts to expanded/collapsed).
- Persist expanded/collapsed state per moderator in the database instead of localStorage, integrating with user preferences and Supabase backend.

X-Lovable-Edit-ID: edt-61e75a20-f83d-40b2-8bc4-b6ff40b23450
2025-11-12 14:45:07 +00:00
gpt-engineer-app[bot]
437e2b353c testing changes with virtual file cleanup 2025-11-12 14:45:06 +00:00
gpt-engineer-app[bot]
44a713af62 Add global toggle for detailed views
Implement a new global control in the moderation queue header to expand/collapse all "All Fields (Detailed View)" sections at once. This includes:
- Integrating useDetailedViewState with a new header-level button in QueueFilters
- Adding a button that toggles all detailed views and shows Expand/Collapse state
- Ensuring the toggle updates all DetailedViewCollapsible instances via shared state
- Keeping UI consistent with existing icons and styling

X-Lovable-Edit-ID: edt-22d9eca7-0c70-44d8-865d-791ef884dfbd
2025-11-12 14:42:34 +00:00
gpt-engineer-app[bot]
46275e0f1e testing changes with virtual file cleanup 2025-11-12 14:42:33 +00:00
gpt-engineer-app[bot]
6bd7d24a1b Add item-level history badge and animations
- Show a dynamic field-count badge next to All Fields (Detailed View) in the moderation queue
- Animate collapsible sections with smooth transitions for expand/collapse
- Pass fieldCount to DetailedViewCollapsible and render count alongside header; add animation utility in DetailedViewCollapsible.tsx
- Ensure SubmissionItemsList passes item data to calculate field counts and display badges accordingly

X-Lovable-Edit-ID: edt-ffd226b0-af99-491b-b6b8-3fe0063e0082
2025-11-12 14:40:52 +00:00
gpt-engineer-app[bot]
72e76e86af testing changes with virtual file cleanup 2025-11-12 14:40:51 +00:00
gpt-engineer-app[bot]
a35486fb11 Add collapsible detailed view
Implements expand/collapse for the All Fields (Detailed View) sections in the moderation queue:
- Adds useDetailedViewState hook to persist collapse state in localStorage (default collapsed)
- Adds DetailedViewCollapsible wrapper component using Radix Collapsible
- Updates SubmissionItemsList to wrap each detailed view block with the new collapsible, and imports the new hook and component

X-Lovable-Edit-ID: edt-a95a840d-e7e7-4f9e-aa25-03bb68194aee
2025-11-12 14:36:50 +00:00
gpt-engineer-app[bot]
3d3ae57ee3 testing changes with virtual file cleanup 2025-11-12 14:36:49 +00:00
gpt-engineer-app[bot]
46c08e10e8 Add item-level approval history
Introduce ItemLevelApprovalHistory component to display which specific submission items were approved, when, and by whom, and integrate it into QueueItem between metadata and audit trail. The component shows item names, approval timestamps, action types, and reviewer info.
2025-11-12 14:28:50 +00:00
gpt-engineer-app[bot]
b22546e7f2 Add audit trail and filters
Implements audit trail view for item approvals, adds approval date range filtering to moderation queue, and wires up UI and backend components (Approval History page, ItemApprovalHistory component, materialized view-based history, and query/filters integration) to support compliant reporting and time-based moderation filtering.
2025-11-12 14:06:34 +00:00
gpt-engineer-app[bot]
7b0825e772 Add approved_at support
Added approved_at column to submission_items, updated process_approval_transaction to set approved_at on approvals, and updated TypeScript types to include approved_at. migrations and generated types updated accordingly.
2025-11-12 13:45:30 +00:00
gpt-engineer-app[bot]
1a57b4f33f Add approved_at support
- Add approved_at column to submission_items and index
- Update process_approval_transaction to set approved_at on approval
- Extend TypeScript types to include approved_at for submission items
2025-11-12 13:40:07 +00:00
gpt-engineer-app[bot]
4c7731410f Add approved_at column and update flow
Implements migration to add approved_at to submission_items, creates index, and updates process_approval_transaction to set approved_at on approvals. Also updates TypeScript types to include approved_at and aligns edge function behavior accordingly.
2025-11-12 13:36:22 +00:00
gpt-engineer-app[bot]
beacf481d8 Fix approved_at reference
Recreated process_approval_transaction RPC without updating approved_at
drops erroneous column usage and updates updated_at explicitly to mark approvals.
2025-11-12 13:31:05 +00:00
gpt-engineer-app[bot]
00054f817d Fix edge function serve wrap
Add missing serve() wrapper and correct CORS configuration in supabase/functions/process-selective-approval/index.ts, and import necessary modules. This ensures the edge function handles requests and applies proper CORS headers.
2025-11-12 13:21:16 +00:00
gpt-engineer-app[bot]
d18632c2b2 Improve moderation edge flow and timeout handling
- Add early logging and health check to process-selective-approval edge function
- Implement idempotency check with timeout to avoid edge timeouts
- Expose health endpoint for connectivity diagnostics
- Increase client moderation action timeout from 30s to 60s
- Update moderation actions hook to accommodate longer timeouts
2025-11-12 13:15:54 +00:00
gpt-engineer-app[bot]
09c320f508 Remove version number badge from VersionIndicator
Replace the badge with unchanged Last edited and View History UI, keeping dialog and history functionality intact. Update RollbackDialog to support preview of changes and wider dialog, and integrate existing diff logic to preview before rollback. Adjust VersionIndicator to stop displaying version number while preserving UI elements.
2025-11-12 05:06:45 +00:00
gpt-engineer-app[bot]
8422bc378f Remove version number badge from Indicator
Remove the version number badge display in VersionIndicator.tsx:
- drop Badge import and Clock icon import
- replace compact mode text with History
- remove version number badge in non-compact rendering
 Keeps last-edited time and history functionality intact.
2025-11-12 05:03:25 +00:00
gpt-engineer-app[bot]
5531376edf Fix span duplicates and metrics
Implements complete plan to resolve duplicate span_id issues and metric collection errors:
- Ensure edge handlers return proper Response objects to prevent double logging
- Update collect-metrics to use valid metric categories, fix system_alerts query, and adjust returns
- Apply detect-anomalies adjustments if needed and add defensive handling in wrapper
- Prepare ground for end-to-end verification of location-related fixes
2025-11-12 04:57:54 +00:00
gpt-engineer-app[bot]
b6d1b99f2b Update process_approval_transaction for locations
Applies the fix to properly handle and insert park location names during approval, ensuring location data is created/updated with correct name fields for Lagoon and future submissions.
2025-11-12 04:53:48 +00:00
gpt-engineer-app[bot]
d24de6a9e6 Fix location name handling in approval
Implement comprehensive update to process_approval_transaction to ensure location records are created with proper name fields during park creation and updates, and prepare migration to apply fixes in multiple phases. Includes backfill improvements and targeted fixes for Lagoon.
2025-11-12 04:42:21 +00:00
gpt-engineer-app[bot]
c3cab84132 Fix Lagoon location backfill
Backfilled Lagoon park with a proper location by updating backfill_park_locations to include name/display data and linking to location_id. Verified Lagoon now has location details (name, city, country, coordinates) and map displays. Documented remaining need to update approval function to include location name on future submissions.
2025-11-12 04:34:31 +00:00
gpt-engineer-app[bot]
ab9d424240 Backfill Lagoon location
Investigate Lagoon park to ensure location_id is populated after the backfill. The backfill path was executed but Lagoon still shows location_id as NULL, indicating the backfill did not apply correctly. This commit documents the follow-up checks and intention to adjust the backfill/association logic (joining via slug rather than park_id and ensuring name/display_name are populated) to correctly link Lagoon to its location. No frontend changes.
2025-11-12 04:33:19 +00:00
gpt-engineer-app[bot]
617e079c5a Backfill park locations again
Run backfill to populate lagoon location and fix submission join
- Re-run and refine backfill to ensure Lagoon and similar parks receive proper location data by correcting join via slug and handling name/display_name in location inserts.
2025-11-12 04:32:39 +00:00
gpt-engineer-app[bot]
3cb2c39acf Backfill Lagoon Location
Implement one-time script to populate missing park locations ( Lagoon and others ) by creating a backfill that assigns proper location data and updates parks with new location_id after ensuring backfill function fixes.
2025-11-12 04:28:16 +00:00
gpt-engineer-app[bot]
3867d30aac Enhance loading skeletons and breadcrumbs
- Add content-m matching loading skeletons for ParkDetail, RideDetail, CompanyDetail, etc., replacing generic spinners to preserve layout during load
- Remove redundant Back to Parent Entity buttons in detail pages in favor of breadcrumb navigation
- Prepare groundwork for breadcrumbs across detail pages to improve cohesion and navigation
2025-11-12 03:51:15 +00:00
gpt-engineer-app[bot]
fdfa1739e5 Add breadcrumb and transitions
Introduce breadcrumb navigation component and integrate into detail pages with hover previews; add PageTransition to App for smooth navigations and loading animations.
2025-11-12 03:46:34 +00:00
gpt-engineer-app[bot]
361231bfac Add hover preview cards
Adds hover-preview UX by introducing preview cards for entities and wiring hoverable links:
- Implements CompanyPreviewCard and ParkPreviewCard components plus hooks to fetch preview data
- Adds HoverCard usage to ParkDetail and RideDetail for operator, manufacturer, and designer links
- Creates preview wrappers for manufacturer/designer/operator links and updates related pages to use hover previews
- Includes supporting updates to query keys and preview hooks to fetch minimal data for previews
2025-11-12 03:44:01 +00:00
gpt-engineer-app[bot]
2ccfe8c48a Make entity names clickable
Update various components to wrap display names (parks, rides, manufacturers, designers, operators, etc.) in Link elements so they navigate to detail pages, aligning with the ParkDetail change. This includesRideDetail, RideListView, RideCreditCard, ParkDetail, and related imports, to enhance cohesion, interactivity, and browseability across the app.
2025-11-12 03:40:29 +00:00
gpt-engineer-app[bot]
fd4e21734f Make operator name clickable
Update ParkDetail to wrap park.operator.name in a Link to the operator page, and import Link from react-router-dom. This changes the display from plain text to a navigable link and fixes missing import.
2025-11-12 03:36:15 +00:00
gpt-engineer-app[bot]
9bab4358e3 Fix analyze_data_completeness fields
Update parameterized analyze_data_completeness to check parks, rides, companies, and ride_models using appropriate fields instead of manufacturer_id for parks. Also replace get_recent_additions te.event_title with te.title.
2025-11-12 03:30:43 +00:00
gpt-engineer-app[bot]
5b5bd4d62e Fix analyze_data_completeness search_path
Update the analyze_data_completeness function to set search_path = public to address security linter warning and ensure consistent function execution without elevated schema access. No behavioral changes beyond security context.
2025-11-12 02:04:59 +00:00
gpt-engineer-app[bot]
d435bda06a Fix search_path in function
- Aligns database migration by adding a follow-up migration to set the search_path for the affected function to address a security linter warning and ensure proper execution scope.
2025-11-12 02:03:32 +00:00
gpt-engineer-app[bot]
888ef0224a Update submission_metadata queries
Enhance frontend to correctly fetch entity names by joining with submission_metadata and filtering metadata_key = 'name'; replace incorrect submission_metadata(name) usage in systemActivityService.ts and Profile.tsx with proper inner join and metadata_value extraction.
2025-11-12 01:53:51 +00:00
gpt-engineer-app[bot]
78e29f9e49 Remove created_by joins and fix metadata queries
Fix get_recent_additions by removing created_by joins for tables without such column, leaving creator data only for entity_timeline_events. Add migration to implement corrected logic. Update frontend queries handling content_submissions metadata to correctly extract entity names from submission_metadata. Also apply guarded admin-only execution for data completeness hook to prevent non-admin queries.
2025-11-12 01:53:02 +00:00
gpt-engineer-app[bot]
842861af8c Fix JSONB filter and admin guard
- Implement helper filter_jsonb_array_nulls and apply it in analyze_data_completeness to replace jsonb - 'null' usage
- Add search_path public in helper function for security
- Ensure useDataCompleteness runs only on admin pages by enabling query conditionally
2025-11-12 01:45:56 +00:00
gpt-engineer-app[bot]
348ab23d26 Fix analyze_data_completeness jsonb
- Add safe JSONB array null filtering via helper and update analyze_data_completeness
- Ensure search_path set to public in helper function
- Add admin-page guard to useDataCompleteness to disable on non-admin routes
2025-11-12 01:45:22 +00:00
gpt-engineer-app[bot]
b58a0a7741 Fix analyze_data_completeness and admin guard
- Add migration to fix JSONB array filtering in analyze_data_completeness
- Update useDataCompleteness to run only on admin pages via isAdminPage check
- Prepare for replacing invalid JSONB subtraction with proper filtering in RPCs
2025-11-12 01:44:58 +00:00
gpt-engineer-app[bot]
e2ee11b9f5 Add database maintenance tooling
- Implement maintenance hooks (useMaintenanceTables, useVacuumTable, useAnalyzeTable, useReindexTable)
- Add DatabaseMaintenance page and UI for vacuum/analyze/reindex
- Wire new route / admin/database-maintenance and sidebar entry
- Remove DatabaseMaintenance icon usage on page and align with AdminLayout props
2025-11-12 01:39:05 +00:00
gpt-engineer-app[bot]
2468d3cc18 Enable admin-only stats and update subscriptions
Implement plan to fix database RPCs by migrating to photos table, update hooks to enable only on admin pages, switch real-time subscriptions to the photos table, and apply to remaining forms. Also disable analytics in development.
2025-11-11 23:49:56 +00:00
gpt-engineer-app[bot]
f4300de738 Apply blur validation and toasts to remaining forms
Extend forms with blur-based validation via FormFieldWrapper.validationMode, and replace inline toasts with centralized formToasts. Update ManufacturerForm, DesignerForm, OperatorForm, PropertyOwnerForm, RideModelForm, and related components to use the new toast helper and ensure data-error scroll behavior where applicable.
2025-11-11 23:44:48 +00:00
gpt-engineer-app[bot]
92e93bfc9d Enhance FormFieldWrapper with blur validation and toasts
Adds validation on blur mode to FormFieldWrapper, introduces animated validation states, and implements standardized form submission toasts via a new formToasts helper; updates ParkForm and RideForm to use the new toast system and to propagate error state with scroll-to-error support.
2025-11-11 23:43:01 +00:00
gpt-engineer-app[bot]
7d085a0702 Enhance FormFieldWrapper Validation
Add real-time validation feedback to FormFieldWrapper:
- Manage validation state (idle/valid/invalid)
- Show green check icon when valid
- Show inline error icon when invalid
- Integrate with existing Input/Textarea components without altering core behavior
2025-11-11 23:38:07 +00:00