
Define a support ticket's shape with a fixed set of priorities, a read-only id and an optional assignee, then open, assign, label and rank tickets.
Model the desk's activity feed as tagged ticket events, describe each kind, fall back safely on unknown kinds and pick out one author's comments.
Build a ticket queue object that keeps its tickets private, hands out the most urgent one first and keeps working when its take method is passed around as a callback.
Compose the ticket record, activity feed and queue into a live board that replays feed events, lists open tickets in working order and hands the next ticket to a free agent.