Skip to content

feat(visitor_mailer): change notices with end times and a zone label (PPT-2375, PPT-2667) - #631

Merged
camreeves merged 17 commits into
masterfrom
PPT-2375-visitor-mailer-changes
Sep 24, 2026
Merged

camreeves merged 17 commits into
masterfrom
PPT-2375-visitor-mailer-changes

Conversation

@camreeves

@camreeves camreeves commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Visitor mailer changes for HIO, tested end to end on hio.uat.placeos.run with real emails.

This branch is Mia's #629 (her commits are included unchanged) plus master and six commits on top, so it supersedes #629.

What is new on top of #629

  • End time placeholders for the change notices and invitations: event_end_time, event_end_date, previous_event_end_time, previous_event_end_date (PPT-2667). The booking-changed email can now read "Time: 11:00am - 12:00pm".
  • event_timezone placeholder on every email, the abbreviation of the zone the times are shown in (for example AWST), so a host booking from another time zone sees which zone the times are in. Uses %^Z; %Z prints the location name.
  • Fix: the previous room in a change notice took the org or region zone a booking lists beside its building ("Room: Australia" on HIO). Only a zone beneath the previous building can name its room now. This has been on master since feat(visitor_mailer): add previous location fields #604. Spec test 72 covers it.
  • Readme documents the new placeholders and the time_format: "%l:%M%p %^Z" alternative.
  • Review fixes (5aed289, 91c691f): skip_event_linked_booking_email unset now follows disable_event_visitors, so a site with the event path off keeps the linked booking's invitation instead of sending the attendee nothing (test 73); change_debounce is capped at 3600 so a change never outlives the invite memory; the building zone keeps its last good value across a failed refresh; the spec's zone-label expectation no longer depends on the runner's tzdata; readme section on the two attendee invite paths.

Verified on HIO UAT (driver at b9bbed6)

Standalone visitor bookings: create, time change, date change and host change all send the expected single email (invitation, change notice with previous and new blocks and end times, nothing to the visitor on a host change while the original host is notified). Reply-To is the host (PPT-2520, code already merged in #616).

Room bookings with external attendees, with disable_event_visitors: false and skip_event_linked_booking_email: true (the master default) plus an "Event details changed" template: one invitation naming the room, one change notice per time or room edit, one invitation to an attendee added later, nothing for other edits. With disable_event_visitors: true the attendee is re-invited on every edit instead, because the front end recreates the linked visitor booking on each save, so that combination is not recommended for change notices.

Full scenario log: https://gist.github.com/camreeves/30a177bd87f2a552d19389a118dae057

Specs

crystal build --no-codegen is clean. Locally the harness passes the new and changed tests but keeps failing one of three timing sensitive tests (the two visitors, group booking and shared ical cases) on a loaded machine, and those same tests failed on the untouched tree here, so CI is the arbiter.

chillfox and others added 15 commits August 27, 2026 12:10
…PPT-2375)

Every visitor email now carries event_timezone, the abbreviation of the zone
its times are rendered in, so a template can label the times it shows. The
invitation, reminder and change emails carry event_end_time / event_end_date,
and the change emails also carry previous_event_end_time /
previous_event_end_date, so a booking-changed template can show the whole
window before and after an edit whichever of the start or end moved.
Crystal's %Z prints the location name (Australia/Perth); %^Z prints the
zone abbreviation (AWST), which is what the placeholder documents.
A visitor booking lists its org, region and campus zones beside the
building, and the change notice took the first of them for the previous
room ("Room: Australia" on HIO). Only a zone beneath the previous
building can name its room now.
Only the room branch needs the guard; walking every previous zone up
front cost an extra zone lookup per change.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

…default

Unset, skip_event_linked_booking_email now tracks disable_event_visitors,
so a site with event invites off keeps the linked booking's invitation
instead of sending the attendee nothing. Also keeps the last good building
zone after a refresh, tidies the format constant and a stray comment, makes
the spec's zone-label expectations environment independent and covers the
new default (test 73). Readme documents the two attendee invite paths.
A debounce above 3600s waited the full window while invitations were
only remembered for 3660s, so a visitor added by the edit could be told
about it after all.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@camreeves
camreeves merged commit 6e62d22 into master Sep 24, 2026
5 of 11 checks passed
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