Commit Graph
182 Commits
Author SHA1 Message Date
Benny JooandGitHub 75c79f76c8 perf: Remove ssrInit completely (#20439)
* remove ssrInit completely

* remove instances of dehydratedState

* fix

* refactor

* fix type checks

* fix linting

* Refactor

* Refactor

* remove log
2025-04-01 19:14:46 -04:00
48016e0f3e chore: Move CRM owner calls handleResponse (#19316)
* Handle normal ownership routing

* Skip contact owner check if true

* Fix typos

* Call getting contact owner in promise.all in handleResponse

* Pass crm contact owner data to params

* Add crm contact params

* Only get CRM owner calls if params don't exist

* Handle if properties don't exist

* Fix typo

* Pass CRM specific variables to getServerSideProps

* Remove logs

* Type fixes

* Use `wrapGetServerSIdePropsWIthSentry` in router getServerSideProps

* Add sentry monitoring

* Type fixes

* Type fix

* Type fixes

* Update imports for sentryWrapper

---------

Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
2025-03-28 10:42:28 -04:00
be883aac02 perf: Remove ssrInit from layout and event-types (#20368)
* perf: Remove ssrInit from layout and event-types

* remove ssg file since not used

* refator trpc usage in app router

* fix

---------

Co-authored-by: hbjORbj <sldisek783@gmail.com>
2025-03-26 22:04:52 -03:00
8ad442f2be feat: Upgrade to Next 15 (#18834)
* wip

* update layoutHOC

* wip

* remove app router related code no longer used

* remove more

* await cookies, headers, params, serachparams

* update yarn.lock

* await cookies, headers, params, serachparams more

* update yarn lock again

* downgrade next-auth to 4.22.1

* update yarn lock

* fix

* update yarn lock

* fix type checks

* update yarn lock

* await headers and cookies

* restore pages folder

* restore yarn.lock

* update yarn.lock

* await headers and cookies

* remove

* await params in API routes

* updates

* restore next.config.js

* remove i18n from next.config.js

* Fixed tests

* Fixed types

* Removed duplicate favicon.ico

* Fixing more types

* ImageResponse moved to next/og

* Fixed prisma import issues

* dynamic import for @ewsjs/xhr

* remove deasync dep

* dynamic import for @tryvital/vital-node

* fix type checks

* add back turbopack command

* Type fix

* Removed unneeded file

* fix turbopack relative path errors

* add comments

* remove unneeded code

* Fixed build errors

* await apis

* use Promise<Params> type in defaultResponderForAppDir util

* refactor scim api route

* fix type checks

* separate app-routing.config into client-config and server-config

* wip

* refactor routing forms components

* revert unneeded changes for easier review

* fix

* fix

* use CustomTrans

* fix type

* fix unit tests

* fix type error

* fix build error

* fix build error

* fix build error

* fix warnings

* fix warnings

* upgrade @tremor/react and tailwindcss

* numCols -> numItems

* fix forgot-password e2e test

* fix 1 more e2e test

* fix login e2e test

* fix e2e tests

* fix e2e tests

* clean up

* remove error

* use tremor/react 2.11.0

* fix

* rename CustomTrans to ServerTrans

* address comment

* fix test

* fix ServerTrans

* fix

* fix type

* fix ServerTrans usages 1

* fix translations

* fix type checks

* fix type checks

* link styling

* fix

---------

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
2025-03-20 21:30:51 -03:00
20d6eb5200 perf: Slim down loggedInViewer tRPC router (#20111)
* perf: Slim down loggedInViewer tRPC router

* Fixed trpc client calls for new routes

* Moved bookingUnconfirmedCount

* Moved getUserTopBanners to me router

* Moved shouldVerifyEmail to me router

* Moved i18n from public to its own router

* fix ssrInit

* fix ssrInit usage

* fix type check

* better naming

* fix

* fix

* Fix types

* Removed used of importHandler

---------

Co-authored-by: hbjORbj <sldisek783@gmail.com>
2025-03-16 18:22:48 -07:00
bec83b2342 chore: remove TRPC barrel exports (#19598)
* remove barrel export for client

* fix more imports

* remove server barrel

* remove more barrel exporst and fix tssconfig

* fix types

* fix imports for removed barrels

* fig ssg createserverside helpers

* restore lock

* new yarn lock

* remove barel exports

* remove barrel

* replace client with react in tsconfig

* fix yarn lock

* Update exports for trpc to not be types

* add ENDPOINTS export to the correct location

* other exports fixes lost due to barrel

* fix client error export

* more imports

---------

Co-authored-by: hbjORbj <sldisek783@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2025-03-03 15:33:32 -03:00
Benny JooandGitHub d7960021aa perf: do not import from @calcom/lib/server barrel file (#19579)
* do not import from lib/server barrel file

* fix build
2025-02-26 18:10:52 -03:00
Benny JooandGitHub acf270bc61 fix: Encode usernames in booking url to UTF-8 to prevent 500 throws (#19475)
* fix: Encode usernames in booking url to UTF-8 to prevent throws

* add dynamic booking page e2e

* add 1 more test
2025-02-25 06:27:23 -05:00
luzpazandGitHub 15334ff20b fix: typos in apps/web (#19194)
Found via `codespell -q 3 -S "*.svg,./apps/web/public/static/locales,./packages/app-store/stripepayment/lib/currencyOptions.ts,./packages/lib/freeEmailDomainCheck/freeEmailDomains.ts" -L afterall,atleast,datea,fo,incase,ist,nam,notin,optionel,perview,reccuring`

Closes #19193
2025-02-10 03:35:17 +00:00
808de26401 feat: add option to disable sending transcription emails (#19065)
* feat: add option to disable sending transcription emails

* fix: types and tests

* fix: type error

* fix: type err

* fix: type err

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2025-02-07 12:33:38 +00:00
Benny JooandGitHub f0dc3bba17 chore: tech debt clearing - getServerSession has a dead arg: res (#19053)
* remove res from arg list in getServerSession

* remove res from all usages of getServerSession
2025-02-03 00:12:42 -05:00
Benny JooandGitHub 564cc3a394 perf: remove WithLayout from more App Router routes (#19036) 2025-01-31 19:48:58 +01:00
1e610ea684 perf: don't fetch all the hosts (#18319)
* perf: don't fetch all the hosts

* fix: type err

* use appschema only when necessary

* Variable casing change and type fixes

* Another missing ts fix

* chore: update variable name

* chore: remove from personal event types

* chore: remove limitHostsToThree

* chore: make it a variable

* chore: move it below

* chore: change name to firstThreeHosts

* chore: update to first three users

* fix: type error

* chore: add firstThreeHosts

* fix: type error

* fix: type error

* fix: support users

* chore: update metadata

* fix: API v2 build error

* chore: change var name

* chore: remove cursorrules

* chore: undo API v2 changes

* chore: add type

---------

Co-authored-by: Hariom <hariombalhara@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2025-01-29 19:05:54 +02:00
Benny JooandGitHub e23ab02c23 chore: migrate /auth/forgot-password pages (#18945) 2025-01-28 21:51:14 +00:00
Benny JooandGitHub 9ad45bb477 chore: migrate /auth/setup (#18941) 2025-01-28 11:34:52 -05:00
e0527587c1 feat: routing forms for api v2 (#18885)
* init router endpoint for v2

* fixup fixup

* resolve merge conflicts

* update libraries

* update router controller

* make router endpoint public

* chore: refactor router endpoint and add team/org id

* cleanup

* chore: Only import Sentry when needed (#18882)

* perf: prerender routes in main navigation (#18883)

* chore: migrate /apps/categories pages (#18871)

* migrate apps/categories pages

* remove pages dir

* chore: app router - /payment pages (#18152)

* remove Head from payment page comp

* remove route from pages router

* move out of future folder

* add to config.matcher

* remove unneeded code

* update middleware

* fix

* fix

* perf: replace `getServerSessionForAppDir` usages with our original `getServerSession` function (#18897)

* chore: migrate /apps/installation pages (#18870)

* migrate apps/installation pages

* fix test

* chore: migrate `/auth/logout` (#18901)

* migrate /auth/verify-email page

* update middleware

* migrate /auth/logout page

* expose router endpoint

* small refactor pageprops not necessary

* sentry is already tracking performance

* reuse logic

* fixup! reuse logic

* fixup! fixup! reuse logic

* fixup! fixup! fixup! reuse logic

---------

Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2025-01-27 19:02:11 +00:00
Benny JooandGitHub 3f622fe277 chore: migrate /auth/verify (#18902)
* migrate /auth/verify page

* update middleware
2025-01-27 10:59:26 +01:00
Benny JooandGitHub ed3579c5c7 chore: migrate /auth/logout (#18901)
* migrate /auth/verify-email page

* update middleware

* migrate /auth/logout page
2025-01-27 14:22:33 +05:30
Hariom BalharaandGitHub b3f946dd0b feat: "cal.isBookingDryRun" to be used for Routing form as well (#18832) 2025-01-24 09:27:18 +05:30
Benny JooandGitHub de05e8e989 chore: migrate /auth/error (#18730)
* migrate auth/error

* fix

* fix type check
2025-01-17 06:46:47 -05:00
Benny JooandGitHub c37a8a587b fix: add decoding logic to app router params (#18712)
* decode app router params in buildLegacyCtx

* add helpful comments

* add comment

* address comment
2025-01-16 15:14:03 +00:00
Benny JooandGitHub 14151b827f fix: make ESLint work and fix lint errors that were undetected before (#18639)
* fix eslint config

* fix

* add it to dev dep

* fix

* sync eslint version

* force ts-node to compile our ESLint plugin's TS files into CommonJS (which ESLint requires)

* fix some lint errors

* fix lint errors

* remove duplicate classname

* make @typescript-eslint/ban-types a warn for packages/trpc files

* fix lint errors in trpc

* fix lint errors in trpc - 2

* fix

* fix

* fix lint warnings
2025-01-14 08:58:38 +00:00
Benny JooandGitHub e6d76b630c chore: Revert "chore: app router - /team, /org, /[user] booking pages (excl. embeds) (#18186) (#18526) 2025-01-08 11:19:45 -03:00
Hariom BalharaandGitHub 06d8b98b15 fix: 404 on the public form page for a sub-team form when the owner itself was removed from the org (#18495)
* wip

* fix: 404 for a form of a member that has been removed.

- Moved existing authorization check to isAuthorizedToViewFormOnOrgDomain function to handle form access control
- Add comprehensive test suite for org domain authorization scenarios
- Refactor getServerSideProps to use the new authorization function
- Improve code organization by separating domain-specific authorization logic

Test Coverage:
- Non-org domain access
- Org member's form access
- Sub-team form access within org
- Access denial for non-org members/teams
2025-01-07 12:13:19 +00:00
2f9c8cb441 chore: app router - /team, /org, /[user] booking pages (excl. embeds) (#18186)
* update env vars

* update middleware

* remove pages router and move pages to /app

* move to /team

* update imports

* fix

* remove pages router and move org pages to /app

* wip

* fix orgSlug/user pages

* fix orgSlug/user/type pages

* remove generateMetadata from embed pages

* fix

* remove pages router for /user pages

* generateMetadata is not needed in embed pages

* remove future/org

* no layout in [user] page

* simplify

* fix

* fix OG image for [user]

* fix OG images for org/user and team/slug

* fix OG images for booking page

* fix all metadata

* use isBrandingHidden

* remove BookerSeo and its usages

* rename excludeAppNameFromTitle -> hideBranding

* remove logic for meeting type in HeadSeo

* remove BookerSeo instances from team-view and users-public-view

* create generateMeetingMetadata util and use it to reduce duplicate code

* remove BookerSeo imports

* fix spacing

* remove constructMeetingImage mock from head-seo.test

* fetch avatarUrl using user id for user page metadata

* fix test

* remove unused test cases

* index and follow must be true by default

* invert noindex/nofollow flags

* remove HeadSeo for already migrated pages and refactor prepareMetadata

* fix organization-settings.e2e.ts

* fix order

* enable parallel test execution for dynamic-booking e2e test

* fix

* + could be %2B in app router

* refactor handling logic for embeds in app router

* fix isEmbed

* fix embed-core

* remove dead code

* move embed pages back to /future

* add back embed pages in pages router

* revert some changes

* fix import type checks

* simplify

* fix

* feat: Implement generateBookingPageMetadata function for improved SEO and metadata handling across user and event pages (#18440)

- Added a new utility function `generateBookingPageMetadata` to streamline the generation of metadata for booking and user profile pages.
- Updated multiple page components to utilize the new function, enhancing SEO indexing and metadata consistency.
- Removed redundant code related to previous metadata generation methods, improving code clarity and maintainability.

* fix dirs

* Pr-review-fixes-app-router-team-pages (#18450)

* Remove unnecessary getPublicEvent call

* Remove unused variable

* Fix 404 for team page (#18451)

* Remove console log

---------

Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
2025-01-03 22:26:30 +00:00
Hariom BalharaandGitHub b5bec79354 perf: /router endpoint perf improvement (#18366) 2024-12-27 08:56:52 +00:00
Benny JooandGitHub 3994929a51 chore: refactor handling logic for embeds in app router (#18362)
* refactor handling logic for embeds in app router

* fix type checks

* add test for withEmbedSsrAppDir

* fix
2024-12-26 10:39:07 +01:00
Benny JooandGitHub 04036c32a7 fix: filling users logic (#18128)
* fix filling users logic

* fix type check

* refactor
2024-12-12 17:12:56 +00:00
MorganandGitHub a926e0b9d6 fix: public booking page serialization error (#18070)
* fix: public booking page serialization error

* fixup! fix: public booking page serialization error
2024-12-09 14:48:06 +00:00
Vincent LamandGitHub 382f00e178 - Set stripe payment element to accordion layout (#18056)
- Removed hardcoded payment_method_types for checkouts and immediate payments
2024-12-09 11:37:46 +01:00
03704b2e73 feat: fetch SEO data for booking pages in server (#17987)
* feat: fetch public event data for booking pages server-side

* fix types

* refactor

* Replace the getPublicEvent with other smaller calls

* Change username to teamSlug

* Fixing types

* Type checks

* Pushing latest for Benny - this still has type errors

* fix type checks

* fill data for team pages too

---------

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-12-04 14:08:27 +01:00
f631abfdc4 fix: #16028 Org Settings - SEOIndexing,Disable Org Url (#16075)
Co-authored-by: Amit Sharma <74371312+Amit91848@users.noreply.github.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
2024-11-29 10:21:14 +05:30
Benny JooandGitHub aa3c91ebd6 chore: App router - add missing metadata for /[user] pages (#16516) 2024-09-16 10:42:00 -04:00
a5191d1e5a chore: App-router-migration(/auth/verify) add missing metadata / page & extract components into /module (#16444)
* create StripeRepository and simplify code

* verify-email-change: extract getServerSideProps

* add verify-email-change to app router

* auth/verify: Add metadata in app router

* auth/verify: extract client component into /modules

* fix type checks for stripe

* fix stripe session handler

* improve getServerSideProps for verify-email-change

* add title to verify-email-change page metadata

* add title to verify page metadata

* refactor

* add safety

* fix

* remove references to pages for verify-email

---------

Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-09-13 16:13:33 +00:00
cf16cd3ed2 feat: Implement Dub.co for conversion tracking (#16165)
* FEAT: Implement Dub.co for conversion tracking

* add link creation, @vercel/functions

* use refer.cal.com/:username instead of go.cal.com/r/:username

* sale conversion tracking

* add copy referral link

* limit to IS_CALCOM only

* Update yarn.lock

* fix DubAnalytics

* use workaround for isNewUser

* pass req to getOptions

* Update next-auth-options.ts

* fix ts errors

* only show DubAnalytics outside EU

* add Dub Analytics to /signup

* use WEBSITE_URL instead

* on-demand generate links

* add migration

* add check for existing link + change fetch method to poast

* remove refer.cal.com from PoweredByCal

* limit DubAnalytics to /signup only

* simplify generate-referral-link

* restore yarn.lock

* add yarn with dub sdk in

* add yarn with dub sdk in

* yarn

* Update yarn.lock

---------

Co-authored-by: sean <sean@brydon.io>
Co-authored-by: Peer Richelsen <peer@cal.com>
2024-09-12 12:33:10 -07:00
Benny JooandGitHub 26be88fc56 chore: App-router-migration /auth/error, /auth/platform, /auth/oauth2 (#16445)
* preparePageMetadata: improve logic for title

* add missing pages: oauth2 / platform

* auth/error: add to app router and extract to /modules
2024-09-04 13:15:19 +00:00
Benny JooandGitHub d059b1399b chore: App router migration - /auth/forgot-password/*, /auth/login, /auth/logout (#16467)
* migrate auth/forgot-password/*, auth/login, auth/logout

* revert

* fix forgot password

* fix folder structure

* fix logout

* fix middleware

* remove TODO log

* refactor logout
2024-09-03 18:53:16 +09:00
Somay ChauhanandGitHub b61820d354 fix: custom attributes not being synced in intercom (#14600)
* fix: custom attributes not being synced in intercom

* fix: ssrInit
2024-04-16 11:03:45 +01:00
+1 30ba168fc3 chore: bump @trpc/* and @tanstack/react-query (#13335)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: Gergő Móricz <mo.geryy@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-01-23 16:42:29 -07:00
12eec186b2 chore: [app-router-migration 31] migrate the "/auth/setup" page (#13196)
* wip

* chore: setup page migration

* fix: conventions

* fix: convention

* use client

* fix: rebase on 13.5

---------

Co-authored-by: Dmytro Hryshyn <dev.dmytroh@gmail.com>
2024-01-23 18:05:47 -03:00
DmytroHryshynandGitHub ff1aefe539 chore: [app-router-migration 39] refactor ssr/ssg functions (#13336) 2024-01-19 15:58:37 -07:00
c11e76bac9 chore: [app-router-migration 30] migrate the "login" page (#13195)
Co-authored-by: Dmytro Hryshyn <dev.dmytroh@gmail.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: zomars <zomars@me.com>
2024-01-19 15:14:14 -07:00
bf958c82da chore: [app-router-migration 32] migrate the "/auth/forgot-password/*" pages (#13197)
Co-authored-by: Dmytro Hryshyn <dev.dmytroh@gmail.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: zomars <zomars@me.com>
2024-01-19 21:08:05 +00:00
SashaandGitHub 728a386bf0 chore: [app-router-migration 35] migrate the "sso" pages (#13200)
## What does this PR do?

- This PR migrates the `/auth/sso/*` page group to the app directory (which runs under the App Router).
- The migrated page exists under `/future/auth/sso/*` and is accessible at all times.

## Requirement/Documentation

- If there is a requirement document, please, share it here.
- If there is ab UI/UX design document, please, share it here.

## Type of change

- [x] Chore (refactoring code, technical debt, workflow improvements)
- [x] New feature (non-breaking change which adds functionality)

## How should this be tested?

There should be no changes between the old sso and new sso routes in terms of content and no downgrading in terms of performance.
The pages were not tested due to being unable to reproduce the flow locally.

## Mandatory Tasks

- [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
2024-01-19 14:00:36 -07:00
SashaandGitHub 41efb5ea04 chore: [app-router-migration 34] migrate the "/auth/logout" and "/auth/signin" pages (#13199)
## What does this PR do?

- This PR migrates the `/auth/logout` and `/auth/signin` pages to the app directory (which runs under the App Router).
- Using `/future/auth/logout` is available at all times and is supposed to log the user out as `/auth/logout` page does.
- However `signin` page (or fragment) was used before should behave the same using the `/future/auth/signin` route.

## Requirement/Documentation

- If there is a requirement document, please, share it here.
- If there is ab UI/UX design document, please, share it here.

## Type of change

- [x] Chore (refactoring code, technical debt, workflow improvements)
- [x] New feature (non-breaking change which adds functionality)

## How should this be tested?

- Using `/future/auth/logout` is available at all times and is supposed to log the user out as `/auth/logout` page does.
- However `signin` page (or fragment) was used before should behave the same using the `/future/auth/signin` route. It was not tested locally.

## Mandatory Tasks

- [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
2024-01-19 13:40:53 -07:00
SashaandGitHub b268540d35 chore: [app-router-migration 33] migrate the "verify email" pages (#13198)
## What does this PR do?

- This PR migrates the `/auth/verify` and `/auth/verify-email` pages to the app directory (which runs under the App Router).
- The migrated pages exist under `/future/auth/verify` and `/future/auth/verify-email` and are accessible at all times.

## Requirement/Documentation

- If there is a requirement document, please, share it here.
- If there is ab UI/UX design document, please, share it here.

## Type of change

- [x] Chore (refactoring code, technical debt, workflow improvements)
- [x] New feature (non-breaking change which adds functionality)

## How should this be tested?

There should be no changes between the old verify and new verify routes in terms of content and no downgrading in terms of performance.
The pages were not tested due to being unable to reproduce the flow locally.

## Mandatory Tasks

- [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
2024-01-19 12:02:50 -07:00
ErikandGitHub 6a8726f5f8 chore: Insights readonly DB client (#12373) 2023-11-15 14:50:20 -07:00
c7b1e4dfa1 chore: [app dir bootstrapping 6] server-side translations (#11995)
Co-authored-by: zomars <zomars@me.com>
2023-10-25 14:43:48 -07:00
Greg PabianandGitHub 778485b31d refactor: implementation of locale calculated server-side (#11534) 2023-10-10 09:36:28 -07:00
Leo GiovanettiandGitHub ca946a9822 chore: avoid i18n strings in org profile (#11469)
* chore: avoid i18n strings in org profile

* Making sure is an org profile not a subteam
2023-09-20 20:25:38 +00:00