Desktop field Plate 44 Route §44
Plate 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

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

What it looks like

crates/app/src/root.rsrust
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
    |_| {},
);

Read next

Desktop architecture Gotchas
Type to search guides and package references.