{"record":{"id":"f94c0c76811c40b7","repo":"zed-industries/zed","slug":"button","errorCode":null,"errorMessage":"button","messagePattern":"button","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/search/src/buffer_search.rs","lineNumber":375,"sourceCode":"            .when(find_in_results, |el| {\n                el.child(render_action_button(\n                    \"buffer-search\",\n                    IconName::Close,\n                    Default::default(),\n                    \"Close Search Bar\",\n                    &Dismiss,\n                    focus_handle.clone(),\n                ))\n            });\n\n        let has_collapse_button = collapse_expand_button.is_some();\n\n        let search_line = h_flex()\n            .w_full()\n            .gap_2()\n            .when(find_in_results, |el| el.child(alignment_element()))\n            .when(!find_in_results && has_collapse_button, |el| {\n                el.pl_0p5().child(collapse_expand_button.expect(\"button\"))\n            })\n            .child(query_column)\n            .child(mode_column);\n\n        let replace_line = should_show_replace_input.then(|| {\n            let replace_column = input_base_styles(replacement_border).child(\n                div()\n                    .flex_1()\n                    .py_1()\n                    .child(render_text_input(&self.replacement_editor, None, cx)),\n            );\n            let focus_handle = self.replacement_editor.read(cx).focus_handle(cx);\n\n            let replace_actions = h_flex()\n                .min_w_64()\n                .gap_1()\n                .child(render_action_button(\n                    \"buffer-search-replace-button\",","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/search/src/buffer_search.rs#L357-L393","documentation":"An assertion in buffer_search bar rendering that a required button element exists; it fires when the button expected by the current search-bar state (e.g. close or find-in-results control) was not built, indicating a render-state inconsistency.","triggerScenarios":"Thrown at crates/search/src/buffer_search.rs:375 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the state flags (find_in_results, has_collapse_button) used to conditionally add children","Ensure the button is added in every branch where it is asserted later","Render defensively and hide the control rather than asserting"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}