{"record":{"id":"b8b8d3bb847de312","repo":"zellij-org/zellij","slug":"movepanebackwardsbypaneid-missing-pane-id","errorCode":null,"errorMessage":"MovePaneBackwardsByPaneId missing pane_id","messagePattern":"MovePaneBackwardsByPaneId missing pane_id","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"zellij-utils/src/ipc/protobuf_conversion.rs","lineNumber":3006,"sourceCode":"                    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\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"MovePaneByPaneId missing pane_id\"))?\n                        .try_into()?,\n                    direction,\n                })\n            },\n            ActionType::MovePaneBackwardsByPaneId(a) => {\n                Ok(crate::input::actions::Action::MovePaneBackwardsByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"MovePaneBackwardsByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            ActionType::ClearScreenByPaneId(a) => {\n                Ok(crate::input::actions::Action::ClearScreenByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"ClearScreenByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            ActionType::EditScrollbackByPaneId(a) => {\n                Ok(crate::input::actions::Action::EditScrollbackByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"EditScrollbackByPaneId missing pane_id\"))?\n                        .try_into()?,\n                    ansi: a.ansi,","sourceCodeStart":2988,"sourceCodeEnd":3024,"githubUrl":"https://github.com/zellij-org/zellij/blob/98a0837077492d53dd252ab30bc3e43e41e504f4/zellij-utils/src/ipc/protobuf_conversion.rs#L2988-L3024","documentation":"MovePaneBackwardsByPaneId swaps one specific pane backwards in the pane order. Its protobuf message MovePaneBackwardsByPaneIdAction has a single optional pane_id field; the internal Action requires a concrete PaneId. A message with pane_id = None fails conversion with 'MovePaneBackwardsByPaneId missing pane_id'.","triggerScenarios":"Sending ActionType::MovePaneBackwardsByPaneId while MovePaneBackwardsByPaneIdAction.pane_id is None.","commonSituations":"Scripts or plugins reordering panes via IPC; prost structs created with default(); stale generated contract on the sender; meaning to use the focused-pane MovePaneBackwards variant.","solutions":["Populate pane_id: Some(PaneId { pane_type: Some(PaneType::Terminal(id)) }).","Use MovePaneBackwards for the focused pane.","Rebuild the sender against the current zellij-utils contract.","Guard with a helper that rejects ByPaneId messages lacking a pane id before sending."],"exampleFix":"// before\nlet action = ActionType::MovePaneBackwardsByPaneId(\n    MovePaneBackwardsByPaneIdAction { pane_id: None },\n); // -> \"MovePaneBackwardsByPaneId missing pane_id\"\n\n// after\nlet action = ActionType::MovePaneBackwardsByPaneId(\n    MovePaneBackwardsByPaneIdAction {\n        pane_id: Some(PaneId { pane_type: Some(PaneType::Terminal(1)) }),\n    },\n);","handlingStrategy":"validation","validationCode":"fn is_sendable(a: &MovePaneBackwardsByPaneIdAction) -> bool {\n    a.pane_id\n        .as_ref()\n        .and_then(|p| p.pane_type.as_ref())\n        .is_some()\n}","typeGuard":"fn has_valid_pane_id(a: &MovePaneBackwardsByPaneIdAction) -> bool {\n    matches!(\n        a.pane_id.as_ref().and_then(|p| p.pane_type.as_ref()),\n        Some(pane_id::PaneType::Terminal(_)) | Some(pane_id::PaneType::Plugin(_))\n    )\n}","tryCatchPattern":"match Action::try_from(proto_action) {\n    Ok(action) => dispatch(action),\n    Err(e) if e.to_string().contains(\"missing pane_id\") => {\n        log::warn!(\"dropping malformed move action: {e}\");\n    },\n    Err(e) => return Err(e),\n}","preventionTips":["Single-field messages fail loudly - always set pane_id explicitly.","Use MovePaneBackwards for the focused pane when no id is known.","Audit generated-struct usage for default() calls that skip optional fields."],"tags":["zellij","ipc","protobuf","rust","pane-id","layout"],"backgroundTag":null,"analyzedSha":"98a0837077492d53dd252ab30bc3e43e41e504f4","analyzedAt":"2026-08-16T13:02:01.396Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}