{"record":{"id":"36a6aa3fe05483d2","repo":"zellij-org/zellij","slug":"clearscreenbypaneid-missing-pane-id","errorCode":null,"errorMessage":"ClearScreenByPaneId missing pane_id","messagePattern":"ClearScreenByPaneId missing pane_id","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"zellij-utils/src/ipc/protobuf_conversion.rs","lineNumber":3014,"sourceCode":"                        .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,\n                })\n            },\n            ActionType::ToggleFullscreenByPaneId(a) => Ok(\n                crate::input::actions::Action::ToggleFocusFullscreenByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"ToggleFullscreenByPaneId missing pane_id\"))?\n                        .try_into()?,","sourceCodeStart":2996,"sourceCodeEnd":3032,"githubUrl":"https://github.com/zellij-org/zellij/blob/98a0837077492d53dd252ab30bc3e43e41e504f4/zellij-utils/src/ipc/protobuf_conversion.rs#L2996-L3032","documentation":"ClearScreenByPaneId clears the screen of one specific pane. Its protobuf message ClearScreenByPaneIdAction has one optional pane_id field which the internal Action requires. If the message arrives with pane_id = None, conversion fails with 'ClearScreenByPaneId missing pane_id' and the clear never runs.","triggerScenarios":"Sending ActionType::ClearScreenByPaneId with ClearScreenByPaneIdAction.pane_id unset (None).","commonSituations":"Plugins sending per-pane clear commands; hand-built action messages; client/server protobuf version mismatch; intending the focused-pane Clear variant.","solutions":["Set pane_id: Some(PaneId { pane_type: Some(PaneType::Terminal(id)) }) before sending.","Use the plain Clear action for the focused pane.","Keep both IPC ends on the same zellij version.","Validate the assembled message with a shared helper before dispatch."],"exampleFix":"// before\nlet action = ActionType::ClearScreenByPaneId(\n    ClearScreenByPaneIdAction { pane_id: None },\n); // -> \"ClearScreenByPaneId missing pane_id\"\n\n// after\nlet action = ActionType::ClearScreenByPaneId(\n    ClearScreenByPaneIdAction {\n        pane_id: Some(PaneId { pane_type: Some(PaneType::Terminal(1)) }),\n    },\n);","handlingStrategy":"validation","validationCode":"fn is_sendable(a: &ClearScreenByPaneIdAction) -> 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: &ClearScreenByPaneIdAction) -> 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(\"ClearScreenByPaneId missing pane_id\") => {\n        log::warn!(\"clear action without pane target: {e}\");\n    },\n    Err(e) => return Err(e),\n}","preventionTips":["Choose Clear for the focused pane unless you truly target another pane.","Build per-pane commands from live pane metadata, not constants.","Cover per-pane variants in your IPC fuzz or integration tests."],"tags":["zellij","ipc","protobuf","rust","pane-id","terminal"],"backgroundTag":null,"analyzedSha":"98a0837077492d53dd252ab30bc3e43e41e504f4","analyzedAt":"2026-08-16T13:02:01.396Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}