Skip to main content
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.
src/app.ts

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. 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.