feat(events): support RSVP deadlines - #108
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 50 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughEvent creation and updates now accept RSVP deadlines. The commands parse deadlines with timezone support, reject deadlines at or after event start, disable responses after the deadline, persist the fields, and show them in event details. ChangesRSVP deadline handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant CLI
participant EventBuilder
participant Firestore
CLI->>EventBuilder: submit event with rsvpDeadline and timezone
EventBuilder->>EventBuilder: parse and validate deadline
EventBuilder->>Firestore: persist deadline and disable post-deadline responses
Firestore-->>CLI: return event data
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
tests/events-integration.test.js (2)
233-234: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winCover the update schema contract.
src/commands/schema.tsalso adds--rsvp-deadlineand--timezonetoevents.update, but this test checks onlyevents.create. Add assertions for both update parameters to protect the machine-readable schema.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/events-integration.test.js` around lines 233 - 234, Extend the schema assertions in the events integration test to cover the events.update command, verifying that --rsvp-deadline and --timezone are present with their expected required and type metadata, matching the existing events.create coverage.
39-51: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd a non-default timezone case.
The test uses the CLI default
America/Los_Angelesand a hard-coded UTC timestamp. It does not prove that--timezoneis applied, and the result can depend on the child-process timezone. Add a test with a different timezone, such asAmerica/New_York, and set the test timezone explicitly.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/events-integration.test.js` around lines 39 - 51, Add a separate RSVP-deadline integration test in the events create tests using a non-default timezone such as America/New_York, explicitly set the test/process timezone, and assert the corresponding UTC rsvpDeadline plus allowResponsesAfterRsvpDeadline false. Keep the existing default-timezone coverage intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/commands/events.ts`:
- Around line 394-395: Update the date-handling logic in the event command so
both --date and --end-date pass opts['timezone'] to parseDateTime, matching the
documented --timezone behavior; keep the existing parsing flow otherwise
unchanged.
In `@src/lib/events.ts`:
- Around line 115-122: Update the RSVP deadline handling in src/lib/events.ts
lines 115-122 to use the timezone-aware shared parser with opts.timezone before
comparison and ISO serialization, and update src/commands/events.ts lines
421-422 to use that corrected parser for event update writes. Extend
tests/events-integration.test.js lines 39-51 with a non-default timezone case
and explicitly control the child-process timezone to verify the contract.
---
Nitpick comments:
In `@tests/events-integration.test.js`:
- Around line 233-234: Extend the schema assertions in the events integration
test to cover the events.update command, verifying that --rsvp-deadline and
--timezone are present with their expected required and type metadata, matching
the existing events.create coverage.
- Around line 39-51: Add a separate RSVP-deadline integration test in the events
create tests using a non-default timezone such as America/New_York, explicitly
set the test/process timezone, and assert the corresponding UTC rsvpDeadline
plus allowResponsesAfterRsvpDeadline false. Keep the existing default-timezone
coverage intact.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 6d0a3077-1d5c-4d60-b6a2-7227de07987d
📒 Files selected for processing (5)
src/commands/events.tssrc/commands/schema.tssrc/lib/api/endpoints.tssrc/lib/events.tstests/events-integration.test.js
|
Addressed all CodeRabbit findings in 89ecea2, including update schema assertions and non-default timezone tests. Full verification: 321 passed, 6 skipped; |
|
@coderabbitai review |
|
|
@copilot review |
Summary
--rsvp-deadlineto event create and updatersvpDeadlineandallowResponsesAfterRsvpDeadlinefieldsevents getfor read-after-write verificationContract evidence
Rubber-duck review initially recommended against a PR while the wire contract was unknown. Before implementation, Partiful's current first-party web bundle was inspected and confirmed these exact fields:
rsvpDeadlineallowResponsesAfterRsvpDeadlineA live hosted-event update was then exercised with this branch. Read-after-write returned the normalized deadline and
allowResponsesAfterRsvpDeadline: false. No guessed field names.Verification
npm test: 316 passed, 6 skippednpm run typecheck: passed2026-08-20T19:00:00.000Z, responses-after-deadlinefalseScope
This PR handles RSVP deadlines only. The create-time capacity persistence mismatch remains tracked in #107.
Closes RSVP-deadline portion of #107.
Summary by CodeRabbit