Skip to content

Open-source status page, incident response and uptime monitoring

chore: minor changes page component subscription (#1903)

Maximilian Kaske1e3a53818702
diff --git a/apps/status-page/src/app/(status-page)/[domain]/(public)/manage/[token]/page.tsx b/apps/status-page/src/app/(status-page)/[domain]/(public)/manage/[token]/page.tsx
index f9a3655fd..ba5cb1c3a 100644
--- a/apps/status-page/src/app/(status-page)/[domain]/(public)/manage/[token]/page.tsx
+++ b/apps/status-page/src/app/(status-page)/[domain]/(public)/manage/[token]/page.tsx
@@ -93,7 +93,7 @@ export default function VerifyPage() {
Manage your subscription to receive updates on the status page.
</FormCardDescription>
</FormCardHeader>
- <FormCardContent>
+ <FormCardContent className="px-0">
<FormManageSubscription
id="manage-subscription-form"
defaultValues={{
diff --git a/apps/status-page/src/app/(status-page)/[domain]/(public)/verify/[token]/page.tsx b/apps/status-page/src/app/(status-page)/[domain]/(public)/verify/[token]/page.tsx
index dd4f522f0..aa5515d96 100644
--- a/apps/status-page/src/app/(status-page)/[domain]/(public)/verify/[token]/page.tsx
+++ b/apps/status-page/src/app/(status-page)/[domain]/(public)/verify/[token]/page.tsx
@@ -41,12 +41,26 @@ export default function VerifyPage() {
>
{title}
</StatusBlankTitle>
- <StatusBlankLink
- href="../"
- disabled={verifyEmailMutation.isPending || !verifyEmailMutation.data}
- >
- Go back
- </StatusBlankLink>
+ <div className="flex justify-center gap-2">
+ <StatusBlankLink
+ href="/"
+ disabled={
+ verifyEmailMutation.isPending || !verifyEmailMutation.data
+ }
+ >
+ Go back
+ </StatusBlankLink>
+ {verifyEmailMutation.isSuccess && (
+ <StatusBlankLink
+ href={`/manage/${token}`}
+ disabled={
+ verifyEmailMutation.isPending || !verifyEmailMutation.data
+ }
+ >
+ Manage
+ </StatusBlankLink>
+ )}
+ </div>
</StatusBlankContent>
</StatusBlankContainer>
);
diff --git a/apps/status-page/src/components/forms/form-card.tsx b/apps/status-page/src/components/forms/form-card.tsx
index 05f0508bb..65ed888ca 100644
--- a/apps/status-page/src/components/forms/form-card.tsx
+++ b/apps/status-page/src/components/forms/form-card.tsx
@@ -11,9 +11,8 @@ import { cn } from "@openstatus/ui/lib/utils";
import { type VariantProps, cva } from "class-variance-authority";
-// py-0
const formCardVariants = cva(
- "group relative w-full overflow-hidden py-0 shadow-none gap-4",
+ "group relative w-full overflow-hidden py-0 shadow-none gap-4 rounded-lg",
{
variants: {
variant: {
diff --git a/apps/status-page/src/components/forms/form-manage-subscription.tsx b/apps/status-page/src/components/forms/form-manage-subscription.tsx
index 396889326..fc2e41b6c 100644
--- a/apps/status-page/src/components/forms/form-manage-subscription.tsx
+++ b/apps/status-page/src/components/forms/form-manage-subscription.tsx
@@ -87,7 +87,7 @@ export function FormManageSubscription({
control={form.control}
name="subscribeComponents"
render={({ field }) => (
- <FormItem className="flex items-center gap-2">
+ <FormItem className="flex items-center gap-2 px-4">
<FormControl>
<Checkbox
checked={field.value}
@@ -108,7 +108,10 @@ export function FormManageSubscription({
if (tracker.type === "group") {
const groupIds = tracker.components.map((c) => c.id);
return (
- <div key={tracker.groupId} className="flex flex-col gap-2">
+ <div
+ key={tracker.groupId}
+ className="flex flex-col gap-2 px-4"
+ >
<FormField
control={form.control}
name="pageComponents"
@@ -189,7 +192,7 @@ export function FormManageSubscription({
control={form.control}
name="pageComponents"
render={({ field }) => (
- <FormItem className="flex items-center gap-2">
+ <FormItem className="flex items-center gap-2 px-4">
<FormControl>
<Checkbox
checked={field.value?.includes(
@@ -219,7 +222,7 @@ export function FormManageSubscription({
);
})
) : (
- <StatusBlankContainer>
+ <StatusBlankContainer className="px-4">
<StatusBlankTitle>
No components to subscribe to
</StatusBlankTitle>
diff --git a/apps/status-page/src/components/forms/form-subscribe-email.tsx b/apps/status-page/src/components/forms/form-subscribe-email.tsx
index 4cadc6994..0c78669d9 100644
--- a/apps/status-page/src/components/forms/form-subscribe-email.tsx
+++ b/apps/status-page/src/components/forms/form-subscribe-email.tsx
@@ -24,9 +24,6 @@ import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
-// TODO: remove after implementing the feature
-const HIDE_SUBSCRIBE_COMPONENTS = true;
-
type Page = NonNullable<RouterOutputs["statusPage"]["get"]>;
const schema = z.object({
@@ -99,166 +96,160 @@ export function FormSubscribeEmail({
</FormItem>
)}
/>
- {HIDE_SUBSCRIBE_COMPONENTS ? null : (
+
+ <FormField
+ control={form.control}
+ name="subscribeComponents"
+ render={({ field }) => (
+ <FormItem className="flex items-center gap-2 px-2">
+ <FormControl>
+ <Checkbox
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ />
+ </FormControl>
+ <FormLabel>Subscribe to specific components</FormLabel>
+ </FormItem>
+ )}
+ />
+ {form.watch("subscribeComponents") && (
<>
- <FormField
- control={form.control}
- name="subscribeComponents"
- render={({ field }) => (
- <FormItem className="flex items-center gap-2 px-2">
- <FormControl>
- <Checkbox
- checked={field.value}
- onCheckedChange={field.onChange}
- />
- </FormControl>
- <FormLabel>Subscribe to specific components</FormLabel>
- </FormItem>
- )}
- />
- {form.watch("subscribeComponents") && (
- <>
- <Separator />
- <div className="-my-2 flex max-h-56 flex-col gap-2 overflow-y-auto bg-muted p-2 px-2">
- {page?.trackers && page.trackers.length > 0 ? (
- page.trackers.map((tracker) => {
- if (tracker.type === "group") {
- const groupIds = tracker.components.map((c) => c.id);
- return (
- <div
- key={tracker.groupId}
- className="flex flex-col gap-2"
- >
- <FormField
- control={form.control}
- name="pageComponents"
- render={({ field }) => {
- const allChecked = groupIds.every((id) =>
- field.value?.includes(id),
- );
- const someChecked = groupIds.some((id) =>
- field.value?.includes(id),
- );
- return (
- <FormItem className="flex items-center gap-2">
- <FormControl>
- <Checkbox
- checked={
- allChecked
- ? true
- : someChecked
- ? "indeterminate"
- : false
- }
- onCheckedChange={(checked) => {
- const value = field.value ?? [];
- if (checked) {
- field.onChange([
- ...new Set([
- ...value,
- ...groupIds,
- ]),
- ]);
- } else {
- field.onChange(
- value.filter(
- (id) => !groupIds.includes(id),
- ),
- );
- }
- }}
- />
- </FormControl>
- <FormLabel>{tracker.groupName}</FormLabel>
- </FormItem>
- );
- }}
- />
- {tracker.components.map((component) => (
- <FormField
- key={component.id}
- control={form.control}
- name="pageComponents"
- render={({ field }) => (
- <FormItem className="flex items-center gap-2 pl-6">
- <FormControl>
- <Checkbox
- checked={field.value?.includes(
- component.id,
- )}
- onCheckedChange={(checked) => {
- const value = field.value ?? [];
- if (checked) {
- field.onChange([
- ...value,
- component.id,
- ]);
- } else {
- field.onChange(
- value.filter(
- (id) => id !== component.id,
- ),
- );
- }
- }}
- />
- </FormControl>
- <FormLabel>{component.name}</FormLabel>
- </FormItem>
- )}
- />
- ))}
- </div>
- );
- }
- return (
+ <Separator />
+ <div className="-my-2 flex max-h-56 flex-col gap-2 overflow-y-auto bg-muted p-2 px-2">
+ {page?.trackers && page.trackers.length > 0 ? (
+ page.trackers.map((tracker) => {
+ if (tracker.type === "group") {
+ const groupIds = tracker.components.map((c) => c.id);
+ return (
+ <div
+ key={tracker.groupId}
+ className="flex flex-col gap-2"
+ >
<FormField
- key={tracker.component.id}
control={form.control}
name="pageComponents"
- render={({ field }) => (
- <FormItem className="flex items-center gap-2">
- <FormControl>
- <Checkbox
- checked={field.value?.includes(
- tracker.component.id,
- )}
- onCheckedChange={(checked) => {
- const value = field.value ?? [];
- if (checked) {
- field.onChange([
- ...value,
- tracker.component.id,
- ]);
- } else {
- field.onChange(
- value.filter(
- (id) => id !== tracker.component.id,
- ),
- );
+ render={({ field }) => {
+ const allChecked = groupIds.every((id) =>
+ field.value?.includes(id),
+ );
+ const someChecked = groupIds.some((id) =>
+ field.value?.includes(id),
+ );
+ return (
+ <FormItem className="flex items-center gap-2">
+ <FormControl>
+ <Checkbox
+ checked={
+ allChecked
+ ? true
+ : someChecked
+ ? "indeterminate"
+ : false
}
- }}
- />
- </FormControl>
- <FormLabel>{tracker.component.name}</FormLabel>
- </FormItem>
- )}
+ onCheckedChange={(checked) => {
+ const value = field.value ?? [];
+ if (checked) {
+ field.onChange([
+ ...new Set([...value, ...groupIds]),
+ ]);
+ } else {
+ field.onChange(
+ value.filter(
+ (id) => !groupIds.includes(id),
+ ),
+ );
+ }
+ }}
+ />
+ </FormControl>
+ <FormLabel>{tracker.groupName}</FormLabel>
+ </FormItem>
+ );
+ }}
/>
- );
- })
- ) : (
- <StatusBlankContainer>
- <StatusBlankTitle>
- No components to subscribe to
- </StatusBlankTitle>
- <StatusBlankDescription>
- This page has no components to subscribe to.
- </StatusBlankDescription>
- </StatusBlankContainer>
- )}
- </div>
- </>
- )}
+ {tracker.components.map((component) => (
+ <FormField
+ key={component.id}
+ control={form.control}
+ name="pageComponents"
+ render={({ field }) => (
+ <FormItem className="flex items-center gap-2 pl-6">
+ <FormControl>
+ <Checkbox
+ checked={field.value?.includes(
+ component.id,
+ )}
+ onCheckedChange={(checked) => {
+ const value = field.value ?? [];
+ if (checked) {
+ field.onChange([
+ ...value,
+ component.id,
+ ]);
+ } else {
+ field.onChange(
+ value.filter(
+ (id) => id !== component.id,
+ ),
+ );
+ }
+ }}
+ />
+ </FormControl>
+ <FormLabel>{component.name}</FormLabel>
+ </FormItem>
+ )}
+ />
+ ))}
+ </div>
+ );
+ }
+ return (
+ <FormField
+ key={tracker.component.id}
+ control={form.control}
+ name="pageComponents"
+ render={({ field }) => (
+ <FormItem className="flex items-center gap-2">
+ <FormControl>
+ <Checkbox
+ checked={field.value?.includes(
+ tracker.component.id,
+ )}
+ onCheckedChange={(checked) => {
+ const value = field.value ?? [];
+ if (checked) {
+ field.onChange([
+ ...value,
+ tracker.component.id,
+ ]);
+ } else {
+ field.onChange(
+ value.filter(
+ (id) => id !== tracker.component.id,
+ ),
+ );
+ }
+ }}
+ />
+ </FormControl>
+ <FormLabel>{tracker.component.name}</FormLabel>
+ </FormItem>
+ )}
+ />
+ );
+ })
+ ) : (
+ <StatusBlankContainer>
+ <StatusBlankTitle>
+ No components to subscribe to
+ </StatusBlankTitle>
+ <StatusBlankDescription>
+ This page has no components to subscribe to.
+ </StatusBlankDescription>
+ </StatusBlankContainer>
+ )}
+ </div>
</>
)}
</form>
diff --git a/apps/web/public/assets/changelog/status-page-component-subscription.png b/apps/web/public/assets/changelog/status-page-component-subscription.png
new file mode 100644
index 000000000..9dab32fab
Binary files /dev/null and b/apps/web/public/assets/changelog/status-page-component-subscription.png differ
diff --git a/apps/web/src/content/pages/changelog/status-page-component-subscription.mdx b/apps/web/src/content/pages/changelog/status-page-component-subscription.mdx
new file mode 100644
index 000000000..e14fefc44
--- /dev/null
+++ b/apps/web/src/content/pages/changelog/status-page-component-subscription.mdx
@@ -0,0 +1,16 @@
+---
+title: "Component Subscriptions"
+description: "Subscribe to specific components on a status page to only get notified about what matters to you."
+publishedAt: "2026-03-01"
+image: "/assets/changelog/status-page-component-subscription.png"
+category: "statuspage"
+author: "openstatus"
+---
+
+Subscribers can now choose exactly which components they want to receive notifications for on a status page.
+
+Instead of getting every update, subscribers can opt into specific components - like only the API, or only the EU region. When a status report or maintenance affects a component they care about, they get notified. Everything else stays quiet.
+
+- **Per-component subscriptions** - select individual components or entire groups
+- **Manage anytime** - update your subscription scope from the status page via your unique link
+- **Backwards compatible** - existing subscribers continue to receive all updates unless they customize their scope