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 + storeTypes and local persistence.
hostThe async facade behind every list.
atlas::shell::NavThe collapsing rail.
atlascore::LoadLoading, ready, and failed as three screens.
Start it
scripts/new.sh Acme ~/Dev/acme --template sidebar
What it looks like
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)