`Loaded` gains the selection, the rows it selects and a count per state. The
rows come from the selection and the numbers come from the room, on purpose: a
chip reading its own count off the filtered list would say 0 for every filter
but the one already chosen, which is the one number the reader does not need.
Every state gets a chip, zero included. A row that gains and loses chips as
sessions advance moves under the thumb of the person reading it -- and sessions
advance while this screen is open, because someone else signing is exactly when
a member comes to look.
The selection lives on the view model and not only on the state drawn from it,
which is the part worth the comment it carries. `observeSessionsForChatRoom`
re-emits whenever any member's message moves any session in the room, and the
collect block builds a whole new `Loaded` each time; one built with the field's
default would snap the chips back to "all" mid-scroll, most often in the
busiest rooms. Four of the seven view-model tests fail if that line goes, which
was checked by removing it.
`initialFilter` is threaded through the constructor and the factory so a caller
can land on a filter -- the first emission is then already filtered, and the
reader never sees the unfiltered list flash past. Nothing passes it yet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>