Desktop field Plate 92 Route §92
Plate 92

The navigator

A nav rail down the left, routed views on the right, and lists you control the timing of.

This is the sidebar template, and it is the one to read to understand how the pieces fit. A Route enum with a stable id per destination, atlas::shell::Nav rendering the rail, and one view per surface reading the signals it cares about.

The rail collapses to icons and remembers that it did. A preference that has to be re-applied every launch is not a preference.

What you are carrying

model + store

Types and local persistence.

host

The async facade behind every list.

atlas::shell::Nav

The collapsing rail.

atlascore::Load

Loading, ready, and failed as three screens.

Start it

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

What it looks like

crates/app/src/root.rsrust
let nav = Nav::new(Route::nav(), route.id())
    .title("Acme")
    .collapsed(collapsed)
    .on_select(move |id, cx| {
        if let Some(next) = Route::from_id(&id) { route_signal.set(cx, next); }
    })
    .on_toggle(move |cx| collapse.toggle(cx));

// gpui dispatches actions along the focus path. With nothing focused the
// menu bar greys out and swallows its own shortcuts.
focus::claim(window, cx, &self.focus);

div().track_focus(&self.focus).flex().child(nav).child(content)

Read next

Desktop architecture Scaffolding Gotchas
Type to search guides and package references.