Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
chore: remove next config flag (#836)
Maximilian Kaske3aedd36a9a4a
diff --git a/apps/web/next.config.js b/apps/web/next.config.jsindex 71259378c..c02db0b34 100644--- a/apps/web/next.config.js+++ b/apps/web/next.config.js@@ -15,10 +15,6 @@ const nextConfig = {// "better-sqlite3"],optimizePackageImports: ["@tremor/react"],- // FIXME: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout- // TODO: https://nextjs.org/docs/app/api-reference/functions/use-search-params#static-rendering- // TODO: https://nextjs.org/docs/messages/deopted-into-client-rendering- missingSuspenseWithCSRBailout: false,},logging: {fetches: {diff --git a/apps/web/src/app/pricing/page.tsx b/apps/web/src/app/pricing/page.tsxindex 675766f96..a29049a62 100644--- a/apps/web/src/app/pricing/page.tsx+++ b/apps/web/src/app/pricing/page.tsx@@ -5,7 +5,7 @@ import { Shell } from "@/components/dashboard/shell";import { MarketingLayout } from "@/components/layout/marketing-layout";import { FAQs } from "@/components/marketing/faqs";import { EnterpricePlan } from "@/components/marketing/pricing/enterprice-plan";-import { PricingWrapper } from "@/components/marketing/pricing/pricing-wrapper";+import { PricingWrapperSuspense } from "@/components/marketing/pricing/pricing-wrapper";import {defaultMetadata,ogMetadata,@@ -37,7 +37,7 @@ export default function PricingPage() {All plans. Start free today, upgrade later.</p></div>- <PricingWrapper />+ <PricingWrapperSuspense /><p className="text-muted-foreground text-sm">Learn more about the{" "}<Linkdiff --git a/apps/web/src/app/status-page/[domain]/_components/password-form.tsx b/apps/web/src/app/status-page/[domain]/_components/password-form.tsxindex b70cc755d..1698b367b 100644--- a/apps/web/src/app/status-page/[domain]/_components/password-form.tsx+++ b/apps/web/src/app/status-page/[domain]/_components/password-form.tsx@@ -3,7 +3,7 @@import { zodResolver } from "@hookform/resolvers/zod";import { Eye, EyeOff } from "lucide-react";import { usePathname, useRouter, useSearchParams } from "next/navigation";-import { useEffect, useState, useTransition } from "react";+import { Suspense, useEffect, useState, useTransition } from "react";import { useForm } from "react-hook-form";import { z } from "zod";@@ -16,6 +16,7 @@ import {FormLabel,FormMessage,InputWithAddons,+ Skeleton,} from "@openstatus/ui";import { LoadingAnimation } from "@/components/loading-animation";@@ -34,7 +35,11 @@ const schema = z.object({type Schema = z.infer<typeof schema>;-export function PasswordForm({ slug }: { slug: string }) {+interface PasswordFormProps {+ slug: string;+}++export function PasswordForm({ slug }: PasswordFormProps) {const form = useForm<Schema>({resolver: zodResolver(schema),defaultValues: { password: "" },@@ -129,3 +134,19 @@ export function PasswordForm({ slug }: { slug: string }) {</Form>);}++export function PasswordFormSuspense(props: PasswordFormProps) {+ return (+ <Suspense+ fallback={+ <div className="grid w-full gap-4">+ <Skeleton className="h-4 w-8" />+ <Skeleton className="h-10 w-full" />+ <Skeleton className="h-8 w-full" />+ </div>+ }+ >+ <PasswordForm {...props} />+ </Suspense>+ );+}diff --git a/apps/web/src/app/status-page/[domain]/_components/password-protected.tsx b/apps/web/src/app/status-page/[domain]/_components/password-protected.tsxindex 1dff583ca..425a89f55 100644--- a/apps/web/src/app/status-page/[domain]/_components/password-protected.tsx+++ b/apps/web/src/app/status-page/[domain]/_components/password-protected.tsx@@ -2,7 +2,7 @@ import type { WorkspacePlan } from "@openstatus/plans";import { Shell } from "@/components/dashboard/shell";import { Footer } from "../_components/footer";-import { PasswordForm } from "../_components/password-form";+import { PasswordFormSuspense } from "../_components/password-form";export default function PasswordProtected({slug,@@ -22,7 +22,7 @@ export default function PasswordProtected({<p className="text-center text-muted-foreground text-sm">Enter the password to access the status page.</p>- <PasswordForm slug={slug} />+ <PasswordFormSuspense slug={slug} /></div></Shell></main>diff --git a/apps/web/src/components/data-table/status-page/columns.tsx b/apps/web/src/components/data-table/status-page/columns.tsxindex 98ad71acb..7254b4485 100644--- a/apps/web/src/components/data-table/status-page/columns.tsx+++ b/apps/web/src/components/data-table/status-page/columns.tsx@@ -15,6 +15,7 @@ import {} from "@openstatus/ui";import { DataTableRowActions } from "./data-table-row-actions";+import { Check } from "lucide-react";export const columns: ColumnDef<Page & { monitorsToPages: { monitor: { name: string } }[] }@@ -66,7 +67,7 @@ export const columns: ColumnDef<{lastMonitors.length > 0 ? (<TooltipProvider><Tooltip delayDuration={200}>- <TooltipTrigger asChild>+ <TooltipTrigger><Badge variant="secondary" className="border">+{lastMonitors.length}</Badge>@@ -91,7 +92,7 @@ export const columns: ColumnDef<header: "Favicon",cell: ({ row }) => {if (!row.getValue("icon")) {- return <span className="text-muted-foreground">-</span>;+ return <span className="text-muted-foreground/50">-</span>;}return (<Image@@ -104,6 +105,17 @@ export const columns: ColumnDef<);},},+ {+ accessorKey: "passwordProtected",+ header: "Protected",+ cell: ({ row }) => {+ const passwordProtected = Boolean(row.getValue("passwordProtected"));+ if (passwordProtected) {+ return <Check className="h-4 w-4 text-foreground" />;+ }+ return <span className="text-muted-foreground/50">-</span>;+ },+ },// {// accessorKey: "createdAt",// header: "Created",diff --git a/apps/web/src/components/forms/status-page/section-monitor.tsx b/apps/web/src/components/forms/status-page/section-monitor.tsxindex 394eec02e..e08f75373 100644--- a/apps/web/src/components/forms/status-page/section-monitor.tsx+++ b/apps/web/src/components/forms/status-page/section-monitor.tsx@@ -39,9 +39,6 @@ export function SectionMonitor({ form, monitors }: Props) {});const watchMonitors = form.watch("monitors");- console.log("fields", fields.length);- console.log("monitors", monitors);-return (<div className="grid w-full gap-4"><SectionHeaderdiff --git a/apps/web/src/components/forms/status-report/section-connect.tsx b/apps/web/src/components/forms/status-report/section-connect.tsxindex 7a747ae8e..47bfeded5 100644--- a/apps/web/src/components/forms/status-report/section-connect.tsx+++ b/apps/web/src/components/forms/status-report/section-connect.tsx@@ -55,7 +55,6 @@ export function SectionConnect({ form, pages, monitors }: Props) {name="page"checked={field.value?.includes(item.id)}onCheckedChange={(checked) => {- console.log(field, item.id, checked);return checked? field.onChange([...(field.value || []),@@ -63,8 +62,8 @@ export function SectionConnect({ form, pages, monitors }: Props) {]): field.onChange(field.value?.filter(- (value) => value !== item.id- )+ (value) => value !== item.id,+ ),);}}>@@ -112,7 +111,6 @@ export function SectionConnect({ form, pages, monitors }: Props) {name="monitor"checked={field.value?.includes(item.id)}onCheckedChange={(checked) => {- console.log(field, item.id, checked);return checked? field.onChange([...(field.value || []),@@ -120,8 +118,8 @@ export function SectionConnect({ form, pages, monitors }: Props) {]): field.onChange(field.value?.filter(- (value) => value !== item.id- )+ (value) => value !== item.id,+ ),);}}>diff --git a/apps/web/src/components/layout/app-menu.tsx b/apps/web/src/components/layout/app-menu.tsxindex 786c4d107..f7078cc88 100644--- a/apps/web/src/components/layout/app-menu.tsx+++ b/apps/web/src/components/layout/app-menu.tsx@@ -1,11 +1,7 @@"use client";import { ChevronsUpDown } from "lucide-react";-import {- usePathname,- useSearchParams,- useSelectedLayoutSegment,-} from "next/navigation";+import { useSelectedLayoutSegment } from "next/navigation";import * as React from "react";import {diff --git a/apps/web/src/components/marketing/pricing/pricing-wrapper.tsx b/apps/web/src/components/marketing/pricing/pricing-wrapper.tsxindex c6de2d29a..5c7b053a7 100644--- a/apps/web/src/components/marketing/pricing/pricing-wrapper.tsx+++ b/apps/web/src/components/marketing/pricing/pricing-wrapper.tsx@@ -6,6 +6,7 @@ import type { WorkspacePlan } from "@openstatus/plans";import { PricingPlanRadio } from "./pricing-plan-radio";import { PricingTable } from "./pricing-table";+import { Suspense } from "react";export function PricingWrapper() {const searchParams = useSearchParams();@@ -23,3 +24,15 @@ export function PricingWrapper() {</div>);}++// REMINDER: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout+// REMINDER: https://nextjs.org/docs/app/api-reference/functions/use-search-params#static-rendering+// REMINDER: https://nextjs.org/docs/messages/deopted-into-client-rendering+// experiments.missingSuspenseWithCSRBailout: false, within next.config.js+export function PricingWrapperSuspense() {+ return (+ <Suspense>+ <PricingWrapper />+ </Suspense>+ );+}diff --git a/apps/web/src/components/modals/failed-ping-alert-confirmation.tsx b/apps/web/src/components/modals/failed-ping-alert-confirmation.tsxindex 3ed7b092d..2922ddce6 100644--- a/apps/web/src/components/modals/failed-ping-alert-confirmation.tsx+++ b/apps/web/src/components/modals/failed-ping-alert-confirmation.tsx@@ -1,3 +1,5 @@+"use client";+import React from "react";import type { InsertMonitor } from "@openstatus/db/src/schema";diff --git a/packages/header-analysis/src/parser/cache-control.ts b/packages/header-analysis/src/parser/cache-control.tsindex fc6a3f398..14d085fb2 100644--- a/packages/header-analysis/src/parser/cache-control.ts+++ b/packages/header-analysis/src/parser/cache-control.ts@@ -61,6 +61,6 @@ function getDirectiveDescription(key: string): string {case "stale-if-error":return "Allows a cache to serve stale responses if the origin server is unavailable or returns an error.";default:- return "";+ return "-";}}diff --git a/packages/header-analysis/src/parser/cf-cache-status.ts b/packages/header-analysis/src/parser/cf-cache-status.tsindex 08bfa5e54..9ded6ecec 100644--- a/packages/header-analysis/src/parser/cf-cache-status.ts+++ b/packages/header-analysis/src/parser/cf-cache-status.ts@@ -21,6 +21,6 @@ function getCacheDescription(key: string): string {case "DYNAMIC":return "This resource is not cached by default and there are no explicit settings configured to cache it. You will see this frequently when Cloudflare is handling a POST request. This request will always go to the origin.";default:- return "";+ return "-";}}diff --git a/packages/header-analysis/src/parser/x-vercel-cache.ts b/packages/header-analysis/src/parser/x-vercel-cache.tsindex 70e3ee6b8..964f6de7a 100644--- a/packages/header-analysis/src/parser/x-vercel-cache.ts+++ b/packages/header-analysis/src/parser/x-vercel-cache.ts@@ -21,6 +21,6 @@ function getCacheDescription(key: string): string {case "REVLIDATED":return "The response was served from the origin server and the cache was refreshed due to an authorization from the user in the incoming request.";default:- return "";+ return "-";}}diff --git a/packages/notifications/twillio-sms/src/index.ts b/packages/notifications/twillio-sms/src/index.tsindex 97f26bc06..a6cfc5360 100644--- a/packages/notifications/twillio-sms/src/index.ts+++ b/packages/notifications/twillio-sms/src/index.ts@@ -20,7 +20,7 @@ export const sendAlert = async ({const { name } = monitor;const body = new FormData();- body.set("To", notificationData.phoneNumber);+ body.set("To", notificationData.sms);body.set("From", "+14807252613");body.set("Body",@@ -67,7 +67,7 @@ export const sendRecovery = async ({const { name } = monitor;const body = new FormData();- body.set("To", notificationData.phoneNumber);+ body.set("To", notificationData.sms);body.set("From", "+14807252613");body.set("Body", `Your monitor ${name} / ${monitor.url} is up again`);diff --git a/packages/notifications/twillio-sms/src/schema/config.ts b/packages/notifications/twillio-sms/src/schema/config.tsindex 92e165ec3..30bd1745c 100644--- a/packages/notifications/twillio-sms/src/schema/config.ts+++ b/packages/notifications/twillio-sms/src/schema/config.ts@@ -2,5 +2,5 @@ import isMobilephone from "validator/lib/isMobilePhone";import { z } from "zod";export const SmsConfigurationSchema = z.object({- phoneNumber: z.string().refine(isMobilephone),+ sms: z.string().refine(isMobilephone),});