zellij-org/zellij · error

Failed to find root geom

Error message

Failed to find root geom

What it means

Error "Failed to find root geom" thrown in zellij-org/zellij.

Source

Thrown at zellij-server/src/panes/tiled_panes/stacked_panes.rs:667

        let Some(new_stack_geom) = new_stack_geom else {
            // nothing to do, likely the pane below is fixed
            return Ok(());
        };
        let stack_id = self.next_stack_id();
        // we add the extra panes in the original stack (if any) so that they will be assigned pane
        // positions but not affect the stack geometry
        other_pane_ids_and_geoms.append(&mut extra_stacked_geoms_of_main_pane);
        let mut panes = self.panes.borrow_mut();
        let mut running_y = new_stack_geom.y;
        let mut geom_of_flexible_pane = new_stack_geom.clone();
        geom_of_flexible_pane
            .rows
            .decrease_inner(other_pane_ids_and_geoms.len());
        geom_of_flexible_pane.stacked = Some(stack_id);
        let mut all_stack_geoms = other_pane_ids_and_geoms;
        let original_geom_of_main_pane = panes
            .get(&root_pane_id)
            .ok_or_else(|| anyhow!("Failed to find root geom"))?
            .position_and_size(); // for sorting purposes
        all_stack_geoms.push((*root_pane_id, original_geom_of_main_pane));
        all_stack_geoms.sort_by(|(_a_id, a_geom), (_b_id, b_geom)| {
            if a_geom.y == b_geom.y {
                a_geom.x.cmp(&b_geom.x)
            } else {
                a_geom.y.cmp(&b_geom.y)
            }
        });
        for (pane_id, mut pane_geom) in all_stack_geoms {
            if let Some(pane_in_stack) = panes.get_mut(&pane_id) {
                if &pane_id == root_pane_id {
                    pane_geom.x = new_stack_geom.x;
                    pane_geom.cols = new_stack_geom.cols;
                    pane_geom.y = running_y;
                    pane_geom.rows = geom_of_flexible_pane.rows;
                    pane_geom.stacked = Some(stack_id);
                    running_y += geom_of_flexible_pane.rows.as_usize();

View on GitHub (pinned to 98a0837077)

When it happens

Trigger: Thrown at zellij-server/src/panes/tiled_panes/stacked_panes.rs:667 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zellij-org/zellij@98a0837077 (2026-08-16). Data as JSON: /api/errors/a476d0aa30016df1. Report an issue: GitHub.