Skip to content

chore: [Booking Cancellation Refactor - 2] Inject repositories and use them instead of Prisma in cancellation flow#3

Open
tomerqodo wants to merge 2 commits into
codex_full_base_chore_booking_cancellation_refactor_-_2_inject_repositories_and_use_them_instead_of_prisma_in_cancellation_flow_pr3from
codex_full_head_chore_booking_cancellation_refactor_-_2_inject_repositories_and_use_them_instead_of_prisma_in_cancellation_flow_pr3
Open

chore: [Booking Cancellation Refactor - 2] Inject repositories and use them instead of Prisma in cancellation flow#3
tomerqodo wants to merge 2 commits into
codex_full_base_chore_booking_cancellation_refactor_-_2_inject_repositories_and_use_them_instead_of_prisma_in_cancellation_flow_pr3from
codex_full_head_chore_booking_cancellation_refactor_-_2_inject_repositories_and_use_them_instead_of_prisma_in_cancellation_flow_pr3

Conversation

@tomerqodo

Copy link
Copy Markdown

Benchmark PR from agentic-review-benchmarks#3

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5d60b2b47

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 515 to 518
recurringEventId: bookingToDelete.recurringEventId,
startTime: {
gte: new Date(),
},
},
select: {
id: true,
startTime: true,
endTime: true,
references: {
select: {
uid: true,
type: true,
externalCalendarId: true,
credentialId: true,
},
gte: bookingToDelete.startTime,
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the same cutoff when collecting cancelled recurrences

When allRemainingBookings is true but cancelSubsequentBookings is false, the cancellation update uses gte: new Date() while this lookup uses gte: bookingToDelete.startTime, so updatedBookings can miss newly-cancelled bookings between now and the cancelled booking (or include past ones). That list is later used to clear webhook triggers/workflow reminders, so those cleanups will be skipped or misapplied in that scenario. Consider reusing the same gte value used for updateMany so the side-effect cleanup covers exactly the bookings you just cancelled.

Useful? React with 👍 / 👎.

Comment on lines 98 to 102
createdDate: true,
trialEndsAt: true,
completedOnboarding: true,
locale: true,
timeFormat: true,
twoFactorSecret: true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve locale in userSelect for cancellation i18n

The organizer for cancellations is now loaded via UserRepository.findByIdOrThrow, which uses userSelect. Removing locale from that select means organizer.locale is always undefined, so getTranslation(organizer.locale ?? "en", ...) in the cancellation flow will always fall back to English. This is a regression for non-English organizers and will send cancellation emails/notifications in the wrong language; add locale: true back to userSelect or adjust the lookup to include it.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant