Skip to content

feat(booker): Booker atom on the design system, with prototypes of the decided flows - #932

Closed
pasqualevitiello wants to merge 54 commits into
mainfrom
feat/booker-atom
Closed

pasqualevitiello wants to merge 54 commits into
mainfrom
feat/booker-atom

Conversation

@pasqualevitiello

@pasqualevitiello pasqualevitiello commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Work in progress on the Booker atom: a copy-paste component that lets an anonymous visitor book a Cal.com event through public API v2. The Booker's parts now follow Cal's design system (the source of truth), and the decided flows are prototyped as playground routes.

apps/ui/registry/default/atoms/
├── booker-1.tsx                  # the Booker (carried over from #814), now on the parts below
├── booker/
│   ├── booker-calendar*.tsx|ts   # port of the design system's Booker calendar (model, focus)
│   ├── time-picker.tsx           # design system's Booker time slots (slots keyed by instant)
│   ├── event-meta.tsx            # design system's event information rows
│   ├── booker-confirmation.tsx   # the decided confirmation screen
│   ├── booker-avatars.tsx, location.tsx, event-description.tsx, …
│   └── segmented-radio-group.tsx, status-mark.tsx   # Cal shared components the design system uses
└── lib/booker/                   # the carried-over data layer (to be replaced)
apps/ui/app/playground/booker/
├── page.tsx                      # the real Booker against the API
└── prototype-*/                  # throwaway prototypes of decided flows

Prototypes (each with a scenario switcher, every API answer stubbed): booking form, confirmation, reschedule and cancel, email verification, instant meeting, recurring and seated, collective host picker.

Evidence

  • tsc --noEmit passes in apps/ui; biome check is clean on every changed file.
  • Every playground route returns 200 on the dev server.
  • Not visually reviewed in full yet; no automated tests.

Merge Danger

Door: two-way

Draft: not meant to merge yet. Commits were made with --no-verify because the pre-commit hook trips over other worktrees in this checkout.

Blast Radius: isolated

New files under atoms/booker/, lib/cal-api/ and app/playground/booker/. Shared changes: isomorphic-dompurify and marked dependencies, serverExternalPackages in next.config.ts, two path aliases in tsconfig.json, and agent docs (AGENTS.md, GLOSSARY.md, docs/).


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

pasqualevitiello and others added 30 commits November 20, 2026 18:07
Point agent skills at where this repo keeps issues, triage labels and
domain docs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Define atom, particle, Booker, event type, attendee, guest and fallback,
and record why the Booker calls the Cal API from the browser.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copy the booker atom from devin/1783358765-booker-motion onto this
branch as the starting point for v1. The old data layer is unchanged
apart from making CAL_API_KEY optional; it is due to be replaced.

- registry/default/atoms: the Booker, its parts, hook, actions, helpers
- registry/default/lib/cal-api: the API client
- app/playground/booker: temporary demo page, accepts ?bookingUrl=
- add isomorphic-dompurify and marked, and keep isomorphic-dompurify
  out of the server bundle, where its jsdom dependency breaks
- path aliases for the old @/lib/booker and @/lib/cal-api imports

Not carried over: the /atoms pages and the registry item declaration.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Three layouts of the Booker's confirm step rendered from synthetic
booking fields, switchable with ?variant= on
/playground/booker/prototype-form. Prototype only: nothing is sent, and
it is meant to be removed once a layout is chosen.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Variant A gets the pinned Confirm bar with a count of required fields
left; variant B becomes a cut in the host's list instead of a regrouping.
Adds scenarios for a short form and for a custom question placed first.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
One list in the order the API returns, with the Confirm bar pinned and
counting the required fields left. The two layouts that lost stay on
the prototype/booker-form branch.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Three layouts of what an attendee sees after booking, switchable with
?variant= on /playground/booker/prototype-confirmation, with synthetic
bookings for confirmed, awaiting the host, recurring and in-person
cases. Prototype only: nothing is sent.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
In place: the left pane stays the event information and only the right
pane changes. The two layouts that lost stay on the
prototype/booker-confirmation branch.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Three ways to reschedule or cancel an existing booking, switchable with
?variant= on /playground/booker/prototype-manage: in place, in dialogs,
or unfolding inline. Scenarios cover a confirmed booking, one that needs
confirmation, one meeting of a series, a seat, API refusals and a
meeting that has ended. Prototype only: nothing is sent.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The pane was a size container with no width of its own inside a card
that shrinks to its content, so on wide screens it collapsed to nothing.
It now has an explicit width, and the calendar and times sit side by side
from 28rem instead of 42rem, which also applies inside variant B's dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…otype

Rescheduling now uses the Booker's real calendar and time list in the
same layout as booking, then a short confirm with an optional reason.
The two remaining variants differ only in where cancelling happens: in
the right pane or in a dialog. The first version of the prototype stays
on the prototype/booker-manage-v1 branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BookerSteps animated on any change of step, but its type limited steps
to "select" and "confirm". It now takes any key and keys the current
step's content itself, so callers no longer have to. Rescheduling and
cancelling are going to be further steps of the same flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g flow

