# §44 — The client

The lists change without asking you. A daemon, a socket, a subscription — something on the other end has opinions about when things happen.

`bridge::stream` is the shape for this: a producer on the tokio runtime, each item delivered to the UI thread as it arrives, and cancellation that needs no abort registry. When the view goes away the receiver drops, the producer's `send` starts failing, and it stops.

Coalesce. A `compose up` of twenty services emits hundreds of events in a second, and refetching per event hammers the daemon and thrashes the list. Bump an epoch signal instead and let the views refetch once.

## What you are carrying

- `host` — The streaming facade, gpui-free.
- `atlas::bridge::stream` — Many items, one seam, implicit cancellation.
- `atlas::shell::Nav` — The rail over the routed views.
- `atlas::shell::Toasts` — One severity vocabulary for what fails.

## Start it

```bash
scripts/new.sh Acme ~/Dev/acme --template sidebar
```

## What it looks like

`crates/app/src/root.rs`

```rust
bridge::stream(
    cx,
    move |tx| async move {
        // A closed receiver means the view is gone; returning false stops us.
        let _ = host.stream_events(|event| tx.unbounded_send(event).is_ok()).await;
    },
    move |_event, cx| state.bump(cx),   // coalesce: bump an epoch, refetch once
    |_| {},
);
```

## Where now

- Sign it and ship it — turn to §101 (Appendix B)
- Hand it to an agent — turn to §102 (Appendix C)
- Walk it again from the start — turn to §1
