seed_default_layout

Function seed_default_layout 

Source
pub(crate) fn seed_default_layout(
    store: &Store,
    tab_id: &str,
) -> Result<(), StoreError>
Expand description

Seed a tab with the default 3-pane launch layout (agent + sysinfo + swarm):

  ┌────────────────┬──────────────┐
  │                │   sysinfo    │  size 2 of 10 ≈ 20%
  │     agent      ├──────────────┤
  │    (tall)      │              │
  │                │    swarm     │  size 8 of 10 ≈ 80%
  └────────────────┴──────────────┘
       50% width         50% width

Shared by first-launch bootstrap (ensure_initial_data) and the new-window path (server::service’s CreateWindow with an empty workspace) so “Open another window” gets the same starter layout instead of opening blank (regression — see docs/retro/retro-blank-new-window-2026-06-21.md). The tab must already exist with a valid layoutstate; both create_tab_with_opts and the reducer’s apply_tab_created provision one.

rootnode is built directly rather than queued via pendingbackendactions: the frontend reducer races when draining multiple insert+split actions in one cycle (layoutPersistence.ts + layoutNodeModels.ts::getNodeByBlockId); a pre-built tree skips the reducer entirely and just renders.