Rescheduling is the booking flow: the Booker's select step, then the
host's rescheduleReason field in place of the form, then the
confirmation screen reading "Rescheduled". Cancelling is the summary,
a cancel step, then the cancelled state. Every step change goes through
BookerSteps. The previous version stays on prototype/booker-manage-v2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The verification code as a step of the booking flow, after the form,
through BookerSteps. Variant A sends the code on Confirm; variant B sends
it as soon as an email that needs one is entered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The step transition keeps the same resize, fade, easing and timings, now
on the browser's Web Animations API. It switches instantly when the
visitor prefers reduced motion. The Booker no longer imports motion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BookerSteps swaps steps instantly. The calendar days, time slots and
12h/24h labels lose their hover and focus transitions, and the calendar
tooltip no longer moves or fades.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
font-heading alone falls back to Regular. Titles at text-xl are now bold
and the month and day headings at text-lg semibold, as in DialogTitle and
CardTitle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The code is sent on Continue or Confirm. The variant that sent it once
the email was entered is kept on the prototype/booker-verify branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ariant

Every Booker prototype is down to its chosen variant, so the bar keeps
only the scenario button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An instant meeting as a route through the Booker's steps: the form, a
waiting step with the countdown, then the link to join or a way to
schedule instead. Two variants of where Meet now is offered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…very prototype

BookerAvatars overlapped hosts with negative margins and rings; it now
uses coss's AvatarGroup, with each avatar as its own link and tooltip
trigger. The prototypes drew stand-in circles; they mount BookerAvatars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ings

TimePicker gains an optional getSlotNote prop, used for seat counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he prototype

The recurrence row and seat availability now match the design system's
Booker event information and time slots. TimePicker's getSlotNote becomes
renderSlotDetail and isSlotDisabled, for a second line and full times.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…actly

The recurrence row, resolved dates and seat row now copy the design
system's RecurrenceSelector, RecurrenceDates and seat rows; the slot's
second line copies its SlotButton. TimePicker takes getSlotDetail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BookerAvatars now follows the design system's HostAvatars for several
hosts: at most four, then a +N count that lists the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prototype's two pickers give way to a copy of Cal's HostSelect: a
search combobox and the chosen hosts in its SelectionList.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chosen hosts show as chips in the field. An empty field means every
host, so nothing is chosen to start with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pasqualevitiello and others added 3 commits November 23, 2026 16:47
… from the real parts

Every prototype's event pane now uses the Booker's design-system rows
(host identity, title, description, selected and former time, requires
confirmation, duration, location, timezone) instead of hand-drawn ones,
and its select step uses the ported calendar pane, opening on the first
selectable day and keeping the selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the form's placeholder with the confirmation screen from "The
confirmation screen": status, headline and sentence, guests and notes,
add-to-calendar links built in the browser (Google, Outlook, .ics), and
cancel and reschedule (Cal's own pages until the Booker's flows exist).
Follows the event type's successRedirectUrl after the success callback,
unless redirectOnSuccess is false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
coss-com Ready Ready Preview Nov 24, 2026 11:08am UTC
coss-com-origin Ready Ready Preview Nov 24, 2026 11:08am UTC
coss-com-ui Ready Ready Preview Nov 24, 2026 11:08am UTC
coss-examples-calcom Ready Ready Preview Nov 24, 2026 11:08am UTC

Request Review

pasqualevitiello and others added 14 commits November 23, 2026 20:54
The popover list remounted LocationIcon on every open, which retried the
provider image addresses and made the icons flash. The design system's
list uses plain 14px icons: a pin for a place, a link icon otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the flash

Reverts the plain icons from 7141586: the popover list keeps its 14px
provider logos. The flash came from LocationIcon forgetting failed image
addresses on every mount and retrying them from the first; failures are
now remembered across mounts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With no week start on the event or the group, Cal falls back to the first
username in the link. extractWeekStart took users[0] from the API, which
can come back in another order (i.cal.com/matthew+sean/dynamic started on
Sunday instead of Monday).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds GEOM 50 to the wordmark under the Booker, so Cal Sans draws its
single-story a, as the Cal.com wordmark has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Headings stay at weight 700 without GEOM 50 and opsz 32; only the
Cal.com logo carries them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mes by part of day

Available days and time buttons use bg-input instead of bg-muted, so they
stand out from unavailable days. The time list is grouped into Morning,
Afternoon and Evening in the Booker's timezone. Decided from a prototype
(Pasquale, 2026-11-23); both depart from the design system, which needs
the same change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bg-input fill from 022229f was not wanted; the time groups stay.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Removes the Morning, Afternoon and Evening groups from 022229f and their
three labels. The time list matches the design system again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copy Cal's ResponseCard and use it, with an error StatusMark, when the
Booker can't load. Each error now has a title and a description; retry
stays only for network and unknown errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move every Booker file into registry/default/booker/ with relative
imports between them, as the chat item does, and register it as the
booker item. utils.ts becomes lib/booker-utils.ts, since files ending
in /lib/utils are rewritten on install. The @/lib/booker and
@/lib/cal-api aliases are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the host's event type asks for first and last name separately
(splitName), the form shows two inputs side by side, as Cal's booking
page does, with the host's labels and placeholders, given-name and
family-name autofill, and the last name required only when the host
says so. API v2 takes the attendee's name as one string, so the two
parts are joined before booking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy the browser path of Cal's markdown adapter: markdown-it with Cal's
settings, DOMPurify, links opened in a new tab, and the nested-list fix.
API v2 sends raw markdown, so the Booker sanitises it; the description
fills in after mount, as on cal.com. marked and isomorphic-dompurify
(which pulled jsdom onto the server) are removed. The registry is
rebuilt, so booker.json also carries the split name field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

4 active deployments
Preview – coss-com-ui — f79d77a6 Deployed Nov 24, 2026 by vercel[bot]
Preview – coss-com-origin — f79d77a6 Deployed Nov 24, 2026 by vercel[bot]
Preview – coss-examples-calcom — f79d77a6 Deployed Nov 24, 2026 by vercel[bot]
Preview – coss-com — f79d77a6 Deployed Nov 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant