{"record":{"id":"5ef3c61aebb68d5b","repo":"zellij-org/zellij","slug":"resizebypaneid-missing-resize-action","errorCode":null,"errorMessage":"ResizeByPaneId missing resize_action","messagePattern":"ResizeByPaneId missing resize_action","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"zellij-utils/src/ipc/protobuf_conversion.rs","lineNumber":2977,"sourceCode":"                Ok(crate::input::actions::Action::HalfPageScrollUpByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"HalfPageScrollUpByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            ActionType::HalfPageScrollDownByPaneId(a) => {\n                Ok(crate::input::actions::Action::HalfPageScrollDownByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"HalfPageScrollDownByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            ActionType::ResizeByPaneId(a) => {\n                let resize_action = a\n                    .resize_action\n                    .ok_or_else(|| anyhow!(\"ResizeByPaneId missing resize_action\"))?;\n                let resize = proto_i32_to_resize(resize_action.resize)?;\n                let direction = resize_action\n                    .direction\n                    .map(|d| proto_i32_to_direction(d))\n                    .transpose()?;\n                Ok(crate::input::actions::Action::ResizeByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"ResizeByPaneId missing pane_id\"))?\n                        .try_into()?,\n                    resize,\n                    direction,\n                })\n            },\n            ActionType::MovePaneByPaneId(a) => {\n                let direction = a.direction.map(|d| proto_i32_to_direction(d)).transpose()?;\n                Ok(crate::input::actions::Action::MovePaneByPaneId {\n                    pane_id: a","sourceCodeStart":2959,"sourceCodeEnd":2995,"githubUrl":"https://github.com/zellij-org/zellij/blob/98a0837077492d53dd252ab30bc3e43e41e504f4/zellij-utils/src/ipc/protobuf_conversion.rs#L2959-L2995","documentation":"ResizeByPaneId resizes one specific pane, and its protobuf message ResizeByPaneIdAction carries two optional payloads: pane_id and resize_action (a ResizeAction with a required resize: ResizeType enum and optional direction: Direction). The conversion reads resize_action first; if it is None the conversion fails immediately with 'ResizeByPaneId missing resize_action', even when pane_id is set.","triggerScenarios":"Sending ActionType::ResizeByPaneId whose inner ResizeByPaneIdAction has resize_action: None - e.g. filling only pane_id and forgetting the resize payload, or constructing the struct with default().","commonSituations":"Plugins or CLI wrappers building resize actions by hand; version skew where an older client's ResizeByPaneIdAction lacks the resize_action field; migrating from the focused-pane Resize action which carries the payload at a different level.","solutions":["Set resize_action: Some(ResizeAction { resize: ResizeType::Increase as i32, direction: Some(Direction::Left as i32) }) alongside pane_id.","Ensure the resize enum value you send is a valid ResizeType (not Unspecified/0) or the next conversion step (proto_i32_to_resize) will also fail.","Use the plain Resize variant when targeting the focused pane.","Rebuild client and plugins against the same zellij release."],"exampleFix":"// before\nlet action = ActionType::ResizeByPaneId(ResizeByPaneIdAction {\n    pane_id: Some(PaneId { pane_type: Some(PaneType::Terminal(1)) }),\n    resize_action: None, // -> \"ResizeByPaneId missing resize_action\"\n});\n\n// after\nlet action = ActionType::ResizeByPaneId(ResizeByPaneIdAction {\n    pane_id: Some(PaneId { pane_type: Some(PaneType::Terminal(1)) }),\n    resize_action: Some(ResizeAction {\n        resize: ResizeType::Increase as i32,\n        direction: Some(Direction::Left as i32),\n    }),\n});","handlingStrategy":"validation","validationCode":"fn is_sendable(a: &ResizeByPaneIdAction) -> bool {\n    a.resize_action.is_some()\n        && a.pane_id\n            .as_ref()\n            .and_then(|p| p.pane_type.as_ref())\n            .is_some()\n        && ResizeType::try_from(a.resize_action.unwrap().resize).is_ok()\n}","typeGuard":"fn is_valid_resize(a: &ResizeByPaneIdAction) -> bool {\n    match (a.pane_id.as_ref().and_then(|p| p.pane_type.as_ref()), a.resize_action.as_ref()) {\n        (Some(pane_id::PaneType::Terminal(_)) | Some(pane_id::PaneType::Plugin(_)), Some(r)) => {\n            ResizeType::try_from(r.resize).is_ok()\n        },\n        _ => false,\n    }\n}","tryCatchPattern":"match Action::try_from(proto_action) {\n    Ok(action) => dispatch(action),\n    Err(e) if e.to_string().contains(\"ResizeByPaneId missing\") => {\n        log::warn!(\"resize action incomplete (pane_id or resize_action): {e}\");\n    },\n    Err(e) => return Err(e),\n}","preventionTips":["ResizeByPaneId needs TWO payloads - validate pane_id and resize_action together.","Check the resize enum value is a real ResizeType, not Unspecified, or proto_i32_to_resize fails next.","Provide a resize(pane, resize_type, direction) builder so partial messages cannot exist."],"tags":["zellij","ipc","protobuf","rust","pane-id","resize"],"backgroundTag":null,"analyzedSha":"98a0837077492d53dd252ab30bc3e43e41e504f4","analyzedAt":"2026-08-16T13:02:01.396Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}