useAlarms keeps a set of alarm points and the rules for them, after ISA-18.2: an alarm that comes in is new until someone acknowledges it, standing while it is present and seen, cleared, not acknowledged when it went away before anyone saw it, and normal when it is clear and seen. An operator can also shelve a point (a known fault, maintenance), which keeps it out of the counts and the announcements.
Annunciator shows every point as a tile in a fixed order, as a panel does. AlarmList shows the ones that need someone, new first, then by priority, then newest. Both read without colour: the priority is a numbered shape (AlarmMark: critical an octagon with 1, high a triangle with 2, medium a diamond with 3, low a circle with 4), and the state is written on every tile and row, and drawn as a pattern too: a new alarm flashes (or holds a heavy double outline with reduced motion), a cleared unseen one has a dashed edge, a shelved one is hatched.
Each waiting row has an Acknowledge button and the header acknowledges them all. Alarms that come in are announced to screen readers: politely, and as an alert when one is critical. Pass timeZone to write times the same on the server and in the browser.
alarmsReducer(alarms, action) is the same rules as a pure function, for a server, a reducer or a test. alarmState, sortAlarms and countAlarms read a set the way the components do.