Skip to content

fix(calendar): reject clock times that normalize to the next day - #198

Open
BigDataDZ wants to merge 1 commit into
CopilotKit:mainfrom
BigDataDZ:codex/fix-calendar-midnight-validation
Open

BigDataDZ wants to merge 1 commit into
CopilotKit:mainfrom
BigDataDZ:codex/fix-calendar-midnight-validation

Conversation

@BigDataDZ

Copy link
Copy Markdown
Contributor

Timed event drafts currently accept 24:00 because Date.parse silently moves it to the following day and the remaining validation only checks the date and offset. Reject that clock time before preparing a calendar action, matching the date editor's existing behavior.

Use the existing Zod ISO datetime validators with explicit minute precision support. Regression coverage rejects 24:00 in either endpoint with minute/second/fraction precision and multiple offsets; existing tests retain valid leap dates, minute-only input, full timestamps, and all-day events.

Validation: regression failed against main before the fix; domain/actions/Google tests 62/62; full suite 485 passed, 3 platform-dependent skips, 0 failed. Repository lint, server/mobile/worker typechecks, server build and web/iOS/Android exports pass. No live calendar mutation was performed.

This branch has not been deployed

No deployments
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