feat: Google Places credentials, trip groups, Railway build fixes & Doppler sync#7
Conversation
- Document R2 storage buckets (documents, media) - Add key files for storage system - Document module initialization order issue and fix - Add Unsplash integration notes - Add dev/preview environment URLs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed cover photo aspect ratio from 16:9 to 3:1 with max-height of 192px for a more compact, banner-style appearance. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add getPublicUrl() method to StorageProvider interface so each provider generates URLs appropriate for its storage backend - Fix bug where files uploaded to Supabase Storage had R2 URLs stored - Wire Edit button in Trip Summary to open EditItineraryDialog instead of navigating to non-existent /trips/[id]/edit route - Update CLAUDE.md with multi-provider storage documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Root cause: Traveltek FTP JSON was storing 'nights' as a string (e.g., "7"). JavaScript string concatenation caused: getDate() + "7" = "257" (not 32). setDate(257) set the date to day 257 of the year (September 14) instead of 7 days after departure. Changes: - Backend (sailing-import.service.ts): Coerce nights to number before date calculation with explicit Number() cast - Frontend (use-cruise-library.ts): Compute arrivalDate from sailDate + nights instead of using potentially corrupted catalog endDate field This fixes the issue where adding a 7-night cruise was creating 233 port_info activities instead of 8. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When creating an itinerary with both start and end dates, automatically generate the corresponding itinerary days. This eliminates the need for users to manually click "Generate Days" after creating an itinerary. - Inject ItineraryDaysService into ItinerariesService using forwardRef - Call autoGenerate() after successful itinerary creation - Gracefully handle day generation failures (log warning but don't fail creation) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Backend: - Add date validation in component-orchestration.service.ts - Throw BadRequestException if cruise dates don't fit within itinerary dates - Include helpful error message with specific date conflicts Frontend - Cruise Library Page: - Auto-apply date filters when navigating from trip itinerary - Show itinerary dates in page description when filtering - Show specific "no cruises available" message with guidance for itinerary context Frontend - Add to Trip Dialog: - Add checkDatesCompatible helper function - Show cruise dates in dialog header when selecting itinerary - Display itinerary dates for each existing itinerary option - Disable incompatible itineraries with warning message - Show that "Create new" option will use cruise dates - Prevent submission when selected itinerary is date-incompatible Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement Gantt-style visualization for activities that span multiple days (e.g., 7-night cruises). Board View: - New DayHeadersRow component (extracted from DayColumn) - SpanningActivitiesLayer with CSS Grid for Gantt bars - SpanningActivityBar with sticky image/name/badges on scroll - Day columns now filter out spanning parent activities Table View: - Left edge connector lines for spanning activities - Duration badges showing nights count - Subtle background highlight for spanning rows Trip Summary: - Spanning activities shown once at start day - Vertical continuation lines through spanned days Also fixes navigation UX: users now return to Itinerary tab (not Overview) after adding cruises/packages/activities. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Two bugs fixed: 1. Date auto-population on drag-and-drop: - CASE 4 in trip-itinerary.tsx was missing itineraryId in URL params - Caused page.tsx to use wrong itinerary's days, making dayId lookup fail - Added itineraryId to URLSearchParams 2. Cruise port info/sea days not visible: - spanning-activity-utils.ts had backwards filter condition - Changed from checking parentActivityId to checking activity.id Also added useEffect pattern to all activity forms to handle async dayDate loading (matches existing pattern in flight-form.tsx). Added troubleshooting documentation for future reference. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add exponential backoff retry (3 attempts: 5min, 10min delays) to scheduled sync for handling temporary FTP outages - Reduce FTP connection pool from 4 to 2 connections - Add 30s timeout protection for directory listings - Add 100ms throttle delay between FTP directory operations - Prevent sync from hanging indefinitely on unresponsive FTP server Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…g detection Cruises were not appearing as spanning activities (Gantt-style bars) because toCustomCruiseApiPayload() did not include startDatetime and endDatetime at the activity level. These fields are required for isSpanningActivity() to detect multi-day activities. Now derives startDatetime from departureDate and endDatetime from arrivalDate in the cruise details, ensuring cruises properly render as spanning activities in the itinerary board view. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When adding a cruise from the library that extends beyond the itinerary dates, instead of throwing an error, we now automatically extend the itinerary's start/end dates to accommodate the cruise. Changes: - Add `autoExtendItinerary` parameter to generate-port-schedule endpoint - When enabled, updates itinerary dates before creating port activities - Frontend passes `autoExtendItinerary: true` when adding from library This provides a much better UX - users no longer need to manually adjust itinerary dates before adding a cruise. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of automatically extending itinerary dates when adding a cruise from the library, show a confirmation dialog asking the user first. Also allow selecting date-incompatible itineraries with a visual warning. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…mation dialog Remove unused selectedItineraryDateCheck variable that caused build failure. Skip error toast in onError when date mismatch is being handled by the extend confirmation dialog. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…date - Auto-collapse current segment and expand new one when clicking "+ Add Segment" - Pre-populate new segment's departure date from previous segment's arrival date Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Assign deterministic colors to cruise bookings and their port-info children so they are visually grouped in table, board, spanning bar, and summary views. Parent-child activities are grouped together within each day, with children from earlier parents appearing before later parent rows. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ripts Rename deploy-dev.yml to deploy-preview.yml to match environment naming. Update CRUISE_ARCHITECTURE.md, DATABASE_ARCHITECTURE.md, and cruise-booking README. Add AGENTS.md, cruise migration script, and migration tracking reset. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
# Conflicts: # CLAUDE.md # apps/admin/src/app/trips/[id]/_components/trip-summary-column.tsx
Add tripGroupId filter across the full stack so users can filter trips by group in both Kanban and Table views on the /trips page. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…vity_travelers Fixes 500 error when deleting trips that have package_details or activity_travelers rows referencing them. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…e conflicts The BEFORE DELETE trigger on itinerary_activities was updating child rows that CASCADE deletes were simultaneously trying to delete, causing "tuple already modified" errors when deleting trips. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
These migrations were registered in the journal but the SQL files were not committed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Switch hotels controller from DB-based ApiCredentialsService to env-based CredentialResolverService for Google Places and Amadeus credentials. This fixes hotel search on preview/prod where the api_credentials DB table had no Google Places row. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds Drizzle schema for trip_groups table and tripGroupId column on trips, fixing Railway build failures caused by missing schema definitions. Also includes activity feed improvements and audit logging for group operations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…uild - Remove unused Logger import and declaration - Add non-null assertions for .returning() results - Add required agencyId to itinerary days and activities inserts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR introduces trip grouping and sharing, multi-day spanning activities visualization with Gantt-style bars, auto-extending itinerary dates when adding incompatible cruises, deterministic color theming for cruise activities, and publish/unpublish functionality for trips, alongside numerous form enhancements for date auto-population. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Dialog as Add-to-Trip Dialog
participant API as Mutation Handler
participant Service as Component Orchestration
User->>Dialog: Select cruise & incompatible itinerary
Dialog->>Dialog: Check date compatibility
alt Dates incompatible
Dialog->>Dialog: Store pending extension details
Dialog->>Dialog: Open confirmation dialog
User->>Dialog: Confirm extend dates
Dialog->>Dialog: Set loading state
Dialog->>API: Retry with autoExtendItinerary: true
API->>Service: validateAndExtendItinerary
Service->>Service: Extend itinerary start/end dates
Service->>API: Return updated itinerary
API->>Dialog: Success
Dialog->>User: Show cruise added
else Dates compatible
Dialog->>API: Add cruise (normal flow)
API->>Service: Generate port schedule
Service->>API: Return schedule
API->>Dialog: Success
Dialog->>User: Show cruise added
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
CredentialResolverServiceinstead of database-stored credentials.returning()results, missingagencyIdin inserts)prd→api-prod/productionandstg→api-dev/previewON DELETE CASCADEto package_details/activity_travelers FKs, fixed package delete trigger timingTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.