> ## Documentation Index
> Fetch the complete documentation index at: https://developers.reintersect.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Incident

> Track an incident from investigating to resolved, post updates from an inline form and resolve with a final summary.

> Reintersect apps are in developer preview. Names and limits can still change before general
> release.

When something breaks, an incident block tracks the response from investigating to resolved. Members
post updates from an inline form, and resolving the incident locks the block with a final summary.

```tsx src/app.ts theme={null}
import { createReintersectApp } from "@reintersect/sdk/app";
import { incident } from "@reintersect/sdk/recipes";

export const Incident = incident({ type: "incident", title: "Incident" });

export const app = createReintersectApp({ name: "Incidents" }).addBlock(Incident);

export const checkoutOutage = Incident.insert({
  title: "Checkout errors",
  severity: "sev1",
  summary: "Card payments fail for some customers",
  commander: "Ada",
  channelUrl: "https://chat.example.com/incident-12",
});
```

## Props, state and actions

Props are `{ title, severity: "sev1" | "sev2" | "sev3", summary?, commander?, channelUrl? }`. State is
`{ phase, updates, resolvedBy? }`, where `phase` moves through `investigating`, `identified`,
`monitoring` and `resolved`, and `updates` keeps the latest 20 `{ phase, text, by? }` entries.

| Action | Behaviour |
| - | - |
| `advance` | Takes `{ phase: "identified" \| "monitoring" }` and moves the incident to that phase with an update. |
| `post-update` | Backs an inline form with one `text` field and adds an update. |
| `resolve` | Destructive. Resolves the incident and marks the block final with a summary. |

The update form sits in a collapsed section that the Post an update button opens. The button for the
next phase, Mark identified or Start monitoring, is primary. Once the incident is monitoring, that
button goes away and Post an update becomes primary. Resolve is destructive, so it's never primary
and asks first.

## Labels

`phases`, `severity`, `severityLabel`, `commander`, `phaseLabel`, `advance`, `identified`,
`monitoring`, `resolve`, `confirmTitle`, `confirmBody`, `postUpdate`, `update`, `send`,
`emptyUpdate`, `channel`, `resolved`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.