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

SetPaneBorderless missing pane_id

Error message

SetPaneBorderless missing pane_id

What it means

Conversion of the protobuf IPC action SetPaneBorderless, which forces a pane's borderless state to an explicit value (`borderless` bool plus target `pane_id`). Both matter, but only pane_id is a message-ish optional checked here: without it the conversion fails with this error and the border state is never applied.

Source

Thrown at zellij-utils/src/ipc/protobuf_conversion.rs:2888

                        .ok_or_else(|| {
                            anyhow!("ChangeFloatingPaneCoordinates missing coordinates")
                        })?
                        .try_into()?,
                },
            ),
            ActionType::TogglePaneBorderless(toggle_borderless_action) => {
                Ok(crate::input::actions::Action::TogglePaneBorderless {
                    pane_id: toggle_borderless_action
                        .pane_id
                        .ok_or_else(|| anyhow!("TogglePaneBorderless missing pane_id"))?
                        .try_into()?,
                })
            },
            ActionType::SetPaneBorderless(set_borderless_action) => {
                Ok(crate::input::actions::Action::SetPaneBorderless {
                    pane_id: set_borderless_action
                        .pane_id
                        .ok_or_else(|| anyhow!("SetPaneBorderless missing pane_id"))?
                        .try_into()?,
                    borderless: set_borderless_action.borderless,
                })
            },
            ActionType::TogglePaneInGroup(_) => {
                Ok(crate::input::actions::Action::TogglePaneInGroup)
            },
            ActionType::ToggleGroupMarking(_) => {
                Ok(crate::input::actions::Action::ToggleGroupMarking)
            },
            ActionType::SetPaneColor(set_pane_color_action) => {
                Ok(crate::input::actions::Action::SetPaneColor {
                    pane_id: set_pane_color_action
                        .pane_id
                        .ok_or_else(|| anyhow!("SetPaneColor missing pane_id"))?
                        .try_into()?,
                    fg: set_pane_color_action.fg,
                    bg: set_pane_color_action.bg,

View on GitHub (pinned to 98a0837077)

Solutions

  1. Set pane_id along with borderless on every SetPaneBorderless action
  2. Regenerate client stubs against the running server's proto
  3. Align client/server zellij versions
  4. Validate required fields pre-send and drop malformed actions with logging

Example fix

// before
SetBorderlessAction { borderless: true, ..Default::default() } // pane_id: None

// after
SetBorderlessAction { pane_id: Some(target_pane_id as u64), borderless: true }
Defensive patterns

Strategy: validation

Validate before calling

if let ActionType::SetPaneBorderless(a) = action.action_type.as_ref().unwrap() {
    if a.pane_id.is_none() {
        anyhow::bail!("SetPaneBorderless requires pane_id");
    }
}

Type guard

fn set_borderless_action_is_valid(a: &SetBorderlessAction) -> bool {
    a.pane_id.is_some()
}

Try / catch

match protobuf_action.try_into() {
    Ok(action) => dispatch(action),
    Err(e) if e.to_string().contains("SetPaneBorderless missing pane_id") => {
        log::warn!("dropping SetPaneBorderless without pane_id");
    },
    Err(e) => return Err(e.context("action conversion failed")),
}

Prevention

When it happens

Trigger: Sending SetPaneBorderless with only the boolean set (borderless: true) and pane_id unset — the other half-populated-payload pattern from custom IPC clients or mismatched generated stubs.

Common situations: Programmatic UI styling that sets borderless globally and forgets the pane target; schema drift between client and server builds; test harnesses emitting default-ish actions.

Related errors


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