{"record":{"id":"356bdaee773da50f","repo":"zellij-org/zellij","slug":"setpanecolor-missing-pane-id","errorCode":null,"errorMessage":"SetPaneColor missing pane_id","messagePattern":"SetPaneColor missing pane_id","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"zellij-utils/src/ipc/protobuf_conversion.rs","lineNumber":2903,"sourceCode":"                Ok(crate::input::actions::Action::SetPaneBorderless {\n                    pane_id: set_borderless_action\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"SetPaneBorderless missing pane_id\"))?\n                        .try_into()?,\n                    borderless: set_borderless_action.borderless,\n                })\n            },\n            ActionType::TogglePaneInGroup(_) => {\n                Ok(crate::input::actions::Action::TogglePaneInGroup)\n            },\n            ActionType::ToggleGroupMarking(_) => {\n                Ok(crate::input::actions::Action::ToggleGroupMarking)\n            },\n            ActionType::SetPaneColor(set_pane_color_action) => {\n                Ok(crate::input::actions::Action::SetPaneColor {\n                    pane_id: set_pane_color_action\n                        .pane_id\n                        .ok_or_else(|| anyhow!(\"SetPaneColor missing pane_id\"))?\n                        .try_into()?,\n                    fg: set_pane_color_action.fg,\n                    bg: set_pane_color_action.bg,\n                })\n            },\n            // Pane-targeting CLI-only variants\n            ActionType::ScrollUpByPaneId(a) => {\n                Ok(crate::input::actions::Action::ScrollUpByPaneId {\n                    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","sourceCodeStart":2885,"sourceCodeEnd":2921,"githubUrl":"https://github.com/zellij-org/zellij/blob/98a0837077492d53dd252ab30bc3e43e41e504f4/zellij-utils/src/ipc/protobuf_conversion.rs#L2885-L2921","documentation":"Conversion of the protobuf IPC action SetPaneColor, which recolors a specific pane (fg/bg colors plus target `pane_id`). The color fields are plain values, but pane_id is an optional field checked with .ok_or_else(): an action without it identifies no pane and fails conversion here.","triggerScenarios":"IPC senders emitting SetPaneColor with fg/bg set but pane_id unset; default-constructed actions from custom clients; stale generated stubs that predate the pane-targeted shape of this action.","commonSituations":"Theme automation recoloring panes programmatically; version skew between emitter and server; scripts assuming the active pane is targeted implicitly.","solutions":["Populate pane_id with the target pane before sending SetPaneColor","Regenerate protobuf stubs for the client from the server's zellij version","Use the same zellij release on both IPC ends","Validate the action's required fields before dispatch"],"exampleFix":"// before\nSetPaneColorAction { fg: Some(color), bg: Some(bg), ..Default::default() } // pane_id: None\n\n// after\nSetPaneColorAction { pane_id: Some(target_pane_id as u64), fg: Some(color), bg: Some(bg) }","handlingStrategy":"validation","validationCode":"if let ActionType::SetPaneColor(a) = action.action_type.as_ref().unwrap() {\n    if a.pane_id.is_none() {\n        anyhow::bail!(\"SetPaneColor requires pane_id\");\n    }\n}","typeGuard":"fn set_pane_color_action_is_valid(a: &SetPaneColorAction) -> 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(\"SetPaneColor missing pane_id\") => {\n        log::warn!(\"dropping SetPaneColor without pane_id\");\n    },\n    Err(e) => return Err(e.context(\"action conversion failed\")),\n}","preventionTips":["Resolve the target pane id before applying theme changes via IPC","Theme automation should iterate the pane manifest and set ids per pane","Reject half-built actions at the client boundary instead of relying on the server to fail them","Regenerate stubs after every zellij upgrade"],"tags":["protobuf","ipc","action","pane-id","color","validation"],"backgroundTag":null,"analyzedSha":"98a0837077492d53dd252ab30bc3e43e41e504f4","analyzedAt":"2026-08-16T13:02:01.396Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}