Skip to content

Open-source status page, incident response and uptime monitoring

chore: dashboard agents page (#1883)

Maximilian Kaske904bca0ef4a4
diff --git a/apps/dashboard/src/app/(dashboard)/agents/breadcrumb.tsx b/apps/dashboard/src/app/(dashboard)/agents/breadcrumb.tsx
new file mode 100644
index 000000000..5ca9121bb
--- /dev/null
+++ b/apps/dashboard/src/app/(dashboard)/agents/breadcrumb.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+import { NavBreadcrumb } from "@/components/nav/nav-breadcrumb";
+import { Bot } from "lucide-react";
+
+export function Breadcrumb() {
+ return (
+ <NavBreadcrumb items={[{ type: "page", label: "Agents", icon: Bot }]} />
+ );
+}
diff --git a/apps/dashboard/src/app/(dashboard)/agents/layout.tsx b/apps/dashboard/src/app/(dashboard)/agents/layout.tsx
new file mode 100644
index 000000000..affb067cb
--- /dev/null
+++ b/apps/dashboard/src/app/(dashboard)/agents/layout.tsx
@@ -0,0 +1,26 @@
+import {
+ AppHeader,
+ AppHeaderActions,
+ AppHeaderContent,
+} from "@/components/nav/app-header";
+import { AppSidebarTrigger } from "@/components/nav/app-sidebar";
+
+import { Breadcrumb } from "./breadcrumb";
+import { NavActions } from "./nav-actions";
+
+export default function Layout({ children }: { children: React.ReactNode }) {
+ return (
+ <div>
+ <AppHeader>
+ <AppHeaderContent>
+ <AppSidebarTrigger />
+ <Breadcrumb />
+ </AppHeaderContent>
+ <AppHeaderActions>
+ <NavActions />
+ </AppHeaderActions>
+ </AppHeader>
+ <main className="w-full flex-1">{children}</main>
+ </div>
+ );
+}
diff --git a/apps/dashboard/src/app/(dashboard)/agents/nav-actions.tsx b/apps/dashboard/src/app/(dashboard)/agents/nav-actions.tsx
new file mode 100644
index 000000000..a2c5a63c1
--- /dev/null
+++ b/apps/dashboard/src/app/(dashboard)/agents/nav-actions.tsx
@@ -0,0 +1,33 @@
+import { NavFeedback } from "@/components/nav/nav-feedback";
+import { Button } from "@openstatus/ui/components/ui/button";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@openstatus/ui/components/ui/tooltip";
+import { Book } from "lucide-react";
+
+export function NavActions() {
+ return (
+ <div className="flex items-center gap-2 text-sm">
+ <NavFeedback />
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button variant="ghost" size="sm" className="group h-7 w-7" asChild>
+ <a
+ href={"https://docs.openstatus.dev/reference/cli-reference"}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <Book className="h-4 w-4 text-muted-foreground group-hover:text-foreground" />
+ </a>
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>View Documentation</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </div>
+ );
+}
diff --git a/apps/dashboard/src/app/(dashboard)/agents/page.tsx b/apps/dashboard/src/app/(dashboard)/agents/page.tsx
new file mode 100644
index 000000000..afe4b8538
--- /dev/null
+++ b/apps/dashboard/src/app/(dashboard)/agents/page.tsx
@@ -0,0 +1,95 @@
+"use client";
+
+import { Code } from "@/components/common/code";
+import { Link } from "@/components/common/link";
+import { Note } from "@/components/common/note";
+import {
+ SectionDescription,
+ SectionGroup,
+ SectionHeader,
+ SectionTitle,
+} from "@/components/content/section";
+import { Section } from "@/components/content/section";
+import { useTRPC } from "@/lib/trpc/client";
+import { Button } from "@openstatus/ui/components/ui/button";
+import { useQuery } from "@tanstack/react-query";
+import { Info } from "lucide-react";
+
+const messages = [
+ {
+ message:
+ "@openstatus create an incident for the payment API – high latency detected.",
+ description: "Open a new incident and notify your subscribers.",
+ },
+ {
+ message:
+ "@openstatus keep the status page updated that we are still monitoring the issue.",
+ description: "Update the status report to 'Monitoring'.",
+ },
+ {
+ message: "@openstatus resolve the ongoing incident on my API status page.",
+ description: "Close an active incident and update your subscribers.",
+ },
+ {
+ message:
+ "@openstatus schedule a maintenance window for my database next Friday from 2–3 PM.",
+ description: "Plan downtime so subscribers are informed in advance.",
+ },
+];
+
+export default function Page() {
+ const trpc = useTRPC();
+ const { data: workspace } = useQuery(trpc.workspace.get.queryOptions());
+ return (
+ <SectionGroup>
+ <Section>
+ <SectionHeader>
+ <SectionTitle>Agents</SectionTitle>
+ <SectionDescription>
+ Use our Slack agent to manage your status pages and incidents.{" "}
+ <Link
+ href="https://www.openstatus.dev/blog/openstatus-slack-agent"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ Read more
+ </Link>
+ .
+ </SectionDescription>
+ </SectionHeader>
+ {!workspace?.limits["slack-agent"] ? (
+ <Note color="info" size="sm">
+ <Info />
+ This is a paid feature. Upgrade your plan to use the Slack agent.
+ </Note>
+ ) : null}
+ <Button size="sm" asChild>
+ <Link href="/settings/integrations">Install the Slack agent</Link>
+ </Button>
+ </Section>
+ <Section>
+ <SectionHeader>
+ <SectionTitle>Messages</SectionTitle>
+ <SectionDescription>
+ Here are some examples of messages that the Slack agent can handle.
+ </SectionDescription>
+ </SectionHeader>
+ <Note size="sm">
+ <Info />
+ Mention the @openstatus bot to trigger a response. This keeps threads
+ clean without the bot spamming your team.
+ </Note>
+ <ul className="flex flex-col gap-2">
+ {messages.map((message, i) => (
+ <li key={i} className="flex flex-col gap-0.5">
+ <p className="text-muted-foreground text-xs">
+ {message.description}
+ </p>
+ <Code>{message.message}</Code>
+ </li>
+ ))}
+ </ul>
+ </Section>
+ </SectionGroup>
+ );
+}
diff --git a/apps/dashboard/src/app/(dashboard)/overview/page.tsx b/apps/dashboard/src/app/(dashboard)/overview/page.tsx
index ca84641a0..d329e2685 100644
--- a/apps/dashboard/src/app/(dashboard)/overview/page.tsx
+++ b/apps/dashboard/src/app/(dashboard)/overview/page.tsx
@@ -27,8 +27,7 @@ import { useTRPC } from "@/lib/trpc/client";
import { cn } from "@/lib/utils";
import { useQuery } from "@tanstack/react-query";
import { formatDistanceToNowStrict } from "date-fns";
-import { List, Search } from "lucide-react";
-import { Terminal } from "lucide-react";
+import { Bot, List, Search } from "lucide-react";
import Link from "next/link";
import { DataTableStatusReports } from "./data-table-status-reports";
@@ -132,10 +131,10 @@ export default function Page() {
return (
<SectionGroup>
<Note>
- <Terminal />
- Use Monitoring as Code to manage your monitors with our CLI.
+ <Bot />
+ Use our Slack agent to manage your status pages and incidents.
<NoteButton variant="default" asChild>
- <Link href="/cli">Learn more</Link>
+ <Link href="/agents">Learn more</Link>
</NoteButton>
</Note>
<Section>
diff --git a/apps/dashboard/src/app/(dashboard)/settings/integrations/page.tsx b/apps/dashboard/src/app/(dashboard)/settings/integrations/page.tsx
index acb080660..b87949ce5 100644
--- a/apps/dashboard/src/app/(dashboard)/settings/integrations/page.tsx
+++ b/apps/dashboard/src/app/(dashboard)/settings/integrations/page.tsx
@@ -9,12 +9,6 @@ import {
} from "@/components/content/section";
import { FormCardGroup } from "@/components/forms/form-card";
import { useTRPC } from "@/lib/trpc/client";
-import {
- Card,
- CardContent,
- CardHeader,
- CardTitle,
-} from "@openstatus/ui/components/ui/card";
import { useQuery } from "@tanstack/react-query";
import { SlackIntegrationCard } from "./slack-card";
@@ -41,31 +35,20 @@ export default function Page() {
</SectionDescription>
</SectionHeader>
<FormCardGroup>
- {workspace?.limits["slack-agent"] ? (
- <SlackIntegrationCard
- integration={
- slackIntegration
- ? {
- id: slackIntegration.id,
- externalId: slackIntegration.externalId,
- data: slackIntegration.data as {
- teamName?: string;
- },
- }
- : null
- }
- />
- ) : (
- <Card>
- <CardHeader>
- <CardTitle>No integrations available</CardTitle>
- </CardHeader>
- <CardContent>
- Upgrade to a paid plan to access integrations and connect your
- workspace to slack.
- </CardContent>
- </Card>
- )}
+ <SlackIntegrationCard
+ locked={!workspace?.limits["slack-agent"]}
+ integration={
+ slackIntegration
+ ? {
+ id: slackIntegration.id,
+ externalId: slackIntegration.externalId,
+ data: slackIntegration.data as {
+ teamName?: string;
+ },
+ }
+ : null
+ }
+ />
</FormCardGroup>
</Section>
</SectionGroup>
diff --git a/apps/dashboard/src/app/(dashboard)/settings/integrations/slack-card.tsx b/apps/dashboard/src/app/(dashboard)/settings/integrations/slack-card.tsx
index be2996d4d..e8d89cda4 100644
--- a/apps/dashboard/src/app/(dashboard)/settings/integrations/slack-card.tsx
+++ b/apps/dashboard/src/app/(dashboard)/settings/integrations/slack-card.tsx
@@ -1,17 +1,21 @@
"use client";
+import { Link } from "@/components/common/link";
import {
FormCard,
FormCardContent,
FormCardDescription,
FormCardFooter,
+ FormCardFooterInfo,
FormCardHeader,
FormCardTitle,
+ FormCardUpgrade,
} from "@/components/forms/form-card";
import { useTRPC } from "@/lib/trpc/client";
import { Badge } from "@openstatus/ui/components/ui/badge";
import { Button } from "@openstatus/ui/components/ui/button";
import { useMutation, useQueryClient } from "@tanstack/react-query";
+import { Lock } from "lucide-react";
import { useRouter } from "next/navigation";
const SERVER_URL =
@@ -20,6 +24,7 @@ const SERVER_URL =
: "http://localhost:3000";
interface SlackIntegrationCardProps {
+ locked?: boolean;
integration: {
id: number;
externalId: string;
@@ -28,6 +33,7 @@ interface SlackIntegrationCardProps {
}
export function SlackIntegrationCard({
+ locked,
integration,
}: SlackIntegrationCardProps) {
const router = useRouter();
@@ -65,6 +71,7 @@ export function SlackIntegrationCard({
return (
<FormCard>
+ {locked ? <FormCardUpgrade /> : null}
<FormCardHeader>
<div className="flex items-center gap-2">
<FormCardTitle>Slack</FormCardTitle>
@@ -88,7 +95,25 @@ export function SlackIntegrationCard({
)}
</FormCardContent>
<FormCardFooter>
- {isConnected ? (
+ <FormCardFooterInfo>
+ Learn more about{" "}
+ <Link
+ href="https://www.openstatus.dev/blog/openstatus-slack-agent"
+ rel="noreferrer"
+ target="_blank"
+ >
+ Slack Agent
+ </Link>
+ .
+ </FormCardFooterInfo>
+ {locked ? (
+ <Button type="button" asChild>
+ <Link href="/settings/billing">
+ <Lock />
+ Upgrade
+ </Link>
+ </Button>
+ ) : isConnected ? (
<Button
variant="destructive"
size="sm"
diff --git a/apps/dashboard/src/components/common/note.tsx b/apps/dashboard/src/components/common/note.tsx
index b84d1ecd2..07f6fd62e 100644
--- a/apps/dashboard/src/components/common/note.tsx
+++ b/apps/dashboard/src/components/common/note.tsx
@@ -3,7 +3,7 @@ import { cn } from "@openstatus/ui/lib/utils";
import { type VariantProps, cva } from "class-variance-authority";
const noteVariants = cva(
- "flex items-center gap-2 rounded-xl border px-3 py-2 [&>svg]:size-4 [&>svg]:text-current [&>svg]:shrink-0",
+ "flex items-center gap-2 rounded-xl border [&>svg]:text-current [&>svg]:shrink-0",
{
variants: {
variant: {
@@ -17,10 +17,15 @@ const noteVariants = cva(
success: "text-success border-success/50 bg-success/5",
info: "text-info border-info/50 bg-info/5",
},
+ size: {
+ default: "px-3 py-2 text-base [&>svg]:size-4",
+ sm: "px-2.5 py-1.5 text-sm [&>svg]:size-3.5",
+ },
},
defaultVariants: {
variant: "default",
color: "default",
+ size: "default",
},
},
);
@@ -30,12 +35,13 @@ export function Note({
className,
variant = "default",
color = "default",
+ size = "default",
...props
}: React.ComponentProps<"div"> & VariantProps<typeof noteVariants>) {
return (
<div
data-variant={variant}
- className={cn(noteVariants({ variant, color, className }))}
+ className={cn(noteVariants({ variant, color, size, className }))}
{...props}
>
{children}
diff --git a/apps/dashboard/src/components/nav/app-sidebar.tsx b/apps/dashboard/src/components/nav/app-sidebar.tsx
index f363298c9..37ad6b9c7 100644
--- a/apps/dashboard/src/components/nav/app-sidebar.tsx
+++ b/apps/dashboard/src/components/nav/app-sidebar.tsx
@@ -3,6 +3,7 @@
import {
Activity,
Bell,
+ Bot,
Cog,
Globe,
LayoutGrid,
@@ -75,6 +76,11 @@ const data = {
url: "/private-locations",
icon: Globe,
},
+ {
+ name: "Agents",
+ url: "/agents",
+ icon: Bot,
+ },
{
name: "CLI",
url: "/cli",
diff --git a/apps/dashboard/src/data/plans.ts b/apps/dashboard/src/data/plans.ts
index 7b66501dd..f88d01d14 100644
--- a/apps/dashboard/src/data/plans.ts
+++ b/apps/dashboard/src/data/plans.ts
@@ -59,6 +59,10 @@ export const config: Record<
value: "maintenance",
label: "Maintenance status",
},
+ {
+ value: "slack-agent",
+ label: "Slack Agent",
+ },
{
value: "monitor-values-visibility",
label: "Toggle numbers visibility",
diff --git a/apps/server/src/routes/slack/index.test.ts b/apps/server/src/routes/slack/index.test.ts
index 4b4f7dd31..6826ff348 100644
--- a/apps/server/src/routes/slack/index.test.ts
+++ b/apps/server/src/routes/slack/index.test.ts
@@ -6,6 +6,7 @@ const SIGNING_SECRET = "test-signing-secret";
process.env.SLACK_SIGNING_SECRET = SIGNING_SECRET;
process.env.AI_GATEWAY_API_KEY = "test-key";
+process.env.SLACK_CLIENT_ID = "test-client-id";
function signRequest(body: string, timestamp: number): string {
const basestring = `v0:${timestamp}:${body}`;
diff --git a/apps/web/src/content/pages/product/status-page.mdx b/apps/web/src/content/pages/product/status-page.mdx
index 795dfe89b..35cfa4676 100644
--- a/apps/web/src/content/pages/product/status-page.mdx
+++ b/apps/web/src/content/pages/product/status-page.mdx
@@ -15,6 +15,12 @@ faq:
answer: "Users can subscribe to receive updates when you post status reports or maintenance notices. We support email notifications, RSS/Atom feeds for feed readers, and JSON feeds for programmatic consumption. Subscribers are automatically notified when you publish updates."
- question: "Can I customize the appearance of my status page?"
answer: "Yes, use the Theme Store to apply community themes or create your own. Themes control colors, fonts, and layout. For private custom themes, contact us. You can also define which data to share (uptime percentages, response times, or manual reports only)."
+ - question: "What is the Slack agent and what can it do?"
+ answer: "The Slack agent lets you manage your status page directly from Slack using natural language. @mention @openstatus in any channel or thread to create incidents, post updates, and resolve reports — without leaving Slack. No slash commands required."
+ - question: "Does the Slack agent publish status reports automatically?"
+ answer: "No. The agent always shows a confirmation card before publishing anything. You can review the drafted title, status, and message, then choose to Approve, Approve & Notify (sends notifications to all subscribers), or Cancel. Nothing goes public without your explicit approval."
+ - question: "Which plan includes the Slack agent?"
+ answer: "The Slack agent is available on paid plans. Install it from your dashboard under Settings > Integrations."
---
## Why do you need a status page?
@@ -81,3 +87,14 @@ We support following communication channels:
### Audience
By default, your status page is public. For internal or client-specific pages, you can protect access using **password protection** or **magic link** authentication to control who can view your updates.
+
+
+### Slack Agent
+
+Manage incidents without leaving Slack. Install the **@openstatus** Slack agent and @mention it in any channel or thread to create, update, and resolve status reports using plain language - no slash commands, no tab switching.
+
+> **@openstatus** our API is returning 500 errors for about 10% of requests. Can you create an incident on the status page?
+
+The agent reads the conversation, looks up your status pages and components, and drafts a status report. Before anything goes public it posts a confirmation card so you can review the title, status, and message. Choose to **Approve**, **Approve & Notify** (sends notifications to all subscribers), or **Cancel**.
+
+The agent is **thread-aware**: when you follow up in the same thread (_"we found the root cause"_ or _"it's fixed"_), it picks up the context and drafts the next update automatically. The entire incident lifecycle - from creation to resolution - can happen in a single Slack thread.
\ No newline at end of file
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 31d4fe69c..d6b503e95 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1991,8 +1991,6 @@ importers:
specifier: 5.9.3
version: 5.9.3
- packages/react/dist: {}
-
packages/regions:
dependencies:
zod: