Throwaway, kept as a primary source rather than on main. Single self-contained
HTML file: free-play buttons plus six guided walkthroughs over a pure reducer.
It settled two things the spec had wrong or missing:
- The client must supply the message id. With a server-generated id there is
nothing to reconcile the optimistically rendered message against when it
comes back over the realtime channel, and it renders twice. Both cases are
reproducible via the toggle at the top.
- An unread *count* cannot be derived without fetching, because seq counts
events and not messages. Hence: fetch for DMs, a plain dot for channels.