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

TogglePaneBorderless missing pane_id

Error message

TogglePaneBorderless missing pane_id

What it means

Conversion of the protobuf IPC action TogglePaneBorderless requires the target `pane_id`: the action flips the border rendering of one specific pane, and without an id there is nothing to toggle. The optional proto3 field arrives as Option; unset values fail conversion at this .ok_or_else() and the action is dropped with this error.

Source

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

            ActionType::ChangeFloatingPaneCoordinates(change_coords_action) => Ok(
                crate::input::actions::Action::ChangeFloatingPaneCoordinates {
                    pane_id: change_coords_action
                        .pane_id
                        .ok_or_else(|| anyhow!("ChangeFloatingPaneCoordinates missing pane_id"))?
                        .try_into()?,
                    coordinates: change_coords_action
                        .coordinates
                        .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)
            },

View on GitHub (pinned to 98a0837077)

Solutions

  1. Resolve the target pane's id first and set it on the action before sending
  2. Regenerate the client's protobuf code from the server's proto files
  3. Run client and server from the same zellij release
  4. Validate pane_id presence before sending; log and skip invalid actions

Example fix

// before
ToggleBorderlessAction::default() // pane_id: None

// after
ToggleBorderlessAction { pane_id: Some(target_pane_id as u64) }
Defensive patterns

Strategy: validation

Validate before calling

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

Type guard

fn toggle_borderless_action_is_valid(a: &ToggleBorderlessAction) -> bool {
    a.pane_id.is_some()
}

Try / catch

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

Prevention

When it happens

Trigger: IPC senders emitting TogglePaneBorderless without pane_id — half-populated payloads, stale stubs, or tooling that assumes the 'active pane' is implied (it is not: the id is mandatory).

Common situations: Theme/UI automation toggling borders programmatically; client-server version mismatch; scripts replaying actions after pane ids shifted or were omitted.

Related errors


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