[Cal.com] Major expansion: availability management, out of office, and View Bookings redesign#27133
Conversation
Cal.com permanently shut down API v1 on April 8, 2026, breaking this extension completely (HTTP 410 on all requests). This migrates all endpoints to v2. Changes: - Replace v1 query-param auth with v2 Bearer token auth - Add required cal-api-version headers per endpoint family - Update all types to match v2 response shapes - Replace single PATCH booking update with separate confirm/decline endpoints - Change cancel booking from DELETE to POST with request body - Use v2 field names throughout (start/end, lengthInMinutes, meetingUrl, etc.) - Remove "Pending" status option (no longer supported in v2) Fixes #27030
For consistency with all other endpoints in the file.
- Remove cal-api-version from /me (not required per docs) - Use correct version 2024-09-04 for private-links endpoint
…Detail, and EditTimezone
|
Thank you for your contribution! 🎉 🔔 @eluce2 @peduarte @pernielsentikaer @AlexIsMaking @jfkisafk @runofthemillgeek you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="feat/cal-com-availability-management"
FORK_URL="https://github.com/andrewbenson/extensions.git"
EXTENSION_NAME="cal-com-share-meeting-links"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
Greptile SummaryThis PR delivers a complete Cal.com API v1→v2 migration (v1 shut down April 8, 2026), three new commands (View Availability, Out of Office, Create Out of Office), and a meaningful fix to the View Bookings pagination bug that was hiding recent/upcoming bookings. The implementation is well-structured: hoisted fetcher references maintain correct Two minor items to address before merge:
Confidence Score: 5/5
Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/cal-com-share-meeting-links/src/lib/ooo.ts
Line: 743-749
Comment:
**Locale-sensitive date formatting uses system locale**
`formatCalendarDate` and `formatWeekday` pass `undefined` as the locale to `toLocaleDateString`, which resolves to the user's OS locale. On a system set to French or Japanese, OOO date ranges and weekday names will render in that language. Elsewhere in the extension (e.g. `formatTimeZoneOffset` in `schedule.ts`) the locale is pinned to `"en-US"` for consistency — apply the same here.
```suggestion
function formatCalendarDate(d: Date): string {
return d.toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" });
}
```
```suggestion
function formatWeekday(d: Date): string {
return d.toLocaleDateString("en-US", { weekday: "long" });
}
```
**Rule Used:** What: Do not implement custom localization logic i... ([source](https://app.greptile.com/review/custom-context?memory=78677f74-64f7-483b-b90d-9c33e2e049da))
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/cal-com-share-meeting-links/package.json
Line: 72-73
Comment:
**`dayjs` dependency is unused**
`dayjs` is listed in `dependencies` but is not imported anywhere under `src/` (verified via grep). The new code uses `moment` for formatting (`formatDateTime` / `formatTime`) and native `Date` APIs for everything else. Removing `dayjs` keeps the bundle lean and satisfies the requirement that every listed dependency is actually used.
```suggestion
"axios": "^1.8.4",
"moment": "^2.30.1"
```
**Rule Used:** What: Every dependency listed in package.json must... ([source](https://app.greptile.com/review/custom-context?memory=bffc60eb-f9f2-4219-b804-76e29e267d43))
How can I resolve this? If you propose a fix, please make it concise.Reviews (3): Last reviewed commit: "Bump @raycast/api to ^1.104, @raycast/ut..." | Re-trigger Greptile |
…O past filter; populate optimistic toUser on OOO create
|
Addressed all three findings in fb2b955:
|
pernielsentikaer
left a comment
There was a problem hiding this comment.
Hi 👋
Thanks for your contribution 💪
I have now tested your extension, and I have some feedback ready for you:
-
Outdated deps —
@raycast/api^1.79.1 (should be ^1.100+) and@raycast/utils^1.16.1 (should be ^2.x). These need bumping. -
Both
momentanddayjsin dependencies — the existing code usesmoment, the new code usesdayjs. Would be cleaner to pick one, but not blocking. -
No
.prettierrc— standard Raycast prettier config is missing.
I'm looking forward to testing this extension again 🔥
Feel free to contact me here or at Slack if you have any questions.
I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊
|
@pernielsentikaer Thanks for the quick feedback! Outdated deps — fixed in
Let me know if you'd like a different config — happy to adjust. I've marked the PR as ready for review but please let me know if there's any additional feedback! |
pernielsentikaer
left a comment
There was a problem hiding this comment.
Looks good to me, approved 🔥
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@andrewbenson). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag. |
Summary
This PR expands the Cal.com Share Meeting Links extension into a more general Cal.com workflow surface. It includes the v1 → v2 API migration (originally opened as #27118 — this PR supersedes it), plus three substantial new feature areas and a fix for a long-standing pagination bug in View Bookings.
Why one PR for all this
The features are intentionally cohesive: they share the same API layer (
src/api/cal.com.ts), reuse the sameuseCachedPromisecache-namespace fix, follow the same forms/actions/optimistic-update patterns, and depend on common helpers insrc/lib/. Splitting them into separate PRs would either force artificial dependencies or duplicate the shared infrastructure across reviews. The rebrand also only makes sense once the full feature set lands. Happy to split if reviewers prefer.What's in this PR
1. v1 → v2 API migration (was #27118)
cal-api-versionheaders added per endpointmeetingUrl,location,lengthInMinutes, etc.)2. New: Availability schedule management
A new top-level
View Availabilitycommand:(GMT-7) America/Los Angeles, searchable by city)Cmd+Shift+T"Set to Device Timezone" action available on every relevant surfaceTagList)3. New: Out of Office
Two new commands:
Out of Office(browse/manage) andCreate Out of Office(top-level form with native Raycast draft support):4. View Bookings — bug fix + redesign
The bug:
useBookings()was callingGET /v2/bookingswith no params, which defaults totake=100, skip=0in the API's internal order — effectively the oldest 100 bookings. Users with longer histories never saw recent or upcoming bookings.The fix + redesign:
status+sortStartquery paramsuseCachedPromisepagination (50 per page)Cmd+H)Cmd+Shift+Atoggle: Show Only My Bookings (hosts include you) vs Show All Bookings (includes team bookings hosted by others); default is filtered to yours, with a filter-aware empty stateOpen Booking in Browser, Cancel usesCtrl+X, AcceptCmd+Y, DeclineCmd+Shift+X. The cancel-confirm flow is unchanged.Cmd+Shift+R"Request Reschedule" action on Pending and Upcoming bookings — pushes a form where the user enters a reason, confirms, and the extension callsPOST /v2/bookings/{uid}/request-reschedule. Cal.com cancels the original booking and emails the attendee a link to pick a new time.https://app.cal.com/bookings/upcoming?uid=...(the logged-in user view) instead of the public-facinghttps://cal.com/booking/...Implementation notes
useCachedPromise's namespace (derived fromobject_hash(fn)) doesn't partition data across components — see comments onfetchSchedules,fetchOOOEntries, andfetchPastBookingsPaginatorCalEventType.scheduleIdto enable the View Availability "Used by" linkagesrc/lib/now houses pure helpers per feature area (schedule.ts,ooo.ts,bookings.ts) — easily unit-testable later, no test framework added in this PRTest plan
npx ray lintclean (one pre-existing title-casing warning on the new "Create Out of Office" command — the suggested "Create out of Office" reads oddly so left as-is; happy to change)npx ray build -e distclean across all 5 entry points (index,view-bookings,view-availability,out-of-office,create-out-of-office)Breaking changes
None for end users. The
nameslug is unchanged so existing installs preserve their stored API key anduseCachedStatedata. TheuseBookings()API helper is removed but it was internal only.Open items / known limitations
Cmd+Shift+Aaction in the OOO command opens the relevant cal.com settings page as an escape hatch./v2/teams+/v2/teams/{id}/memberships. Returns full membership lists for org owners (verified) and gracefully degrades to an empty dropdown for users without permission. Other listing endpoints might exist that work for non-admins — would appreciate Cal.com guidance.