{"record":{"id":"696060906d9a1772","repo":"zellij-org/zellij","slug":"focuspanebypaneid-missing-pane-id","errorCode":null,"errorMessage":"FocusPaneByPaneId missing pane_id","messagePattern":"FocusPaneByPaneId missing pane_id","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"zellij-utils/src/ipc/protobuf_conversion.rs","lineNumber":3087,"sourceCode":"                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"UndoRenamePaneByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            ActionType::TogglePanePinnedByPaneId(a) => {\n                Ok(crate::input::actions::Action::TogglePanePinnedByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"TogglePanePinnedByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            ActionType::FocusPaneByPaneId(a) => {\n                Ok(crate::input::actions::Action::FocusPaneByPaneId {\n                    pane_id: a\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"FocusPaneByPaneId missing pane_id\"))?\n                        .try_into()?,\n                })\n            },\n            // Tab-targeting CLI-only variants\n            ActionType::UndoRenameTabByTabId(a) => {\n                Ok(crate::input::actions::Action::UndoRenameTabByTabId { id: a.id })\n            },\n            ActionType::ToggleActiveSyncTabByTabId(a) => {\n                Ok(crate::input::actions::Action::ToggleActiveSyncTabByTabId { id: a.id })\n            },\n            ActionType::ToggleFloatingPanesByTabId(a) => {\n                Ok(crate::input::actions::Action::ToggleFloatingPanesByTabId { id: a.id })\n            },\n            ActionType::PreviousSwapLayoutByTabId(a) => {\n                Ok(crate::input::actions::Action::PreviousSwapLayoutByTabId { id: a.id })\n            },\n            ActionType::NextSwapLayoutByTabId(a) => {\n                Ok(crate::input::actions::Action::NextSwapLayoutByTabId { id: a.id })","sourceCodeStart":3069,"sourceCodeEnd":3105,"githubUrl":"https://github.com/zellij-org/zellij/blob/98a0837077492d53dd252ab30bc3e43e41e504f4/zellij-utils/src/ipc/protobuf_conversion.rs#L3069-L3105","documentation":"FocusPaneByPaneId gives keyboard focus to one specific pane. Its protobuf message FocusPaneByPaneIdAction carries a single optional pane_id which the internal Action requires. A message selecting this variant with pane_id = None fails conversion with 'FocusPaneByPaneId missing pane_id'.","triggerScenarios":"Sending ActionType::FocusPaneByPaneId while FocusPaneByPaneIdAction.pane_id is None - typically a client that resolved no pane id or built the struct with defaults.","commonSituations":"Plugins focusing panes after navigation events; scripts driving zellij over IPC; client/server protobuf version skew; intending a focused-pane navigation action instead.","solutions":["Set pane_id: Some(PaneId { pane_type: Some(PaneType::Terminal(id)) }) before sending.","If you only need to move focus relative to the current pane, use MoveFocus/MoveFocusOrTab instead.","Check the resolved pane id is Some before building the action.","Keep all IPC participants on the same zellij release."],"exampleFix":"// before\nlet action = ActionType::FocusPaneByPaneId(\n    FocusPaneByPaneIdAction { pane_id: None },\n); // -> \"FocusPaneByPaneId missing pane_id\"\n\n// after\nlet action = ActionType::FocusPaneByPaneId(\n    FocusPaneByPaneIdAction {\n        pane_id: Some(PaneId { pane_type: Some(PaneType::Terminal(1)) }),\n    },\n);","handlingStrategy":"validation","validationCode":"fn is_sendable(a: &FocusPaneByPaneIdAction) -> 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: &FocusPaneByPaneIdAction) -> 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(\"FocusPaneByPaneId missing pane_id\") => {\n        log::warn!(\"focus action without pane target: {e}\");\n    },\n    Err(e) => return Err(e),\n}","preventionTips":["For relative navigation use MoveFocus / MoveFocusOrTab instead of FocusPaneByPaneId.","Cache pane ids from pane-info events and refresh them on layout changes.","Guard every focus-by-id send with an is_some() check on pane_id."],"tags":["zellij","ipc","protobuf","rust","pane-id","focus"],"backgroundTag":null,"analyzedSha":"98a0837077492d53dd252ab30bc3e43e41e504f4","analyzedAt":"2026-08-16T13:02:01.396Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}