{"record":{"id":"5b0067bc6b2ff572","repo":"zellij-org/zellij","slug":"scrolltotopbypaneid-missing-pane-id","errorCode":null,"errorMessage":"ScrollToTopByPaneId missing pane_id","messagePattern":"ScrollToTopByPaneId missing pane_id","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"zellij-utils/src/ipc/protobuf_conversion.rs","lineNumber":2930,"sourceCode":"                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"ScrollUpByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            ActionType::ScrollDownByPaneId(a) => {\n                Ok(crate::input::actions::Action::ScrollDownByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"ScrollDownByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            ActionType::ScrollToTopByPaneId(a) => {\n                Ok(crate::input::actions::Action::ScrollToTopByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"ScrollToTopByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            ActionType::ScrollToBottomByPaneId(a) => {\n                Ok(crate::input::actions::Action::ScrollToBottomByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"ScrollToBottomByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            ActionType::PageScrollUpByPaneId(a) => {\n                Ok(crate::input::actions::Action::PageScrollUpByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"PageScrollUpByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })","sourceCodeStart":2912,"sourceCodeEnd":2948,"githubUrl":"https://github.com/zellij-org/zellij/blob/98a0837077492d53dd252ab30bc3e43e41e504f4/zellij-utils/src/ipc/protobuf_conversion.rs#L2912-L2948","documentation":"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.","triggerScenarios":"IPC senders emitting ScrollToTopByPaneId with pane_id unset: default actions from custom clients, stale generated stubs, or malformed/hand-built payloads.","commonSituations":"Automation clearing to the top of scrollback in specific panes; version skew after these CLI-only pane-targeted actions were added; replay tooling.","solutions":["Set pane_id on the action before sending","Regenerate protobuf stubs for the client from the server's version","Align zellij versions across the IPC boundary","Validate the action shape pre-send and log drops"],"exampleFix":"// before\nScrollToTopAction::default() // pane_id: None\n\n// after\nScrollToTopAction { pane_id: Some(target_pane_id as u64) }","handlingStrategy":"validation","validationCode":"if let ActionType::ScrollToTopByPaneId(a) = action.action_type.as_ref().unwrap() {\n    if a.pane_id.is_none() {\n        anyhow::bail!(\"ScrollToTopByPaneId requires pane_id\");\n    }\n}","typeGuard":"fn scroll_to_top_by_pane_id_is_valid(a: &ScrollToTopAction) -> bool {\n    a.pane_id.is_some()\n}","tryCatchPattern":"match protobuf_action.try_into() {\n    Ok(action) => dispatch(action),\n    Err(e) if e.to_string().contains(\"ScrollToTopByPaneId missing pane_id\") => {\n        log::warn!(\"dropping ScrollToTopByPaneId without pane_id\");\n    },\n    Err(e) => return Err(e.context(\"action conversion failed\")),\n}","preventionTips":["pane_id is the sole parameter of this action — make it a required builder argument","Verify the pane still exists before scrolling it (ids are invalidated by pane close)","Keep one shared validator for all ByPaneId scroll actions","Use the CLI wrapper instead of raw protobuf when possible"],"tags":["protobuf","ipc","action","pane-id","scroll","validation"],"backgroundTag":null,"analyzedSha":"98a0837077492d53dd252ab30bc3e43e41e504f4","analyzedAt":"2026-08-16T13:02:01.396Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}