feat: replace BookingReport model with Watchlist system#24039
feat: replace BookingReport model with Watchlist system#24039eunjae-lee wants to merge 3 commits intomainfrom
Conversation
- Add BOOKING_REPORT type to WatchlistType enum - Create BookingReportLog model for booking-specific metadata - Update WatchlistRepository with booking report methods - Migrate tRPC handlers to use Watchlist system - Update UI components to work with new data structure - Maintain all existing functionality while using Watchlist backend Stacks on: #22709 Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
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 |
- Add missing user property to booking object in test - Add required BookingItemProps properties (listingStatus, recurringInfo, isToday) - Restructure test data to match expected BookingItemProps interface - All type checks and unit tests now pass locally Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
- Update zod-utils.ts to include fromReport in bookingCancelSchema - Update handleCancelBooking.ts to support fromReport property - Resolve CI TypeScript compilation error for booking cancellation input Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
What does this PR do?
This PR replaces the
BookingReportmodel introduced in PR #22709 with the existingWatchlistsystem from PR #23996. The originalBookingReportmodel is removed and replaced with a hybrid approach using:Watchlistentries with typeBOOKING_REPORTfor the spam prevention systemBookingReportLogmodel for booking-specific metadata and constraintsKey changes:
WatchlistTypeenum withBOOKING_REPORTBookingReportmodel withBookingReportLog+WatchlistintegrationWatchlistRepositorywith booking report methodsThis creates a stacked PR on top of #22709, integrating the booking report feature with the existing spam prevention infrastructure.
Visual Demo
The UI now shows:
Mandatory Tasks
How should this be tested?
Prerequisites:
Test scenarios:
Basic reporting flow:
Access control:
Recurring bookings:
Cancellation with report:
Team bookings:
Checklist
reportBooking.handler.ts- Complex team membership and attendee verificationBookingReporttoWatchlist + BookingReportLogRequested by: @eunjae-lee
Devin session: https://app.devin.ai/sessions/186d8cd5387246c5af82a6c4b3efb475
Stacks on: #22709 (feat: add report bookings feature)
Related: #23996 (feat: Add spam block schema and migration)