shadcn.io is not affiliated with official shadcn/ui
Emergency Dispatch Chat Block for Solid
A radio log from a county dispatch training console: pick a unit and send Proceed, Hold or Stand by, and the unit answers while the Units pane moves each state and count, derived from the log.
Installation
Overview
Practise radio dispatch with this emergency dispatch chat for Solid with Ark UI, a training console and not a real service, which the status line says. A framed window of fixed height shows a pinned incident card (a priority word with a glyph, a training address and the caller's report) over a radio log with one typed line per call and its time. The "Units" pane lists four units with a state each (Available, En route, On scene, Cleared) and a count per state, and both are derived from the log: a unit's state is whatever its last call said. Choose a unit in the Native Select, press Proceed, Hold or Stand by, or type a line, and the call is posted; a moment later the unit's acknowledgement lands and the board moves. The composer's Shine Button is the only colored control, and below 768 px a two-view switch shows the log or the units. It's the starting point for a dispatch trainer or a field-ops log.
FAQ
What stays in the page, and how do I make it real?
Everything, and none of it is real: the address, the units and the scenario are typed, the acknowledgements come from a small script keyed on the unit's state, and no call is made. To wire it for real, send the call where call builds it and append each unit's reply to the same list as it arrives; the board needs no change because it reads the list.
How is the unit board derived?
One pure function reads the log: a unit's state is what its last call announced ("en route", "on scene", "cleared" or "available"), and a unit that has said nothing is Available. The counts are computed from the units, so the board, the counts and the log can't disagree. There is no state to set by hand.
What do the three codes do?
Proceed moves the chosen unit one step along (Available to En route to On scene to Cleared and back to Available), Hold and Stand by only get a spoken answer. The buttons wait while a unit is answering, so two calls never cross, and the line under the composer says when to wait.
How does the composer work?
Enter sends and Shift and Enter add a line, which the field's description says for a screen reader; Enter during text composition (an IME) is left alone. Send stays quiet while the field is empty and says so if pressed, and focus stays in the field after sending.
Is it usable with a keyboard and a screen reader?
The log is a focusable region announced as a log, and each call starts with its time. State is always a word with a glyph, never a color; the count cells are a description list; the unit select and the code buttons are named; and the status line announces what was called.