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

ScrollToBottomByPaneId missing pane_id

Error message

ScrollToBottomByPaneId missing pane_id

What it means

Protobuf conversion for ScrollToBottomByPaneId, which jumps one named pane's scrollback to the bottom. As with the other pane-targeted scroll actions, the optional `pane_id` is checked with .ok_or_else(); an unset id means no target pane and conversion fails with this error.

Source

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

                    pane_id: a
                        .pane_id
                        .ok_or_else(|| anyhow!("ScrollDownByPaneId missing pane_id"))?
                        .try_into()?,
                })
            },
            ActionType::ScrollToTopByPaneId(a) => {
                Ok(crate::input::actions::Action::ScrollToTopByPaneId {
                    pane_id: a
                        .pane_id
                        .ok_or_else(|| anyhow!("ScrollToTopByPaneId missing pane_id"))?
                        .try_into()?,
                })
            },
            ActionType::ScrollToBottomByPaneId(a) => {
                Ok(crate::input::actions::Action::ScrollToBottomByPaneId {
                    pane_id: a
                        .pane_id
                        .ok_or_else(|| anyhow!("ScrollToBottomByPaneId missing pane_id"))?
                        .try_into()?,
                })
            },
            ActionType::PageScrollUpByPaneId(a) => {
                Ok(crate::input::actions::Action::PageScrollUpByPaneId {
                    pane_id: a
                        .pane_id
                        .ok_or_else(|| anyhow!("PageScrollUpByPaneId missing pane_id"))?
                        .try_into()?,
                })
            },
            ActionType::PageScrollDownByPaneId(a) => {
                Ok(crate::input::actions::Action::PageScrollDownByPaneId {
                    pane_id: a
                        .pane_id
                        .ok_or_else(|| anyhow!("PageScrollDownByPaneId missing pane_id"))?
                        .try_into()?,
                })

View on GitHub (pinned to 98a0837077)

Solutions

  1. Populate pane_id identifying the pane to scroll before sending
  2. Regenerate the client's protobuf stubs from the running server's schema
  3. Run matching zellij versions on client and server
  4. Validate required fields before dispatch; skip and log malformed actions

Example fix

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

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

Strategy: validation

Validate before calling

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

Type guard

fn scroll_to_bottom_by_pane_id_is_valid(a: &ScrollToBottomAction) -> bool {
    a.pane_id.is_some()
}

Try / catch

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

Prevention

When it happens

Trigger: IPC clients emitting ScrollToBottomByPaneId without pane_id — half-populated messages, mismatched generated protobuf code, or test tooling sending default actions.

Common situations: Automation following output in specific panes; client built from a different zellij version than the server; captures replayed with optional fields stripped.

Related errors


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