zed-industries/zed · error
button
Error message
button
What it means
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.
Source
Thrown at crates/search/src/buffer_search.rs:375
.when(find_in_results, |el| {
el.child(render_action_button(
"buffer-search",
IconName::Close,
Default::default(),
"Close Search Bar",
&Dismiss,
focus_handle.clone(),
))
});
let has_collapse_button = collapse_expand_button.is_some();
let search_line = h_flex()
.w_full()
.gap_2()
.when(find_in_results, |el| el.child(alignment_element()))
.when(!find_in_results && has_collapse_button, |el| {
el.pl_0p5().child(collapse_expand_button.expect("button"))
})
.child(query_column)
.child(mode_column);
let replace_line = should_show_replace_input.then(|| {
let replace_column = input_base_styles(replacement_border).child(
div()
.flex_1()
.py_1()
.child(render_text_input(&self.replacement_editor, None, cx)),
);
let focus_handle = self.replacement_editor.read(cx).focus_handle(cx);
let replace_actions = h_flex()
.min_w_64()
.gap_1()
.child(render_action_button(
"buffer-search-replace-button",View on GitHub (pinned to f4178619ac)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/search/src/buffer_search.rs:375 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/f94c0c76811c40b7.
Report an issue: GitHub.