zellij-org/zellij · error · anyhow::Error

Invalid combination of alignment

Error message

Invalid combination of alignment ({alignment}) and direction ({direction})

What it means

Error "Invalid combination of alignment ({alignment}) and direction ({direction})" thrown in zellij-org/zellij.

Solutions

  1. Validate the value against the allowed enum range before constructing the message.
  2. Ensure client and server use matching protobuf definitions; regenerate bindings if versions differ.

When it happens

Trigger: Occurs when a protobuf enum value received over IPC has no matching variant; conversion rejects the unknown value.

Common situations: Typical of version skew between client and server, or a malformed/corrupted IPC message.


AI-assisted analysis of zellij-org/zellij@5cb5df5cce (2026-08-19). Data as JSON: /api/errors/2ebf740586804f19. Report an issue: GitHub.

Appendix: source

Thrown at zellij-server/src/panes/tiled_panes/tiled_pane_grid.rs:732

                result.push(*pid)
            }
        }
        Ok(result)
    }

    /// Searches for contiguous panes
    fn contiguous_panes_with_alignment(
        &self,
        id: &PaneId,
        border: &HashSet<usize>,
        alignment: &Direction,
        direction: &Direction,
    ) -> Result<BorderAndPaneIds> {
        let err_context = || {
            format!("failed to find contiguous panes {direction} from pane {id:?} with {alignment} alignment")
        };
        let input_error =
            anyhow!("Invalid combination of alignment ({alignment}) and direction ({direction})");

        let pane_to_check = self
            .get_pane_geom(id)
            .with_context(|| no_pane_id(id))
            .with_context(err_context)?;
        let mut result = vec![];
        let mut aligned_panes: Vec<_> = self
            .pane_ids_aligned_with(id, alignment)
            .and_then(|pane_ids| {
                Ok(pane_ids
                    .iter()
                    .filter_map(|p_id| self.get_pane_geom(p_id).map(|pane_geom| (*p_id, pane_geom)))
                    .collect())
            })
            .with_context(err_context)?;

        use Direction::Down as D;
        use Direction::Left as L;

View on GitHub (pinned to 5cb5df5cce)