Repository navigation
feat(booking): add a "we'll call you" phone location (phone_outbound) - #273
Open
dominik-myszkowski wants to merge 2 commits into
Open
dominik-myszkowski wants to merge 2 commits into
dominik-myszkowski wants to merge 2 commits into
Conversation
A new event-type location for calls the host makes to the attendee. The event type carries no number; the booking page and the embed widget show a required tel field, and the booking is stored exactly like the allow_phone_call path (location_type "phone", "tel:<number>"), so calendar events, emails, webhooks and the manage page are unchanged. - migration 00073 widens the event_types.location_type CHECK with the 00042 table rebuild; down turns such event types into inactive "phone" ones - validateLocation accepts phone_outbound without a host number - CreateBooking refuses a missing or invalid number (400) instead of falling back to another meeting type - createBookingForSlug refuses these event types (the assistant and MCP cannot collect the number); the assistant is hidden for them - admin location picker option, en/pl booker strings, en/fr admin strings - ARCHITECTURE.md §9 Discussion: Calnode#263
The widget builds its own form and has no browser harness, so, as with TestEmbedJS_identityPrefill, the required field and its client-side check are pinned against the served source.
Contributor
|
OpenCode Go returned an error, so this run stopped. If it names your key, plan or balance, fix that with the provider or pick another model.
|
Contributor
|
All contributors have signed the CLA. ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Implements shape (a) from #263: a real location type for calls the host makes to the attendee.
What it does
phone_outbound("We call the attendee" in the admin picker). The event type carries no number:validateLocationhas a branch that requires none.CreateBookingrefuses a missing, blank or invalid number with 400 instead of falling back to another meeting type.allow_phone_callpath:bookings.location_type = "phone",location_value = "tel:<number>". Calendar event location, tap-to-call, emails, webhooks and the manage page work unchanged.Notes on the review points
00073widens thelocation_typeCHECK with the 00042 rebuild (NO TRANSACTION,foreign_keys=OFF). Columns are listed explicitly in their current order, including the ones added by ALTER after 00042. I checked on a database migrated to 00072 thattable_infois identical before and after, andforeign_key_check/integrity_checkare clean.phone_outbound, so those event types becomephonewith no number and are deactivated. They stay a phone call, never quietly a video meeting, and can't be booked until the operator enters a number. Existing bookings are already stored asphone+tel:and need nothing.book.htmlandembed.js.manage.htmlhas no booking form, only reschedule, and a reschedule keeps the booking's stored location and number, so there is nothing to add there. Its location label already comes from the booking (phone).createBookingForSlugand can't collect a number, so the shared core refuses these event types (errPhoneRequired, alongsideerrPaymentRequired), and the assistant is hidden on the booking page and widget for them rather than offered and refused at the last step.en.jsonandpl.json(location_phone_outbound,phone_outbound_number,err_phone_required), admin keys inen.jsonandfr.json(the parity test requires French; please check my French).docs/ARCHITECTURE.md§9 has a paragraph next to theallow_phone_callone.The quiet Meet fallback on the existing
allow_phone_callpath is left for a separate PR as you suggested. That path has no explicit "video or phone" choice today, only an optional field, so I'd like to agree on the shape in #263 first.Tests
TestBookingPhoneOutbound: valid number gives aphonebooking withtel:and a calendar event without Meet (a Google calendar that could mint one is connected on purpose). Missing, blank, invalid and too-long numbers are refused and no booking row is created. I checked that the test fails if an empty number is let through.TestBookPage_phoneOutboundRequiresNumber: required field on the page,phone_requiredin the public info, assistant off.TestMCP_createBooking_phoneOutboundRefused, plus aphone_outboundcase inTestBookPage_locationLabels.TestEmbedJS_phoneOutboundRequiredpins the widget's required field and its client-side check against the served source, the same wayTestEmbedJS_identityPrefilldoes, since the widget has no browser harness.Every step of
ci.ymlpasses locally:gofmt,go vet,go build,go test ./..., i18n coverage,pnpm check,pnpm check:i18n,pnpm buildandpnpm test:visual. Manually tested on a local build: the admin picker, the booking page and the widget (empty, invalid and valid number), reschedule from the manage page, and the unchangedallow_phone_callbehaviour on a Meet event type.I haven't touched
CHANGELOG.md. Happy to add an entry under Added, and perhaps a line in the Upgrading note since00073rebuildsevent_types, if you'd like it in this PR.