Skip to content

feat: Public Guest Booking Engine & 100% Core Coverage - #10

Merged
TechAaroorian merged 1 commit into
mainfrom
feature/public-booking-page
Aug 17, 2026
Merged

TechAaroorian merged 1 commit into
mainfrom
feature/public-booking-page

Conversation

@TechAaroorian

Copy link
Copy Markdown
Owner

🚀 Overview

This PR introduces the core scheduling engine that powers the public-facing guest booking flow. It finalizes the end-to-end meeting creation cycle, from slot selection to database insertion, while maintaining strict timezone accuracy and preventing double-bookings.

🧠 Technical Architecture & Highlights

  • Timezone-Aware DB Queries: Implemented startOfDay (via date-fns) in the Host Dashboard to ensure the gte query accurately reflects the start of the current day relative to the user, not just UTC new Date().
  • Race Condition Prevention: The server action performs a sub-second findFirst check against existing overlapping PENDING or ACCEPTED bookings right before insertion to prevent double-booking.
  • Empty String Normalization: Adjusted Zod schema parsing to normalize omitted optional fields (like guestNotes) into standard SQL NULL values using logical OR fallbacks (guestNotes || null).

🧪 Testing Strategy

  • Achieved 100% Test Coverage (Statements, Branches

@TechAaroorian TechAaroorian self-assigned this Aug 17, 2026
@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% 88 / 88
🔵 Statements 100% 89 / 89
🔵 Functions 100% 13 / 13
🔵 Branches 100% 33 / 33
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/app/app/actions/booking.ts 100% 100% 100% 100%
apps/app/lib/schemas/booking.ts 100% 100% 100% 100%
Generated in workflow #16 for commit 036f8c5 by the Vitest Coverage Report Action

@TechAaroorian
TechAaroorian merged commit c6f9d68 into main Aug 17, 2026
1 check passed
@TechAaroorian
TechAaroorian deleted the feature/public-booking-page branch September 7, 2026 13:05
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