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

ScrollToTopByPaneId missing pane_id

Error message

ScrollToTopByPaneId missing pane_id

What it means

Protobuf conversion for ScrollToTopByPaneId, which jumps one named pane's scrollback to the top. The `pane_id` field is the only parameter and is mandatory; a message without it identifies no pane, so conversion fails at this check.

Source

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

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

View on GitHub (pinned to 98a0837077)

Solutions

  1. Set pane_id on the action before sending
  2. Regenerate protobuf stubs for the client from the server's version
  3. Align zellij versions across the IPC boundary
  4. Validate the action shape pre-send and log drops

Example fix

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

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

Strategy: validation

Validate before calling

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

Type guard

fn scroll_to_top_by_pane_id_is_valid(a: &ScrollToTopAction) -> bool {
    a.pane_id.is_some()
}

Try / catch

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

Prevention

When it happens

Trigger: IPC senders emitting ScrollToTopByPaneId with pane_id unset: default actions from custom clients, stale generated stubs, or malformed/hand-built payloads.

Common situations: Automation clearing to the top of scrollback in specific panes; version skew after these CLI-only pane-targeted actions were added; replay tooling.

Related errors


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