- Fix search_active_trips to properly handle null seats, using 'available_seats.gte.{seats},available_seats.is.null' instead of malformed 'available_seats.is.null,available_seats.gte.{seats}'
- Update list_active_trips to use 'available_seats.is.null,available_seats.gt.0' instead of 'gt(0)'
- Allow null seats in search results (trips without seat info)
- Make seats fields nullable in database (new migration added)
- Update trip_selection to display 'المقاعد: غير متوفرة' when seats are null
- Update test fixtures and handlers to properly handle null seats
This fixes the issue where trips with null seats were showing as '1 of 1' instead of 'المقاعد: غير متوفرة'
feat: rebrand FALSA to FALZH with updated supabase schema, tool names, and prompts
- Detect unregistered drivers (from group trips) who later DM the bot
- Send personalized welcome with their name and explanation of FALSA benefits
- Upgrade user_mode from new_user to driver automatically
- Improve driver phone lookup to handle /-separated numbers
feat: support multiple phone numbers and prevent duplicate customers
- Add support for multiple phone numbers separated by / in driver profiles
- Normalize phone numbers with country code prepending and leading zero stripping
- Prevent duplicate customers by checking phone_number before upserting
- Merge customer records when same phone appears in group vs DM context
- Make remote_jid nullable for unregistered drivers discovered via groups
- Add database migrations for nullable remote_jid and updated RPC
feat: skip optional trip fields and accept natural date expressions
- Replace missing-fields error with sensible defaults (4 seats, price 0)
so drivers can create trips without specifying seats/price
- Update departure_date schema description to instruct AI to convert
natural date expressions (اليوم/بكرة/غدا/يوم الخميس) to YYYY-MM-DD
- Add driver system prompt rule to never ask drivers to rewrite dates
- Add driver message card support (emoji-rich messages used as-is)
- Add tests for new behaviors
- initiate_trip_action and check_driver_trips now send format_trip_card
per trip (like passenger search) instead of a numbered text list
- Driver replies to a trip card to delete (bypass LLM) or modify
(set session, route to LLM for update_trip_field)
- Remove delete_trip_by_number / modify_trip_by_number handlers
and their tool schemas (replaced by card reply flow)
- Remove dead interactive list code (_handle_trip_interactive_reply)
- Clean up trip_selection.py: remove unused builders/parsers
- Update list_driver_trips query to include drivers(*)
- create_booking_lead -> select_trip across tools, schemas, handlers, prompts
- booking_leads table -> trip_selections (with migration)
- update Arabic notifications and prompts to reflect 'interest' not 'booking'
- add selection_count to trip cards and summaries
- update README and falsa_info.md to reflect new coordination model
use phone_number instead of remoteJid for driver notifications
- Send each trip as a separate WhatsApp message with trip_id metadata
- Resolve trip_id automatically when customer replies to a trip card
- Store phone_number on customer upsert
- Parse context_message_id and phone_number from inbound messages
- Add get_message_by_whatsapp_id to repository
- Translate driver booking notification to Arabic
- Increase conversation context window to 8 messages
feat: prevent duplicate driver trips at same date and time