Scheduling infrastructure for absolutely everyone.
fix: Revert - chore: app router - all sub-pages in `/apps` #16976 (#18702)
Benny Jooce87de4fc711
diff --git a/.env.example b/.env.exampleindex cfb67a88df4..c0e3a2bb309 100644--- a/.env.example+++ b/.env.example@@ -355,6 +355,14 @@ E2E_TEST_OIDC_USER_PASSWORD=# provide a value between 0 and 100 to ensure the percentage of traffic# redirected from the legacy to the future pagesAB_TEST_BUCKET_PROBABILITY=50+APP_ROUTER_APPS_INSTALLED_CATEGORY_ENABLED=0+APP_ROUTER_APPS_SLUG_ENABLED=0+APP_ROUTER_APPS_SLUG_SETUP_ENABLED=0+# whether we redirect to the future/apps/categories from /apps/categories or not+APP_ROUTER_APPS_CATEGORIES_ENABLED=0+# whether we redirect to the future/apps/categories/[category] from /apps/categories/[category] or not+APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED=0+APP_ROUTER_APPS_ENABLED=0APP_ROUTER_TEAM_ENABLED=0APP_ROUTER_AUTH_FORGOT_PASSWORD_ENABLED=0APP_ROUTER_AUTH_LOGIN_ENABLED=0diff --git a/apps/web/abTest/middlewareFactory.ts b/apps/web/abTest/middlewareFactory.tsindex c103de9fd62..27938472378 100644--- a/apps/web/abTest/middlewareFactory.ts+++ b/apps/web/abTest/middlewareFactory.ts@@ -5,6 +5,11 @@ import { NextResponse, URLPattern } from "next/server";import { FUTURE_ROUTES_ENABLED_COOKIE_NAME, FUTURE_ROUTES_OVERRIDE_COOKIE_NAME } from "@calcom/lib/constants";const ROUTES: [URLPattern, boolean][] = [+ ["/apps/installed/:category", process.env.APP_ROUTER_APPS_INSTALLED_CATEGORY_ENABLED === "1"] as const,+ ["/apps/:slug", process.env.APP_ROUTER_APPS_SLUG_ENABLED === "1"] as const,+ ["/apps/:slug/setup", process.env.APP_ROUTER_APPS_SLUG_SETUP_ENABLED === "1"] as const,+ ["/apps/categories", process.env.APP_ROUTER_APPS_CATEGORIES_ENABLED === "1"] as const,+ ["/apps/categories/:category", process.env.APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED === "1"] as const,["/auth/forgot-password/:path*", process.env.APP_ROUTER_AUTH_FORGOT_PASSWORD_ENABLED === "1"] as const,["/auth/login", process.env.APP_ROUTER_AUTH_LOGIN_ENABLED === "1"] as const,["/auth/logout", process.env.APP_ROUTER_AUTH_LOGOUT_ENABLED === "1"] as const,diff --git a/apps/web/app/_utils.tsx b/apps/web/app/_utils.tsxindex 18acce789d7..dd05e0d3aed 100644--- a/apps/web/app/_utils.tsx+++ b/apps/web/app/_utils.tsx@@ -3,8 +3,8 @@ import i18next from "i18next";import { serverSideTranslations } from "next-i18next/serverSideTranslations";import { headers } from "next/headers";-import type { AppImageProps, MeetingImageProps } from "@calcom/lib/OgImages";-import { constructGenericImage, constructAppImage, constructMeetingImage } from "@calcom/lib/OgImages";+import type { MeetingImageProps } from "@calcom/lib/OgImages";+import { constructGenericImage, constructMeetingImage } from "@calcom/lib/OgImages";import { IS_CALCOM, WEBAPP_URL, APP_NAME, SEO_IMG_OGIMG, CAL_URL } from "@calcom/lib/constants";import { buildCanonical } from "@calcom/lib/next-seo.config";import { truncateOnWord } from "@calcom/lib/text";@@ -62,18 +62,17 @@ const _generateMetadataWithoutImage = async (const t = await getTranslationWithCache(locale);const title = getTitle(t);-+ const description = getDescription(t);const titleSuffix = `| ${APP_NAME}`;const displayedTitle = title.includes(titleSuffix) || hideBranding ? title : `${title} ${titleSuffix}`;const metadataBase = new URL(IS_CALCOM ? "https://cal.com" : WEBAPP_URL);- const truncatedDescription = truncateOnWord(getDescription(t), 158);return {title: title.length === 0 ? APP_NAME : displayedTitle,- description: truncatedDescription,+ description,alternates: { canonical },openGraph: {- description: truncatedDescription,+ description: truncateOnWord(description, 158),url: canonical,type: "website",siteName: APP_NAME,@@ -106,26 +105,6 @@ export const _generateMetadata = async (};};-export const generateAppMetadata = async (- app: AppImageProps,- getTitle: (t: TFunction<string, undefined>) => string,- getDescription: (t: TFunction<string, undefined>) => string,- hideBranding?: boolean,- origin?: string-) => {- const metadata = await _generateMetadataWithoutImage(getTitle, getDescription, hideBranding, origin);-- const image = SEO_IMG_OGIMG + constructAppImage({ ...app, description: metadata.description });-- return {- ...metadata,- openGraph: {- ...metadata.openGraph,- images: [image],- },- };-};-export const generateMeetingMetadata = async (meeting: MeetingImageProps,getTitle: (t: TFunction<string, undefined>) => string,diff --git a/apps/web/app/apps/[slug]/page.tsx b/apps/web/app/apps/[slug]/page.tsxdeleted file mode 100644index 7cd655d5d3e..00000000000--- a/apps/web/app/apps/[slug]/page.tsx+++ /dev/null@@ -1,68 +0,0 @@-import type { PageProps as _PageProps } from "app/_types";-import { generateAppMetadata } from "app/_utils";-import { WithLayout } from "app/layoutHOC";-import { notFound } from "next/navigation";-import { z } from "zod";--import { AppRepository } from "@calcom/lib/server/repository/app";-import { isPrismaAvailableCheck } from "@calcom/prisma/is-prisma-available-check";--import { getStaticProps } from "@lib/apps/[slug]/getStaticProps";--import AppView from "~/apps/[slug]/slug-view";--const paramsSchema = z.object({- slug: z.string(),-});--export const generateMetadata = async ({ params }: _PageProps) => {- const p = paramsSchema.safeParse(params);-- if (!p.success) {- return notFound();- }-- const props = await getStaticProps(p.data.slug);-- if (!props) {- notFound();- }- const { name, logo, description } = props.data;-- return await generateAppMetadata(- { slug: logo, name, description },- () => name,- () => description- );-};--export const generateStaticParams = async () => {- const isPrismaAvailable = await isPrismaAvailableCheck();-- if (!isPrismaAvailable) {- // Database is not available at build time. Make sure we fall back to building these pages on demand- return [];- }- const appStore = await AppRepository.findAppStore();- return appStore.map(({ slug }) => ({ slug }));-};--async function Page({ params }: _PageProps) {- const p = paramsSchema.safeParse(params);-- if (!p.success) {- return notFound();- }-- const props = await getStaticProps(p.data.slug);-- if (!props) {- notFound();- }-- return <AppView {...props} />;-}--export default WithLayout({ getLayout: null, ServerPage: Page });--export const dynamic = "force-static";diff --git a/apps/web/app/apps/categories/[category]/page.tsx b/apps/web/app/apps/categories/[category]/page.tsxdeleted file mode 100644index 0b9b5089c6f..00000000000--- a/apps/web/app/apps/categories/[category]/page.tsx+++ /dev/null@@ -1,40 +0,0 @@-import type { PageProps } from "app/_types";-import { _generateMetadata } from "app/_utils";-import { WithLayout } from "app/layoutHOC";-import { redirect } from "next/navigation";-import { z } from "zod";--import { AppCategories } from "@calcom/prisma/enums";--import { getStaticProps } from "@lib/apps/categories/[category]/getStaticProps";--import CategoryPage from "~/apps/categories/[category]/category-view";--const querySchema = z.object({- category: z.enum(Object.values(AppCategories) as [AppCategories, ...AppCategories[]]),-});--export const generateMetadata = async () => {- return await _generateMetadata(- (t) => t("app_store"),- (t) => t("app_store_description")- );-};--export const generateStaticParams = async () => {- const paths = Object.keys(AppCategories);- return paths.map((category) => ({ category }));-};--async function Page({ params, searchParams }: PageProps) {- const parsed = querySchema.safeParse({ ...params, ...searchParams });- if (!parsed.success) {- redirect("/apps/categories/calendar");- }-- const props = await getStaticProps(parsed.data.category);-- return <CategoryPage {...props} />;-}--export default WithLayout({ getLayout: null, ServerPage: Page });diff --git a/apps/web/app/apps/installed/[category]/page.tsx b/apps/web/app/apps/installed/[category]/page.tsxdeleted file mode 100644index c8f14c3f409..00000000000--- a/apps/web/app/apps/installed/[category]/page.tsx+++ /dev/null@@ -1,32 +0,0 @@-import type { PageProps } from "app/_types";-import { _generateMetadata } from "app/_utils";-import { WithLayout } from "app/layoutHOC";-import { redirect } from "next/navigation";-import { z } from "zod";--import { AppCategories } from "@calcom/prisma/enums";--import InstalledApps from "~/apps/installed/[category]/installed-category-view";--const querySchema = z.object({- category: z.nativeEnum(AppCategories),-});--export const generateMetadata = async () => {- return await _generateMetadata(- (t) => t("installed_apps"),- (t) => t("manage_your_connected_apps")- );-};--const InstalledAppsWrapper = async ({ params }: PageProps) => {- const parsedParams = querySchema.safeParse(params);-- if (!parsedParams.success) {- redirect("/apps/installed/calendar");- }-- return <InstalledApps category={parsedParams.data.category} />;-};--export default WithLayout({ getLayout: null, ServerPage: InstalledAppsWrapper });diff --git a/apps/web/app/apps/routing-forms/[...pages]/page.tsx b/apps/web/app/apps/routing-forms/[...pages]/page.tsxdeleted file mode 100644index a86b31568d3..00000000000--- a/apps/web/app/apps/routing-forms/[...pages]/page.tsx+++ /dev/null@@ -1 +0,0 @@-export { default } from "app/routing-forms/[...pages]/page";diff --git a/apps/web/app/apps/routing-forms/page.tsx b/apps/web/app/apps/routing-forms/page.tsxdeleted file mode 100644index 3abdb645758..00000000000--- a/apps/web/app/apps/routing-forms/page.tsx+++ /dev/null@@ -1 +0,0 @@-export { default } from "app/routing-forms/page";diff --git a/apps/web/app/apps/[slug]/[...pages]/page.tsx b/apps/web/app/future/apps/[slug]/[...pages]/page.tsxsimilarity index 100%rename from apps/web/app/apps/[slug]/[...pages]/page.tsxrename to apps/web/app/future/apps/[slug]/[...pages]/page.tsxdiff --git a/apps/web/app/future/apps/[slug]/page.tsx b/apps/web/app/future/apps/[slug]/page.tsxnew file mode 100644index 00000000000..3c7f717544a--- /dev/null+++ b/apps/web/app/future/apps/[slug]/page.tsx@@ -0,0 +1,45 @@+import { Prisma } from "@prisma/client";+import { withAppDirSsg } from "app/WithAppDirSsg";+import type { PageProps as _PageProps } from "app/_types";+import { _generateMetadata } from "app/_utils";+import { WithLayout } from "app/layoutHOC";+import { cookies, headers } from "next/headers";++import { AppRepository } from "@calcom/lib/server/repository/app";++import { getStaticProps } from "@lib/apps/[slug]/getStaticProps";+import { buildLegacyCtx } from "@lib/buildLegacyCtx";++import type { PageProps } from "~/apps/[slug]/slug-view";+import Page from "~/apps/[slug]/slug-view";++const getData = withAppDirSsg<PageProps>(getStaticProps, "future/apps/[slug]");++export const generateMetadata = async ({ params, searchParams }: _PageProps) => {+ const legacyContext = buildLegacyCtx(headers(), cookies(), params, searchParams);+ const res = await getData(legacyContext);++ return await _generateMetadata(+ () => res?.data.name ?? "",+ () => res?.data.description ?? ""+ );+};++export const generateStaticParams = async () => {+ try {+ const appStore = await AppRepository.findAppStore();+ return appStore.map(({ slug }) => ({ slug }));+ } catch (e: unknown) {+ if (e instanceof Prisma.PrismaClientInitializationError) {+ // Database is not available at build time, but that's ok – we fall back to resolving paths on demand+ } else {+ throw e;+ }+ }++ return [];+};++export default WithLayout({ getLayout: null, Page, getData });++export const dynamic = "force-static";diff --git a/apps/web/app/apps/[slug]/setup/page.tsx b/apps/web/app/future/apps/[slug]/setup/page.tsxsimilarity index 60%rename from apps/web/app/apps/[slug]/setup/page.tsxrename to apps/web/app/future/apps/[slug]/setup/page.tsxindex 9689b19e064..c10edd12a20 100644--- a/apps/web/app/apps/[slug]/setup/page.tsx+++ b/apps/web/app/future/apps/[slug]/setup/page.tsx@@ -2,34 +2,16 @@ import { withAppDirSsr } from "app/WithAppDirSsr";import type { PageProps as _PageProps } from "app/_types";import { _generateMetadata } from "app/_utils";import { WithLayout } from "app/layoutHOC";-import { notFound } from "next/navigation";-import { z } from "zod";import { getServerSideProps } from "@calcom/app-store/_pages/setup/_getServerSideProps";import Page, { type PageProps } from "~/apps/[slug]/setup/setup-view";-const paramsSchema = z.object({- slug: z.string(),-});-export const generateMetadata = async ({ params }: _PageProps) => {- const p = paramsSchema.safeParse(params);-- if (!p.success) {- return notFound();- }- const metadata = await _generateMetadata(- () => `${p.data.slug}`,+ return await _generateMetadata(+ () => `${params.slug}`,() => "");- return {- ...metadata,- robots: {- follow: false,- index: false,- },- };};const getData = withAppDirSsr<PageProps>(getServerSideProps);diff --git a/apps/web/app/future/apps/categories/[category]/page.tsx b/apps/web/app/future/apps/categories/[category]/page.tsxnew file mode 100644index 00000000000..4aae6cb8451--- /dev/null+++ b/apps/web/app/future/apps/categories/[category]/page.tsx@@ -0,0 +1,34 @@+import { withAppDirSsg } from "app/WithAppDirSsg";+import { _generateMetadata } from "app/_utils";+import { WithLayout } from "app/layoutHOC";++import { AppCategories } from "@calcom/prisma/enums";+import { isPrismaAvailableCheck } from "@calcom/prisma/is-prisma-available-check";++import { getStaticProps } from "@lib/apps/categories/[category]/getStaticProps";++import CategoryPage, { type PageProps } from "~/apps/categories/[category]/category-view";++export const generateMetadata = async () => {+ return await _generateMetadata(+ (t) => t("app_store"),+ (t) => t("app_store_description")+ );+};++export const generateStaticParams = async () => {+ const paths = Object.keys(AppCategories);+ const isPrismaAvailable = await isPrismaAvailableCheck();++ if (!isPrismaAvailable) {+ // Database is not available at build time. Make sure we fall back to building these pages on demand+ return [];+ }++ return paths.map((category) => ({ category }));+};++const getData = withAppDirSsg<PageProps>(getStaticProps, "future/apps/categories/[category]");++export default WithLayout({ getData, Page: CategoryPage, getLayout: null })<"P">;+export const dynamic = "force-static";diff --git a/apps/web/app/apps/categories/page.tsx b/apps/web/app/future/apps/categories/page.tsxsimilarity index 100%rename from apps/web/app/apps/categories/page.tsxrename to apps/web/app/future/apps/categories/page.tsxdiff --git a/apps/web/app/apps/installation/[[...step]]/page.tsx b/apps/web/app/future/apps/installation/[[...step]]/page.tsxsimilarity index 99%rename from apps/web/app/apps/installation/[[...step]]/page.tsxrename to apps/web/app/future/apps/installation/[[...step]]/page.tsxindex f1113768203..650f732d9a3 100644--- a/apps/web/app/apps/installation/[[...step]]/page.tsx+++ b/apps/web/app/future/apps/installation/[[...step]]/page.tsx@@ -12,6 +12,7 @@ import Page from "~/apps/installation/[[...step]]/step-view";export const generateMetadata = async ({ params, searchParams }: PageProps) => {const legacyCtx = buildLegacyCtx(headers(), cookies(), params, searchParams);+const { appMetadata } = await getData(legacyCtx);return await _generateMetadata((t) => `${t("install")} ${appMetadata?.name ?? ""}`,diff --git a/apps/web/app/future/apps/installed/[category]/page.tsx b/apps/web/app/future/apps/installed/[category]/page.tsxnew file mode 100644index 00000000000..c20bbf0d32f--- /dev/null+++ b/apps/web/app/future/apps/installed/[category]/page.tsx@@ -0,0 +1,18 @@+import { withAppDirSsr } from "app/WithAppDirSsr";+import { _generateMetadata } from "app/_utils";+import { WithLayout } from "app/layoutHOC";++import { getServerSidePropsAppDir } from "@lib/apps/installed/[category]/getServerSideProps";++import Page from "~/apps/installed/[category]/installed-category-view";++export const generateMetadata = async () => {+ return await _generateMetadata(+ (t) => t("installed_apps"),+ (t) => t("manage_your_connected_apps")+ );+};++const getData = withAppDirSsr(getServerSidePropsAppDir);++export default WithLayout({ getLayout: null, getData, Page });diff --git a/apps/web/app/apps/installed/page.tsx b/apps/web/app/future/apps/installed/page.tsxsimilarity index 100%rename from apps/web/app/apps/installed/page.tsxrename to apps/web/app/future/apps/installed/page.tsxdiff --git a/apps/web/app/routing-forms/[...pages]/page.tsx b/apps/web/app/future/routing-forms/[...pages]/page.tsxsimilarity index 54%rename from apps/web/app/routing-forms/[...pages]/page.tsxrename to apps/web/app/future/routing-forms/[...pages]/page.tsxindex 8bdeb008801..4ecc5a1aa08 100644--- a/apps/web/app/routing-forms/[...pages]/page.tsx+++ b/apps/web/app/future/routing-forms/[...pages]/page.tsx@@ -10,10 +10,10 @@ const paramsSchema = zpages: [],});-const Page = ({ params }: PageProps) => {- const { pages } = paramsSchema.parse(params);+const Page = ({ params, searchParams }: PageProps) => {+ const { pages } = paramsSchema.parse({ ...params, ...searchParams });- redirect(`/routing/${pages.length ? pages.join("/") : ""}`);+ redirect(`/apps/routing-forms/${pages.length ? pages.join("/") : ""}`);};export default Page;diff --git a/apps/web/app/routing-forms/page.tsx b/apps/web/app/future/routing-forms/page.tsxsimilarity index 53%rename from apps/web/app/routing-forms/page.tsxrename to apps/web/app/future/routing-forms/page.tsxindex 39c972a3856..ba222ba4761 100644--- a/apps/web/app/routing-forms/page.tsx+++ b/apps/web/app/future/routing-forms/page.tsx@@ -1,7 +1,7 @@import { redirect } from "next/navigation";-const Page = async () => {- redirect("/routing/forms");+const Page = () => {+ redirect("/apps/routing-forms/forms");};export default Page;diff --git a/apps/web/app/routing/[...pages]/page.tsx b/apps/web/app/routing/[...pages]/page.tsxdeleted file mode 100644index 8f91cfddc58..00000000000--- a/apps/web/app/routing/[...pages]/page.tsx+++ /dev/null@@ -1,70 +0,0 @@-import { withAppDirSsr } from "app/WithAppDirSsr";-import type { PageProps } from "app/_types";-import { _generateMetadata } from "app/_utils";-import { WithLayout } from "app/layoutHOC";-import type { GetServerSidePropsResult } from "next";-import { cookies, headers } from "next/headers";-import { notFound } from "next/navigation";-import z from "zod";--import { buildLegacyCtx } from "@lib/buildLegacyCtx";-import { getServerSideProps } from "@lib/routing/[...pages]/getServerSideProps";--import RoutingFormsPage, { getLayout } from "~/routing/[...pages]/pages-view";--const paramsSchema = z.object({- pages: z.array(z.string()),-});--export const generateMetadata = async ({ params, searchParams }: PageProps) => {- const p = paramsSchema.safeParse(params);-- if (!p.success) {- return notFound();- }- const ctx = buildLegacyCtx(headers(), cookies(), params, searchParams);- const data = await getData({- ...ctx,- params: {- slug: "routing-forms",- pages: params.pages,- },- });- const form = "form" in data ? (data.form as { name?: string; description?: string }) : null;- const formName = form?.name;- const formDescription = form?.description;-- const { pages } = p.data;-- if (pages.includes("routing-link")) {- return await _generateMetadata(- () => `${formName} | Cal.com Forms`,- () => "",- true- );- }-- return await _generateMetadata(- (t) => formName ?? t("routing_forms"),- (t) => formDescription ?? t("routing_forms_description")- );-};--const getData = withAppDirSsr<GetServerSidePropsResult<any>>(getServerSideProps);--const ServerPage = async ({ params, searchParams }: PageProps) => {- const ctx = buildLegacyCtx(headers(), cookies(), params, searchParams);- const props = await getData({- ...ctx,- params: {- slug: "routing-forms",- pages: params.pages,- },- });- return <RoutingFormsPage {...props} />;-};--export default WithLayout({- getLayout,- ServerPage,-});diff --git a/apps/web/app/routing/page.tsx b/apps/web/app/routing/page.tsxdeleted file mode 100644index 39c972a3856..00000000000--- a/apps/web/app/routing/page.tsx+++ /dev/null@@ -1,7 +0,0 @@-import { redirect } from "next/navigation";--const Page = async () => {- redirect("/routing/forms");-};--export default Page;diff --git a/apps/web/components/apps/App.tsx b/apps/web/components/apps/App.tsxindex f0ef2ead985..6ad0c4b60b3 100644--- a/apps/web/components/apps/App.tsx+++ b/apps/web/components/apps/App.tsx@@ -1,6 +1,7 @@import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired";import Shell from "@calcom/features/shell/Shell";import { useLocale } from "@calcom/lib/hooks/useLocale";+import { HeadSeo } from "@calcom/ui";import type { AppPageProps } from "./AppPage";import { AppPage } from "./AppPage";@@ -13,6 +14,11 @@ const ShellHeading = () => {export default function WrappedApp(props: AppPageProps) {return (<Shell smallHeading isPublic hideHeadingOnMobile heading={<ShellHeading />} backPath="/apps" withoutSeo>+ <HeadSeo+ title={props.name}+ description={props.description}+ app={{ slug: props.logo, name: props.name, description: props.description }}+ />{props.licenseRequired ? (<LicenseRequired><AppPage {...props} />diff --git a/apps/web/components/dialog/RerouteDialog.tsx b/apps/web/components/dialog/RerouteDialog.tsxindex d39d8686822..ca72e40dc83 100644--- a/apps/web/components/dialog/RerouteDialog.tsx+++ b/apps/web/components/dialog/RerouteDialog.tsx@@ -807,7 +807,7 @@ const RerouteDialogContentAndFooterWithFormResponse = ({<div><LinkclassName="text-emphasis text-semibold font-cal mb-4 flex underline"- href={`/routing/form-edit/${form.id}`}+ href={`/apps/routing-forms/form-edit/${form.id}`}target="_blank">{form.name}</Link>diff --git a/apps/web/lib/apps/[slug]/[...pages]/getServerSideProps.ts b/apps/web/lib/apps/[slug]/[...pages]/getServerSideProps.tsindex ced207cec26..5cd62aade0c 100644--- a/apps/web/lib/apps/[slug]/[...pages]/getServerSideProps.ts+++ b/apps/web/lib/apps/[slug]/[...pages]/getServerSideProps.ts@@ -2,6 +2,7 @@ import type { GetServerSidePropsContext, GetServerSidePropsResult } from "next";import { z } from "zod";import { getAppWithMetadata } from "@calcom/app-store/_appRegistry";+import RoutingFormsRoutingConfig from "@calcom/app-store/routing-forms/pages/app-routing.config";import TypeformRoutingConfig from "@calcom/app-store/typeform/pages/app-routing.config";import { getServerSession } from "@calcom/features/auth/lib/getServerSession";import prisma from "@calcom/prisma";@@ -31,6 +32,7 @@ type NotFound = {// TODO: It is a candidate for apps.*.generated.*const AppsRouting = {+ "routing-forms": RoutingFormsRoutingConfig,typeform: TypeformRoutingConfig,};diff --git a/apps/web/lib/apps/[slug]/getStaticProps.tsx b/apps/web/lib/apps/[slug]/getStaticProps.tsxindex 61079a28349..9113ba9c4e5 100644--- a/apps/web/lib/apps/[slug]/getStaticProps.tsx+++ b/apps/web/lib/apps/[slug]/getStaticProps.tsx@@ -1,5 +1,7 @@import fs from "fs";import matter from "gray-matter";+import MarkdownIt from "markdown-it";+import type { GetStaticPropsContext } from "next";import path from "path";import { z } from "zod";@@ -8,6 +10,8 @@ import { getAppAssetFullPath } from "@calcom/app-store/getAppAssetFullPath";import { IS_PRODUCTION } from "@calcom/lib/constants";import prisma from "@calcom/prisma";+const md = new MarkdownIt("default", { html: true, breaks: true });+export const sourceSchema = z.object({content: z.string(),data: z.object({@@ -25,15 +29,15 @@ export const sourceSchema = z.object({}),});-export type AppDataProps = NonNullable<Awaited<ReturnType<typeof getStaticProps>>>;+export const getStaticProps = async (ctx: GetStaticPropsContext) => {+ if (typeof ctx.params?.slug !== "string") return { notFound: true } as const;-export const getStaticProps = async (slug: string) => {const appMeta = await getAppWithMetadata({- slug,+ slug: ctx.params?.slug,});const appFromDb = await prisma.app.findUnique({- where: { slug: slug.toLowerCase() },+ where: { slug: ctx.params.slug.toLowerCase() },});const isAppAvailableInFileSystem = appMeta;@@ -41,14 +45,16 @@ export const getStaticProps = async (slug: string) => {if (!IS_PRODUCTION && isAppDisabled) {return {- isAppDisabled: true as const,- data: {- ...appMeta,+ props: {+ isAppDisabled: true as const,+ data: {+ ...appMeta,+ },},};}- if (!appFromDb || !appMeta || isAppDisabled) return null;+ if (!appFromDb || !appMeta || isAppDisabled) return { notFound: true } as const;const isTemplate = appMeta.isTemplate;const appDirname = path.join(isTemplate ? "templates" : "", appFromDb.dirName);@@ -79,8 +85,10 @@ export const getStaticProps = async (slug: string) => {});}return {- isAppDisabled: false as const,- source: { content, data },- data: appMeta,+ props: {+ isAppDisabled: false as const,+ source: { content, data },+ data: appMeta,+ },};};diff --git a/apps/web/lib/apps/categories/[category]/getStaticProps.tsx b/apps/web/lib/apps/categories/[category]/getStaticProps.tsxindex 29daa45a820..7afa898b1c9 100644--- a/apps/web/lib/apps/categories/[category]/getStaticProps.tsx+++ b/apps/web/lib/apps/categories/[category]/getStaticProps.tsx@@ -1,10 +1,12 @@+import type { GetStaticPropsContext } from "next";+import { getAppRegistry } from "@calcom/app-store/_appRegistry";import prisma from "@calcom/prisma";import type { AppCategories } from "@calcom/prisma/enums";-export type CategoryDataProps = NonNullable<Awaited<ReturnType<typeof getStaticProps>>>;+export const getStaticProps = async (context: GetStaticPropsContext) => {+ const category = context.params?.category as AppCategories;-export const getStaticProps = async (category: AppCategories) => {const appQuery = await prisma.app.findMany({where: {categories: {@@ -22,7 +24,8 @@ export const getStaticProps = async (category: AppCategories) => {const apps = appStore.filter((app) => dbAppsSlugs.includes(app.slug));return {- apps,- category,+ props: {+ apps,+ },};};diff --git a/apps/web/lib/apps/installed/[category]/getServerSideProps.tsx b/apps/web/lib/apps/installed/[category]/getServerSideProps.tsxnew file mode 100644index 00000000000..109032a2392--- /dev/null+++ b/apps/web/lib/apps/installed/[category]/getServerSideProps.tsx@@ -0,0 +1,78 @@+import type { GetServerSidePropsContext } from "next";+import { z } from "zod";++import { AppCategories } from "@calcom/prisma/enums";++export type querySchemaType = z.infer<typeof querySchema>;++export const querySchema = z.object({+ category: z.nativeEnum(AppCategories),+});++export async function getServerSideProps(ctx: GetServerSidePropsContext) {+ // get return-to cookie and redirect if needed+ const { cookies } = ctx.req;++ const returnTo = cookies["return-to"];++ if (cookies && returnTo) {+ ctx.res.setHeader("Set-Cookie", "return-to=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT");+ const redirect = {+ redirect: {+ destination: `${returnTo}`,+ permanent: false,+ },+ } as const;++ return redirect;+ }++ const params = querySchema.safeParse(ctx.params);++ if (!params.success) {+ const notFound = { notFound: true } as const;++ return notFound;+ }++ return {+ props: {+ category: params.data.category,+ },+ };+}++export async function getServerSidePropsAppDir(ctx: GetServerSidePropsContext) {+ // get return-to cookie and redirect if needed+ const { cookies } = ctx.req;++ const returnTo = cookies["return-to"];++ if (cookies && returnTo) {+ const NextResponse = await import("next/server").then((mod) => mod.NextResponse);+ const response = NextResponse.next();+ response.headers.set("Set-Cookie", "return-to=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT");+ const redirect = {+ redirect: {+ destination: `${returnTo}`,+ permanent: false,+ },+ } as const;++ return redirect;+ }++ const params = querySchema.safeParse(ctx.params);++ if (!params.success) {+ const notFound = { notFound: true } as const;++ return notFound;+ }++ return {+ props: {+ category: params.data.category,+ },+ };+}diff --git a/apps/web/lib/apps/installed/getServerSideProps.tsx b/apps/web/lib/apps/installed/getServerSideProps.tsxnew file mode 100644index 00000000000..a43490aea51--- /dev/null+++ b/apps/web/lib/apps/installed/getServerSideProps.tsx@@ -0,0 +1,3 @@+export async function getServerSideProps() {+ return { redirect: { permanent: false, destination: "/apps/installed/calendar" } };+}diff --git a/apps/web/lib/routing/[...pages]/getServerSideProps.ts b/apps/web/lib/routing/[...pages]/getServerSideProps.tsdeleted file mode 100644index 681d51b251a..00000000000--- a/apps/web/lib/routing/[...pages]/getServerSideProps.ts+++ /dev/null@@ -1,118 +0,0 @@-import type { GetServerSidePropsContext, GetServerSidePropsResult } from "next";-import { z } from "zod";--import { getAppWithMetadata } from "@calcom/app-store/_appRegistry";-import { routingServerSidePropsConfig } from "@calcom/app-store/routing-forms/pages/app-routing-server.config";-import { getServerSession } from "@calcom/features/auth/lib/getServerSession";-import { prisma } from "@calcom/prisma";-import type { AppGetServerSideProps } from "@calcom/types/AppGetServerSideProps";--import type { AppProps } from "@lib/app-providers";--import { ssrInit } from "@server/lib/ssr";--type RoutingPageType = {- getServerSideProps?: AppGetServerSideProps;- // A component than can accept any properties- // eslint-disable-next-line @typescript-eslint/no-explicit-any- default: ((props: any) => JSX.Element) &- Pick<AppProps["Component"], "isBookingPage" | "getLayout" | "PageWrapper">;-};--type Found = {- notFound: false;- getServerSideProps: RoutingPageType["getServerSideProps"];-};--type NotFound = {- notFound: true;-};--function getRoute(pages: string[]) {- const mainPage = pages[0];- const getServerSideProps = routingServerSidePropsConfig[mainPage] as RoutingPageType["getServerSideProps"];-- if (!getServerSideProps || typeof getServerSideProps !== "function") {- return {- notFound: true,- } as NotFound;- }- return { notFound: false, getServerSideProps } as Found;-}--const paramsSchema = z.object({- slug: z.string(),- pages: z.array(z.string()),-});--export async function getServerSideProps(- context: GetServerSidePropsContext-): Promise<GetServerSidePropsResult<any>> {- const { params, req } = context;- if (!params) {- return {- notFound: true,- };- }-- const parsedParams = paramsSchema.safeParse(params);- if (!parsedParams.success) {- return {- notFound: true,- };- }-- const appName = parsedParams.data.slug;- const pages = parsedParams.data.pages;- const route = getRoute(pages);-- if (route.notFound) {- return { notFound: true };- }-- if (route.getServerSideProps) {- params.appPages = pages.slice(1);- const session = await getServerSession({ req });- const user = session?.user;- const app = await getAppWithMetadata({ slug: appName });-- if (!app) {- return {- notFound: true,- };- }-- const result = await route.getServerSideProps(- context as GetServerSidePropsContext<{- slug: string;- pages: string[];- appPages: string[];- }>,- prisma,- user,- ssrInit- );-- if (result.notFound) {- return { notFound: true };- }-- if (result.redirect) {- return { redirect: result.redirect };- }-- return {- props: {- appName,- appUrl: app.simplePath,- ...result.props,- },- };- } else {- return {- props: {- appName,- },- };- }-}diff --git a/apps/web/middleware.ts b/apps/web/middleware.tsindex e951ebe6dd9..94f36de3214 100644--- a/apps/web/middleware.ts+++ b/apps/web/middleware.ts@@ -63,9 +63,11 @@ const middleware = async (req: NextRequest): Promise<NextResponse<unknown>> => {requestHeaders.set("x-csp-enforce", "true");}- if (url.pathname.startsWith("/apps/installed")) {+ if (url.pathname.startsWith("/future/apps/installed")) {const returnTo = req.cookies.get("return-to")?.value;if (returnTo !== undefined) {+ requestHeaders.set("Set-Cookie", "return-to=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT");+let validPathname = returnTo;try {@@ -74,14 +76,8 @@ const middleware = async (req: NextRequest): Promise<NextResponse<unknown>> => {const nextUrl = url.clone();nextUrl.pathname = validPathname;-- const response = NextResponse.redirect(nextUrl);- response.cookies.set("return-to", "", {- expires: new Date(0),- path: "/",- });-- return response;+ // TODO: Consider using responseWithHeaders here+ return NextResponse.redirect(nextUrl, { headers: requestHeaders });}}@@ -111,10 +107,9 @@ const routingForms = {handleRewrite: (url: URL) => {// Don't 404 old routing_forms linksif (url.pathname.startsWith("/apps/routing_forms")) {- url.pathname = url.pathname.replace(/^\/apps\/routing_forms($|\/)/, "/routing/");+ url.pathname = url.pathname.replace(/^\/apps\/routing_forms($|\/)/, "/apps/routing-forms/");return NextResponse.rewrite(url);}- return null;},};@@ -172,11 +167,26 @@ export const config = {"/api/trpc/:path*","/login","/auth/login",- "/apps/:path*",- "/getting-started/:path*",- "/workflows/:path*",+ "/future/auth/login",+ /**+ * Paths required by routingForms.handle+ */+ "/apps/routing_forms/:path*",+"/event-types/:path*",- "/routing/:path*",+ "/apps/installed/:category/",+ "/future/apps/installed/:category/",+ "/apps/:slug/",+ "/future/apps/:slug/",+ "/apps/:slug/setup/",+ "/future/apps/:slug/setup/",+ "/apps/categories/",+ "/future/apps/categories/",+ "/apps/categories/:category/",+ "/future/apps/categories/:category/",+ "/workflows/:path*",+ "/getting-started/:path*",+ "/apps","/bookings/:path*","/video/:path*","/teams/:path*",diff --git a/apps/web/modules/apps/[slug]/[...pages]/pages-view.tsx b/apps/web/modules/apps/[slug]/[...pages]/pages-view.tsxindex 464cd901db2..1a1ca5d06fb 100644--- a/apps/web/modules/apps/[slug]/[...pages]/pages-view.tsx+++ b/apps/web/modules/apps/[slug]/[...pages]/pages-view.tsx@@ -1,5 +1,6 @@"use client";+import RoutingFormsRoutingConfig from "@calcom/app-store/routing-forms/pages/app-routing.config";import TypeformRoutingConfig from "@calcom/app-store/typeform/pages/app-routing.config";import { useParamsWithFallback } from "@calcom/lib/hooks/useParamsWithFallback";import type { AppGetServerSideProps } from "@calcom/types/AppGetServerSideProps";@@ -28,6 +29,7 @@ type NotFound = {// TODO: It is a candidate for apps.*.generated.*const AppsRouting = {+ "routing-forms": RoutingFormsRoutingConfig,typeform: TypeformRoutingConfig,};diff --git a/apps/web/modules/apps/[slug]/setup/setup-view.tsx b/apps/web/modules/apps/[slug]/setup/setup-view.tsxindex da07c32b8ef..921423ce79b 100644--- a/apps/web/modules/apps/[slug]/setup/setup-view.tsx+++ b/apps/web/modules/apps/[slug]/setup/setup-view.tsx@@ -7,6 +7,7 @@ import { AppSetupPage } from "@calcom/app-store/_pages/setup";import type { getServerSideProps } from "@calcom/app-store/_pages/setup/_getServerSideProps";import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";import type { inferSSRProps } from "@calcom/types/inferSSRProps";+import { HeadSeo } from "@calcom/ui";export type PageProps = inferSSRProps<typeof getServerSideProps>;@@ -27,5 +28,11 @@ export default function SetupInformation(props: PageProps) {router.replace(`/auth/login?${urlSearchParams.toString()}`);}- return <AppSetupPage slug={slug} {...props} />;+ return (+ <>+ {/* So that the set up page does not get indexed by search engines */}+ <HeadSeo nextSeoProps={{ noindex: true, nofollow: true }} title={`${slug} | Cal.com`} description="" />+ <AppSetupPage slug={slug} {...props} />+ </>+ );}diff --git a/apps/web/modules/apps/[slug]/slug-view.tsx b/apps/web/modules/apps/[slug]/slug-view.tsxindex b0faacc283b..6331f81e401 100644--- a/apps/web/modules/apps/[slug]/slug-view.tsx+++ b/apps/web/modules/apps/[slug]/slug-view.tsx@@ -1,5 +1,7 @@"use client";+import MarkdownIt from "markdown-it";+import type { InferGetStaticPropsType } from "next";import Link from "next/link";import { IS_PRODUCTION } from "@calcom/lib/constants";@@ -7,12 +9,16 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML";import { showToast } from "@calcom/ui";-import type { AppDataProps } from "@lib/apps/[slug]/getStaticProps";+import type { getStaticProps } from "@lib/apps/[slug]/getStaticProps";import useRouterQuery from "@lib/hooks/useRouterQuery";import App from "@components/apps/App";-function SingleAppPage(props: AppDataProps) {+const md = new MarkdownIt("default", { html: true, breaks: true });++export type PageProps = InferGetStaticPropsType<typeof getStaticProps>;++function SingleAppPage(props: PageProps) {const { error, setQuery: setError } = useRouterQuery("error");const { t } = useLocale();if (error === "account_already_linked") {diff --git a/apps/web/modules/apps/categories/[category]/category-view.tsx b/apps/web/modules/apps/categories/[category]/category-view.tsxindex c3d1f7990b9..519dca26dc3 100644--- a/apps/web/modules/apps/categories/[category]/category-view.tsx+++ b/apps/web/modules/apps/categories/[category]/category-view.tsx@@ -1,15 +1,20 @@"use client";+import type { InferGetStaticPropsType } from "next";import Link from "next/link";import Shell from "@calcom/features/shell/Shell";+import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";import { useLocale } from "@calcom/lib/hooks/useLocale";import { AppCard, SkeletonText } from "@calcom/ui";-import type { CategoryDataProps } from "@lib/apps/categories/[category]/getStaticProps";+import type { getStaticProps } from "@lib/apps/categories/[category]/getStaticProps";-export default function Apps({ apps, category }: CategoryDataProps) {+export type PageProps = InferGetStaticPropsType<typeof getStaticProps>;+export default function Apps({ apps }: PageProps) {+ const searchParams = useCompatSearchParams();const { t, isLocaleReady } = useLocale();+ const category = searchParams?.get("category");return (<>diff --git a/apps/web/modules/apps/installation/[[...step]]/step-view.tsx b/apps/web/modules/apps/installation/[[...step]]/step-view.tsxindex 6245054a032..d5937d32518 100644--- a/apps/web/modules/apps/installation/[[...step]]/step-view.tsx+++ b/apps/web/modules/apps/installation/[[...step]]/step-view.tsx@@ -1,5 +1,6 @@"use client";+import Head from "next/head";import { usePathname, useRouter } from "next/navigation";import { useEffect, useMemo, useRef, useState } from "react";import { useForm } from "react-hook-form";@@ -225,6 +226,12 @@ const OnboardingPage = ({key={pathname}className="dark:bg-brand dark:text-brand-contrast text-emphasis min-h-screen px-4"data-testid="onboarding">+ <Head>+ <title>+ {t("install")} {appMetadata?.name ?? ""}+ </title>+ <link rel="icon" href="/favicon.ico" />+ </Head><div className="mx-auto py-6 sm:px-4 md:py-24"><div className="relative"><div className="sm:mx-auto sm:w-full sm:max-w-[600px]" ref={formPortalRef}>diff --git a/apps/web/modules/apps/installed/[category]/installed-category-view.tsx b/apps/web/modules/apps/installed/[category]/installed-category-view.tsxindex e59480a6dbb..ba392420aa8 100644--- a/apps/web/modules/apps/installed/[category]/installed-category-view.tsx+++ b/apps/web/modules/apps/installed/[category]/installed-category-view.tsx@@ -8,9 +8,11 @@ import type { UpdateUsersDefaultConferencingAppParams } from "@calcom/features/aimport DisconnectIntegrationModal from "@calcom/features/apps/components/DisconnectIntegrationModal";import type { RemoveAppParams } from "@calcom/features/apps/components/DisconnectIntegrationModal";import type { BulkUpdatParams } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";+import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";import { useLocale } from "@calcom/lib/hooks/useLocale";import { AppCategories } from "@calcom/prisma/enums";import { trpc } from "@calcom/trpc/react";+import type { inferSSRProps } from "@calcom/types/inferSSRProps";import type { Icon } from "@calcom/ui";import {AppSkeletonLoader as SkeletonLoader,@@ -21,6 +23,7 @@ import {} from "@calcom/ui";import { QueryCell } from "@lib/QueryCell";+import type { querySchemaType, getServerSideProps } from "@lib/apps/installed/[category]/getServerSideProps";import { CalendarListContainer } from "@components/apps/CalendarListContainer";import InstalledAppsLayout from "@components/apps/layouts/InstalledAppsLayout";@@ -180,13 +183,13 @@ type ModalState = {teamId?: number;};-type PageProps = {- category: AppCategories;-};+export type PageProps = inferSSRProps<typeof getServerSideProps>;-export default function InstalledApps({ category }: PageProps) {+export default function InstalledApps(props: PageProps) {+ const searchParams = useCompatSearchParams();const { t } = useLocale();const utils = trpc.useUtils();+ const category = searchParams?.get("category") as querySchemaType["category"];const categoryList: AppCategories[] = Object.values(AppCategories).filter((category) => {// Exclude calendar and other from categoryList, we handle those slightly differently belowreturn !(category in { other: null, calendar: null });diff --git a/apps/web/modules/routing/[...pages]/pages-view.tsx b/apps/web/modules/routing/[...pages]/pages-view.tsxdeleted file mode 100644index fe95221a1b0..00000000000--- a/apps/web/modules/routing/[...pages]/pages-view.tsx+++ /dev/null@@ -1,76 +0,0 @@-"use client";--import { useParams } from "next/navigation";--import RoutingFormsRoutingConfig from "@calcom/app-store/routing-forms/pages/app-routing.config";-import type { AppGetServerSideProps } from "@calcom/types/AppGetServerSideProps";-import type { inferSSRProps } from "@calcom/types/inferSSRProps";--import type { AppProps } from "@lib/app-providers";-import type { getServerSideProps } from "@lib/apps/[slug]/[...pages]/getServerSideProps";--type RoutingPageType = {- getServerSideProps: AppGetServerSideProps;- // A component than can accept any properties- // eslint-disable-next-line @typescript-eslint/no-explicit-any- default: ((props: any) => JSX.Element) &- Pick<AppProps["Component"], "isBookingPage" | "getLayout" | "PageWrapper">;-};--type Found = {- notFound: false;- Component: RoutingPageType["default"];- getServerSideProps: RoutingPageType["getServerSideProps"];-};--type NotFound = {- notFound: true;-};--function getRoute(pages: string[]) {- const routingConfig = RoutingFormsRoutingConfig as unknown as Record<string, RoutingPageType>;- const mainPage = pages[0];- const appPage = routingConfig.layoutHandler || (routingConfig[mainPage] as RoutingPageType);- if (!appPage) {- return {- notFound: true,- } as NotFound;- }- return { notFound: false, Component: appPage.default, ...appPage } as Found;-}-export type PageProps = inferSSRProps<typeof getServerSideProps>;--const RoutingFormsPage: RoutingPageType["default"] = function RoutingFormsPage(props: PageProps) {- const params = useParams();- const _pages = params?.pages ?? [];- const pages = Array.isArray(_pages) ? _pages : _pages.split("/");- const route = getRoute(pages);-- const componentProps = {- ...props,- pages: pages.slice(1),- };-- if (!route || route.notFound) {- throw new Error("Route can't be undefined");- }- return <route.Component {...componentProps} />;-};--export const getLayout: NonNullable<(typeof RoutingFormsPage)["getLayout"]> = (page) => {- // eslint-disable-next-line react-hooks/rules-of-hooks- const params = useParams();- const _pages = params?.pages ?? [];- const pages = Array.isArray(_pages) ? _pages : _pages.split("/");- const route = getRoute(pages as string[]);-- if (route.notFound) {- return null;- }- if (!route.Component.getLayout) {- return page;- }- return route.Component.getLayout(page);-};--export default RoutingFormsPage;diff --git a/apps/web/next.config.js b/apps/web/next.config.jsindex a5e69f50ef7..f66a47cedf4 100644--- a/apps/web/next.config.js+++ b/apps/web/next.config.js@@ -295,7 +295,7 @@ const nextConfig = {const beforeFiles = [{source: "/forms/:formQuery*",- destination: "/routing/routing-link/:formQuery*",+ destination: "/apps/routing-forms/routing-link/:formQuery*",},{source: "/success/:path*",diff --git a/apps/web/pages/apps/[slug]/[...pages].tsx b/apps/web/pages/apps/[slug]/[...pages].tsxnew file mode 100644index 00000000000..6de4cdfd96f--- /dev/null+++ b/apps/web/pages/apps/[slug]/[...pages].tsx@@ -0,0 +1,15 @@+import { getServerSideProps } from "@lib/apps/[slug]/[...pages]/getServerSideProps";++import PageWrapper from "@components/PageWrapper";++import type { PageProps } from "~/apps/[slug]/[...pages]/pages-view";+import PagesView, { getLayout } from "~/apps/[slug]/[...pages]/pages-view";++const Page = (props: PageProps) => <PagesView {...props} />;++Page.PageWrapper = PageWrapper;+Page.getLayout = getLayout;++export { getServerSideProps };++export default Page;diff --git a/apps/web/pages/apps/[slug]/index.tsx b/apps/web/pages/apps/[slug]/index.tsxnew file mode 100644index 00000000000..b3419ceb9b9--- /dev/null+++ b/apps/web/pages/apps/[slug]/index.tsx@@ -0,0 +1,39 @@+import { Prisma } from "@prisma/client";+import type { GetStaticPaths } from "next";++import { AppRepository } from "@calcom/lib/server/repository/app";++import { getStaticProps } from "@lib/apps/[slug]/getStaticProps";++import PageWrapper from "@components/PageWrapper";++import type { PageProps } from "~/apps/[slug]/slug-view";+import SingleAppPage from "~/apps/[slug]/slug-view";++const Page = (props: PageProps) => <SingleAppPage {...props} />;++export const getStaticPaths: GetStaticPaths<{ slug: string }> = async () => {+ let paths: { params: { slug: string } }[] = [];++ try {+ const appStore = await AppRepository.findAppStore();+ paths = appStore.map(({ slug }) => ({ params: { slug } }));+ } catch (e: unknown) {+ if (e instanceof Prisma.PrismaClientInitializationError) {+ // Database is not available at build time, but that's ok – we fall back to resolving paths on demand+ } else {+ throw e;+ }+ }++ return {+ paths,+ fallback: "blocking",+ };+};++export { getStaticProps };++Page.PageWrapper = PageWrapper;++export default Page;diff --git a/apps/web/pages/apps/[slug]/setup.tsx b/apps/web/pages/apps/[slug]/setup.tsxnew file mode 100644index 00000000000..625040aa7aa--- /dev/null+++ b/apps/web/pages/apps/[slug]/setup.tsx@@ -0,0 +1,14 @@+import { getServerSideProps } from "@calcom/app-store/_pages/setup/_getServerSideProps";++import PageWrapper from "@components/PageWrapper";++import type { PageProps } from "~/apps/[slug]/setup/setup-view";+import SetupView from "~/apps/[slug]/setup/setup-view";++const Page = (props: PageProps) => <SetupView {...props} />;++Page.PageWrapper = PageWrapper;++export { getServerSideProps };++export default Page;diff --git a/apps/web/pages/apps/categories/[category].tsx b/apps/web/pages/apps/categories/[category].tsxnew file mode 100644index 00000000000..7c1a1a39d6c--- /dev/null+++ b/apps/web/pages/apps/categories/[category].tsx@@ -0,0 +1,33 @@+import { AppCategories } from "@calcom/prisma/enums";+import { isPrismaAvailableCheck } from "@calcom/prisma/is-prisma-available-check";++import { getStaticProps } from "@lib/apps/categories/[category]/getStaticProps";++import PageWrapper from "@components/PageWrapper";++import type { PageProps } from "~/apps/categories/[category]/category-view";+import CategoryView from "~/apps/categories/[category]/category-view";++const Page = (props: PageProps) => <CategoryView {...props} />;+Page.PageWrapper = PageWrapper;++export const getStaticPaths = async () => {+ const paths = Object.keys(AppCategories);+ const isPrismaAvailable = await isPrismaAvailableCheck();+ if (!isPrismaAvailable) {+ // Database is not available at build time. Make sure we fall back to building these pages on demand+ return {+ paths: [],+ fallback: "blocking",+ };+ }++ return {+ paths: paths.map((category) => ({ params: { category } })),+ fallback: false,+ };+};++export default Page;++export { getStaticProps };diff --git a/apps/web/pages/apps/categories/index.tsx b/apps/web/pages/apps/categories/index.tsxnew file mode 100644index 00000000000..54c738a5c9c--- /dev/null+++ b/apps/web/pages/apps/categories/index.tsx@@ -0,0 +1,12 @@+import { getServerSideProps } from "@lib/apps/categories/getServerSideProps";++import PageWrapper from "@components/PageWrapper";++import type { PageProps } from "~/apps/categories/categories-view";+import Apps from "~/apps/categories/categories-view";++const Page = (props: PageProps) => <Apps {...props} />;+Page.PageWrapper = PageWrapper;++export default Page;+export { getServerSideProps };diff --git a/apps/web/pages/apps/installation/[[...step]].tsx b/apps/web/pages/apps/installation/[[...step]].tsxnew file mode 100644index 00000000000..d50152f1be9--- /dev/null+++ b/apps/web/pages/apps/installation/[[...step]].tsx@@ -0,0 +1,12 @@+import PageWrapper from "@components/PageWrapper";++import type { OnboardingPageProps } from "~/apps/installation/[[...step]]/step-view";+import StepView from "~/apps/installation/[[...step]]/step-view";++const Page = (props: OnboardingPageProps) => <StepView {...props} />;++Page.PageWrapper = PageWrapper;++export { getServerSideProps } from "@lib/apps/installation/[[...step]]/getServerSideProps";++export default Page;diff --git a/apps/web/pages/apps/installed/[category].tsx b/apps/web/pages/apps/installed/[category].tsxnew file mode 100644index 00000000000..7a8e670ce1e--- /dev/null+++ b/apps/web/pages/apps/installed/[category].tsx@@ -0,0 +1,12 @@+import PageWrapper from "@components/PageWrapper";++import type { PageProps } from "~/apps/installed/[category]/installed-category-view";+import InstalledApps from "~/apps/installed/[category]/installed-category-view";++const Page = (props: PageProps) => <InstalledApps {...props} />;++Page.PageWrapper = PageWrapper;++export { getServerSideProps } from "@lib/apps/installed/[category]/getServerSideProps";++export default Page;diff --git a/apps/web/pages/apps/installed/index.tsx b/apps/web/pages/apps/installed/index.tsxnew file mode 100644index 00000000000..02786d55a89--- /dev/null+++ b/apps/web/pages/apps/installed/index.tsx@@ -0,0 +1,7 @@+export { getServerSideProps } from "@lib/apps/installed/getServerSideProps";++function RedirectPage() {+ return;+}++export default RedirectPage;diff --git a/apps/web/pages/routing-forms/[...pages].tsx b/apps/web/pages/routing-forms/[...pages].tsxnew file mode 100644index 00000000000..13576b185aa--- /dev/null+++ b/apps/web/pages/routing-forms/[...pages].tsx@@ -0,0 +1,25 @@+import type { GetServerSidePropsContext } from "next";+import z from "zod";++const paramsSchema = z+ .object({+ pages: z.array(z.string()),+ })+ .catch({+ pages: [],+ });++export default function RoutingForms() {+ return null;+}++export const getServerSideProps = (context: GetServerSidePropsContext) => {+ const { pages } = paramsSchema.parse(context.params);++ return {+ redirect: {+ destination: `/apps/routing-forms/${pages.length ? pages.join("/") : ""}`,+ permanent: false,+ },+ };+};diff --git a/apps/web/pages/routing-forms/index.tsx b/apps/web/pages/routing-forms/index.tsxnew file mode 100644index 00000000000..c2032de1ddc--- /dev/null+++ b/apps/web/pages/routing-forms/index.tsx@@ -0,0 +1,12 @@+export default function RoutingFormsIndex() {+ return null;+}++export const getServerSideProps = () => {+ return {+ redirect: {+ destination: `/apps/routing-forms/forms`,+ permanent: false,+ },+ };+};diff --git a/apps/web/public/icons/sprite.svg b/apps/web/public/icons/sprite.svgindex 23e31196942..36cf696c717 100644--- a/apps/web/public/icons/sprite.svg+++ b/apps/web/public/icons/sprite.svg@@ -570,12 +570,6 @@<path d="M4 17v2" ></path><path d="M5 18H3" ></path></symbol>-<symbol class="lucide lucide-split" viewBox="0 0 24 24" fill="inherit" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="split">- <path d="M16 3h5v5" ></path>- <path d="M8 3H3v5" ></path>- <path d="M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" ></path>- <path d="m15 9 6-6" ></path>-</symbol><symbol class="lucide lucide-square-check" viewBox="0 0 24 24" fill="inherit" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="square-check"><rect width="18" height="18" x="3" y="3" rx="2" ></rect><path d="m9 12 2 2 4-4" ></path>diff --git a/apps/web/scripts/vercel-app-router-deploy.sh b/apps/web/scripts/vercel-app-router-deploy.shindex 8f1a6ab423e..ec1256da7fa 100755--- a/apps/web/scripts/vercel-app-router-deploy.sh+++ b/apps/web/scripts/vercel-app-router-deploy.sh@@ -6,6 +6,11 @@ checkRoute () {# These conditionals are used to remove directories from the build that are not needed in production# This is to reduce the size of the build and prevent OOM errors+checkRoute "$APP_ROUTER_APPS_INSTALLED_CATEGORY_ENABLED" app/future/apps/installed+checkRoute "$APP_ROUTER_APPS_SLUG_ENABLED" app/future/apps/\[slug\]+checkRoute "$APP_ROUTER_APPS_SLUG_SETUP_ENABLED" app/future/apps/\[slug\]/setup+checkRoute "$APP_ROUTER_APPS_CATEGORIES_ENABLED" app/future/apps/categories+checkRoute "$APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED" app/future/apps/categories/\[category\]checkRoute "$APP_ROUTER_AUTH_FORGOT_PASSWORD_ENABLED" app/future/auth/forgot-passwordcheckRoute "$APP_ROUTER_AUTH_LOGIN_ENABLED" app/future/auth/logincheckRoute "$APP_ROUTER_AUTH_LOGOUT_ENABLED" app/future/auth/logoutdiff --git a/packages/app-store/routing-forms/api/add.ts b/packages/app-store/routing-forms/api/add.tsindex 2b9eac638f0..5037d705716 100644--- a/packages/app-store/routing-forms/api/add.ts+++ b/packages/app-store/routing-forms/api/add.ts@@ -20,7 +20,7 @@ const handler: AppDeclarativeHandler = {});},redirect: {- url: "/routing/forms",+ url: "/apps/routing-forms/forms",},};diff --git a/packages/app-store/routing-forms/config.json b/packages/app-store/routing-forms/config.jsonindex 60e420affe1..22eacf80976 100644--- a/packages/app-store/routing-forms/config.json+++ b/packages/app-store/routing-forms/config.json@@ -10,7 +10,7 @@"variant": "other","categories": ["automation"],"publisher": "Cal.com, Inc.",- "simplePath": "/routing",+ "simplePath": "/apps/routing-forms","email": "[email protected]","licenseRequired": true,"teamsPlanRequired": {diff --git a/packages/app-store/routing-forms/pages/app-routing-server.config.ts b/packages/app-store/routing-forms/pages/app-routing-server.config.tsdeleted file mode 100644index a80ce55813d..00000000000--- a/packages/app-store/routing-forms/pages/app-routing-server.config.ts+++ /dev/null@@ -1,14 +0,0 @@-import type { AppGetServerSideProps } from "@calcom/types/AppGetServerSideProps";--import { getServerSidePropsForSingleFormView as getServerSidePropsSingleForm } from "../components/getServerSidePropsSingleForm";-import { getServerSideProps as getServerSidePropsForms } from "./forms/getServerSideProps";-import { getServerSideProps as getServerSidePropsRoutingLink } from "./routing-link/getServerSideProps";--export const routingServerSidePropsConfig: Record<string, AppGetServerSideProps> = {- forms: getServerSidePropsForms,- "form-edit": getServerSidePropsSingleForm,- "route-builder": getServerSidePropsSingleForm,- "routing-link": getServerSidePropsRoutingLink,- reporting: getServerSidePropsSingleForm,- "incomplete-booking": getServerSidePropsSingleForm,-};diff --git a/packages/app-store/routing-forms/pages/app-routing.config.tsx b/packages/app-store/routing-forms/pages/app-routing.config.tsxindex f54eb9d1bef..4c322f1c21c 100644--- a/packages/app-store/routing-forms/pages/app-routing.config.tsx+++ b/packages/app-store/routing-forms/pages/app-routing.config.tsx@@ -1,11 +1,17 @@//TODO: Generate this file automatically so that like in Next.js file based routing can work automatically+import type { AppGetServerSideProps } from "@calcom/types/AppGetServerSideProps";++import { getServerSidePropsForSingleFormView as getServerSidePropsSingleForm } from "../components/getServerSidePropsSingleForm";import * as formEdit from "./form-edit/[...appPages]";import * as forms from "./forms/[...appPages]";+// extracts getServerSideProps function from the client component+import { getServerSideProps as getServerSidePropsForms } from "./forms/getServerSideProps";import * as IncompleteBooking from "./incomplete-booking/[...appPages]";import * as LayoutHandler from "./layout-handler/[...appPages]";import * as Reporting from "./reporting/[...appPages]";import * as RouteBuilder from "./route-builder/[...appPages]";import * as RoutingLink from "./routing-link/[...appPages]";+import { getServerSideProps as getServerSidePropsRoutingLink } from "./routing-link/getServerSideProps";const routingConfig = {"form-edit": formEdit,@@ -17,4 +23,13 @@ const routingConfig = {"incomplete-booking": IncompleteBooking,};+export const serverSidePropsConfig: Record<string, AppGetServerSideProps> = {+ forms: getServerSidePropsForms,+ "form-edit": getServerSidePropsSingleForm,+ "route-builder": getServerSidePropsSingleForm,+ "routing-link": getServerSidePropsRoutingLink,+ reporting: getServerSidePropsSingleForm,+ "incomplete-booking": getServerSidePropsSingleForm,+};+export default routingConfig;diff --git a/packages/app-store/routing-forms/pages/form-edit/[...appPages].tsx b/packages/app-store/routing-forms/pages/form-edit/[...appPages].tsxindex b164fcd0710..2aa2e63f431 100644--- a/packages/app-store/routing-forms/pages/form-edit/[...appPages].tsx+++ b/packages/app-store/routing-forms/pages/form-edit/[...appPages].tsx@@ -481,5 +481,9 @@ export default function FormEditPage({}FormEditPage.getLayout = (page: React.ReactElement) => {- return <Shell withoutMain={true}>{page}</Shell>;+ return (+ <Shell backPath="/apps/routing-forms/forms" withoutMain={true}>+ {page}+ </Shell>+ );};diff --git a/packages/app-store/routing-forms/pages/incomplete-booking/[...appPages].tsx b/packages/app-store/routing-forms/pages/incomplete-booking/[...appPages].tsxindex cda51e3a984..0bad763f40d 100644--- a/packages/app-store/routing-forms/pages/incomplete-booking/[...appPages].tsx+++ b/packages/app-store/routing-forms/pages/incomplete-booking/[...appPages].tsx@@ -1,3 +1,5 @@+"use client";+import { useState, useEffect } from "react";import type z from "zod";diff --git a/packages/app-store/routing-forms/pages/reporting/[...appPages].tsx b/packages/app-store/routing-forms/pages/reporting/[...appPages].tsxindex 4838b4a1674..855cdeef798 100644--- a/packages/app-store/routing-forms/pages/reporting/[...appPages].tsx+++ b/packages/app-store/routing-forms/pages/reporting/[...appPages].tsx@@ -293,5 +293,9 @@ export default function ReporterWrapper({}ReporterWrapper.getLayout = (page: React.ReactElement) => {- return <Shell withoutMain={true}>{page}</Shell>;+ return (+ <Shell backPath="/apps/routing-forms/forms" withoutMain={true}>+ {page}+ </Shell>+ );};diff --git a/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx b/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsxindex 068fb20522e..d3f6935295d 100644--- a/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx+++ b/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx@@ -1092,7 +1092,11 @@ export default function RouteBuilder({}RouteBuilder.getLayout = (page: React.ReactElement) => {- return <Shell withoutMain={true}>{page}</Shell>;+ return (+ <Shell backPath="/apps/routing-forms/forms" withoutMain={true}>+ {page}+ </Shell>+ );};export { getServerSideProps };diff --git a/packages/app-store/routing-forms/pages/routing-link/[...appPages].tsx b/packages/app-store/routing-forms/pages/routing-link/[...appPages].tsxindex 2a6661a77e5..17b5a572dd2 100644--- a/packages/app-store/routing-forms/pages/routing-link/[...appPages].tsx+++ b/packages/app-store/routing-forms/pages/routing-link/[...appPages].tsx@@ -1,5 +1,6 @@"use client";+import Head from "next/head";import { useRouter } from "next/navigation";import type { FormEvent } from "react";import { useEffect, useRef, useState } from "react";@@ -159,6 +160,9 @@ function RoutingForm({ form, profile, ...restProps }: Props) {<div>{!customPageMessage ? (<>+ <Head>+ <title>{`${form.name} | Cal.com Forms`}</title>+ </Head><div className={classNames("mx-auto my-0 max-w-3xl", isEmbed ? "" : "md:my-24")}><div className="w-full max-w-4xl ltr:mr-2 rtl:ml-2"><div className="main border-booker md:border-booker-width dark:bg-muted bg-default mx-0 rounded-md p-4 py-6 sm:-mx-4 sm:px-8 ">diff --git a/packages/app-store/routing-forms/pages/routing-link/getServerSideProps.ts b/packages/app-store/routing-forms/pages/routing-link/getServerSideProps.tsindex f17ef544de1..a0671d861e1 100644--- a/packages/app-store/routing-forms/pages/routing-link/getServerSideProps.ts+++ b/packages/app-store/routing-forms/pages/routing-link/getServerSideProps.ts@@ -24,6 +24,9 @@ export const getServerSideProps = async function getServerSideProps(const { currentOrgDomain } = orgDomainConfig(context.req);const isEmbed = params.appPages[1] === "embed";+ if (context.query["flag.coep"] === "true") {+ context.res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");+ }const form = await prisma.app_RoutingForms_Form.findFirst({where: {diff --git a/packages/app-store/routing-forms/playwright/tests/basic.e2e.ts b/packages/app-store/routing-forms/playwright/tests/basic.e2e.tsindex 0599c12bb4f..ce421eee545 100644--- a/packages/app-store/routing-forms/playwright/tests/basic.e2e.ts+++ b/packages/app-store/routing-forms/playwright/tests/basic.e2e.ts@@ -93,7 +93,7 @@ test.describe("Routing Forms", () => {await gotoRoutingLink({ page, formId });await expect(page.locator("text=Test Form Name")).toBeVisible();- await page.goto(`routing/route-builder/${formId}`);+ await page.goto(`apps/routing-forms/route-builder/${formId}`);await disableForm(page);await gotoRoutingLink({ page, formId });await expect(page.getByTestId(`404-page`)).toBeVisible();@@ -101,12 +101,12 @@ test.describe("Routing Forms", () => {test("recently added form appears first in the list", async ({ page }) => {await addForm(page, { name: "Test Form 1" });- await page.goto(`routing/forms`);+ await page.goto(`apps/routing-forms/forms`);await page.waitForSelector('[data-testid="routing-forms-list"]');await expect(page.locator('[data-testid="routing-forms-list"] > div h1')).toHaveCount(1);await addForm(page, { name: "Test Form 2" });- await page.goto(`routing/forms`);+ await page.goto(`apps/routing-forms/forms`);await page.waitForSelector('[data-testid="routing-forms-list"]');await expect(page.locator('[data-testid="routing-forms-list"] > div h1')).toHaveCount(2);@@ -351,7 +351,7 @@ test.describe("Routing Forms", () => {["event-routing", "Option-2", "Option-2", "Option-2", "Option-2", "", "", "", expect.any(String)],]);- await page.goto(`routing/route-builder/${routingForm.id}`);+ await page.goto(`apps/routing-forms/route-builder/${routingForm.id}`);const [download] = await Promise.all([// Start waiting for the downloadpage.waitForEvent("download"),@@ -446,7 +446,7 @@ test.describe("Routing Forms", () => {test("Test preview should return correct route", async ({ page, users }) => {const user = await createUserAndLogin({ users, page });const routingForm = user.routingForms[0];- await page.goto(`routing/form-edit/${routingForm.id}`);+ await page.goto(`apps/routing-forms/form-edit/${routingForm.id}`);await page.click('[data-testid="test-preview"]');//event redirect@@ -696,7 +696,7 @@ async function addAllTypesOfFieldsAndSaveForm(page: Page,form: { description: string; label: string }) {- await page.goto(`routing/form-edit/${formId}`);+ await page.goto(`apps/routing-forms/form-edit/${formId}`);await page.click('[data-testid="add-field"]');await page.fill('[data-testid="description"]', form.description);@@ -752,7 +752,7 @@ async function addAllTypesOfFieldsAndSaveForm(}async function addShortTextFieldAndSaveForm({ page, formId }: { page: Page; formId: string }) {- await page.goto(`routing/form-edit/${formId}`);+ await page.goto(`apps/routing-forms/form-edit/${formId}`);await page.click('[data-testid="add-field"]');await page.locator(".data-testid-field-type").nth(0).click();await page.fill(`[name="fields.0.label"]`, "Short Text");diff --git a/packages/app-store/routing-forms/playwright/tests/testUtils.ts b/packages/app-store/routing-forms/playwright/tests/testUtils.tsindex 1c576978d46..7f86e19721c 100644--- a/packages/app-store/routing-forms/playwright/tests/testUtils.ts+++ b/packages/app-store/routing-forms/playwright/tests/testUtils.ts@@ -36,7 +36,7 @@ export async function addOneFieldAndDescriptionAndSaveForm(page: Page,form: { description?: string; field?: { typeIndex: number; label: string } }) {- await page.goto(`routing/form-edit/${formId}`);+ await page.goto(`apps/routing-forms/form-edit/${formId}`);await page.click('[data-testid="add-field"]');if (form.description) {await page.fill('[data-testid="description"]', form.description);diff --git a/packages/app-store/typeform/pages/how-to-use/[...appPages].tsx b/packages/app-store/typeform/pages/how-to-use/[...appPages].tsxindex ac486b340fc..c4fd176dc38 100644--- a/packages/app-store/typeform/pages/how-to-use/[...appPages].tsx+++ b/packages/app-store/typeform/pages/how-to-use/[...appPages].tsx@@ -17,7 +17,7 @@ export default function HowToUse() {<ol className="mb-5 ml-5 mt-5 list-decimal ltr:mr-5 rtl:ml-5"><li>Make sure that you have{" "}- <Link href="/routing" className="text-subtle text-base">+ <Link href="/apps/routing-forms" className="text-subtle text-base">Routing Forms</Link>{" "}app installeddiff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsxindex 2dc91844821..4094e515e30 100644--- a/packages/features/shell/Shell.tsx+++ b/packages/features/shell/Shell.tsx@@ -25,7 +25,7 @@ import { useAppTheme } from "./useAppTheme";const Layout = (props: LayoutProps) => {const { banners, bannersHeight } = useBanners();const pathname = usePathname();- const isFullPageWithoutSidebar = pathname?.startsWith("/routing/reporting/");+ const isFullPageWithoutSidebar = pathname?.startsWith("/apps/routing-forms/reporting/");const pageTitle = typeof props.heading === "string" && !props.title ? props.heading : props.title;const withoutSeo = props.withoutSeo ?? props.withoutMain ?? false;@@ -138,26 +138,23 @@ export function ShellMain(props: LayoutProps) {const { buttonToShow, isLoading, enableNotifications, disableNotifications } = useNotifications();- const backPath = props.backPath;- // Replace multiple leading slashes with a single slash- // e.g., `//routing/forms` -> `/routing/forms`- const validBackPath = typeof backPath === "string" ? backPath.replace(/^\/+/, "/") : null;-return (<>- {(props.heading || !!backPath) && (+ {(props.heading || !!props.backPath) && (<divclassName={classNames("flex items-center md:mb-6 md:mt-0",props.smallHeading ? "lg:mb-7" : "lg:mb-8",props.hideHeadingOnMobile ? "mb-0" : "mb-6")}>- {!!backPath && (+ {!!props.backPath && (<Buttonvariant="icon"size="sm"color="minimal"- onClick={() => (validBackPath ? router.push(validBackPath) : router.back())}+ onClick={() =>+ typeof props.backPath === "string" ? router.push(props.backPath as string) : router.back()+ }StartIcon="arrow-left"aria-label="Go Back"className="rounded-md ltr:mr-2 rtl:ml-2"diff --git a/packages/features/shell/navigation/Navigation.tsx b/packages/features/shell/navigation/Navigation.tsxindex cebf81f6b19..385cc0f0912 100644--- a/packages/features/shell/navigation/Navigation.tsx+++ b/packages/features/shell/navigation/Navigation.tsx@@ -87,10 +87,10 @@ const getNavigationItems = (orgBranding: OrganizationBranding): NavigationItemTyicon: "ellipsis",},{- name: "routing",- href: "/routing/forms",- icon: "split",- isCurrent: ({ pathname }) => pathname?.startsWith("/routing/forms") ?? false,+ name: "routing_forms",+ href: "/apps/routing-forms/forms",+ icon: "file-text",+ isCurrent: ({ pathname }) => pathname?.startsWith("/apps/routing-forms/") ?? false,moreOnMobile: true,},{diff --git a/packages/types/App.d.ts b/packages/types/App.d.tsindex 9e315fe48a0..62b14dcc890 100644--- a/packages/types/App.d.ts+++ b/packages/types/App.d.ts@@ -131,7 +131,7 @@ export interface App {isGlobal?: boolean;/*** For apps that are accessible on an alternate URL(which is simpler and shorter), this can be set.- * e.g. Routing Forms App is available as /routing-forms in addition to regular /routing.+ * e.g. Routing Forms App is available as /routing-forms in addition to regular /apps/routing-forms.*/simplePath?: string;/** A contact email, mainly to ask for support */diff --git a/packages/ui/components/head-seo/head-seo.test.tsx b/packages/ui/components/head-seo/head-seo.test.tsxindex 7d163fda487..54f283729b6 100644--- a/packages/ui/components/head-seo/head-seo.test.tsx+++ b/packages/ui/components/head-seo/head-seo.test.tsx@@ -39,6 +39,9 @@ vi.mock("next-seo", () => {vi.mock("@calcom/lib/OgImages", async () => {return {+ constructAppImage() {+ return "constructAppImage";+ },constructGenericImage() {return "constructGenericImage";},@@ -139,6 +142,14 @@ describe("Tests for HeadSeo component", () => {});});+ test("Should render with app props", async () => {+ const { container } = render(<HeadSeo {...basicProps} app={{} as HeadSeoProps["app"]} />);+ await waitFor(async () => {+ const mockedNextSeoEl = container.querySelector("#mocked-next-seo");+ expect(mockedNextSeoEl?.getAttribute("image")).toContain("constructAppImage");+ });+ });+test("Should render with meeting props", async () => {const { container } = render(<HeadSeo {...basicProps} meeting={{} as HeadSeoProps["meeting"]} />);await waitFor(async () => {diff --git a/packages/ui/components/icon/icon-list.mjs b/packages/ui/components/icon/icon-list.mjsindex 340bce40f33..55cbdfa5ed0 100644--- a/packages/ui/components/icon/icon-list.mjs+++ b/packages/ui/components/icon/icon-list.mjs@@ -117,7 +117,6 @@ export const lucideIconList = new Set(["sliders-vertical","smartphone","sparkles",- "split","square-check","star","sun",diff --git a/packages/ui/components/icon/icon-names.ts b/packages/ui/components/icon/icon-names.tsindex 993400acb6a..9ffbbd5bcb0 100644--- a/packages/ui/components/icon/icon-names.ts+++ b/packages/ui/components/icon/icon-names.ts@@ -117,7 +117,6 @@ export type IconName =| "sliders-vertical"| "smartphone"| "sparkles"- | "split"| "square-check"| "star"| "sun"diff --git a/turbo.json b/turbo.jsonindex a53184b89c2..9799e734a74 100644--- a/turbo.json+++ b/turbo.json@@ -238,6 +238,11 @@"ALLOWED_HOSTNAMES","ANALYZE","API_KEY_PREFIX",+ "APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED",+ "APP_ROUTER_APPS_CATEGORIES_ENABLED",+ "APP_ROUTER_APPS_INSTALLED_CATEGORY_ENABLED",+ "APP_ROUTER_APPS_SLUG_ENABLED",+ "APP_ROUTER_APPS_SLUG_SETUP_ENABLED","APP_ROUTER_AUTH_FORGOT_PASSWORD_ENABLED","APP_ROUTER_AUTH_LOGIN_ENABLED","APP_ROUTER_AUTH_LOGOUT_ENABLED",