Skip to content

Add optional start times for full-day events#71

Merged
felixgollnhuber merged 2 commits intomainfrom
codex/full-day-start-time-controls
Apr 27, 2026
Merged

Add optional start times for full-day events#71
felixgollnhuber merged 2 commits intomainfrom
codex/full-day-start-time-controls

Conversation

@felixgollnhuber
Copy link
Copy Markdown
Owner

Summary

  • Add an optional start time to full-day event creation and persist it on events
  • Use the stored start time in full-day availability labels and timed ICS exports
  • Unify the edit/view segmented controls into a shared UI primitive for consistent sizing and radius
  • Keep the new Main branch event location and online meeting fields working alongside the full-day changes

Testing

  • Unit tests added and updated for event creation, availability ranking, manage flow, and ICS export
  • Local UI verification performed in the browser for the full-day control layout
  • pnpm verify passed

Copilot AI review requested due to automatic review settings April 27, 2026 22:04
@felixgollnhuber
Copy link
Copy Markdown
Owner Author

@codex start review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for an optional “start time” on full-day events, persists it on the Event model, and uses it to improve labeling and calendar exports while also consolidating the edit/view toggle UI into a shared segmented control.

Changes:

  • Add fullDayStartMinutes to event creation validation/types, persist it in Prisma, and expose it via public snapshots.
  • Use fullDayStartMinutes to enrich full-day availability labels and generate timed ICS output for closed full-day events.
  • Introduce a shared SegmentedControl UI primitive and replace duplicated edit/view toggle markup.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/lib/validators.ts Adds optional fullDayStartMinutes validation to event creation schema.
src/lib/validators.test.ts Extends validator tests to cover parsing/persisting fullDayStartMinutes.
src/lib/types.ts Extends event input and snapshot types with fullDayStartMinutes.
src/lib/i18n/messages.ts Adds copy for full-day start time field and preview label.
src/lib/event-service.ts Persists fullDayStartMinutes for full-day events and includes it in snapshots.
src/lib/event-service.test.ts Updates service tests to account for the new DB field and creation behavior.
src/lib/availability.ts Adds formatting and timed end-time support for full-day suggestions/finalized slot labels.
src/lib/availability.test.ts Adds coverage for labels/slotEnd when fullDayStartMinutes is present.
src/components/ui/segmented-control.tsx Introduces shared segmented control component.
src/components/full-day-availability.tsx Displays “likely start time” and replaces mode toggle with segmented control.
src/components/event-heatmap.tsx Replaces mode toggle with segmented control for consistent UI.
src/components/create-event-form.tsx Adds full-day start time selector + preview field and submits it for full-day events.
src/components/create-event-form.test.tsx Adds test ensuring fullDayStartMinutes is sent for full-day creation.
src/app/api/events/route.test.ts Updates API tests to include fullDayStartMinutes in POST payload expectations.
src/app/api/events/[slug]/ics/route.ts Exports timed DTSTART/DTEND for closed full-day events when a start time exists.
src/app/api/events/[slug]/ics/route.test.ts Adds timed full-day ICS export test coverage.
prisma/schema.prisma Adds nullable fullDayStartMinutes column to Event.
prisma/migrations/20260427150000_add_full_day_start_time/migration.sql Migration to add the new DB column.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/app/api/events/[slug]/ics/route.ts Outdated
Comment thread src/components/ui/segmented-control.tsx
Comment thread src/components/full-day-availability.tsx Outdated
Copy link
Copy Markdown

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

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: 114b5b6aa6

ℹ️ 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 thread src/app/api/events/[slug]/ics/route.ts Outdated
@felixgollnhuber felixgollnhuber merged commit f48819c into main Apr 27, 2026
2 checks passed
@felixgollnhuber felixgollnhuber deleted the codex/full-day-start-time-controls branch April 27, 2026 22:24
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.

2 participants