{"record":{"id":"a04d58bccc18ea66","repo":"bevyengine/bevy","slug":"the-diagnosticslist-has-be-tempered-with-valid-di","errorCode":null,"errorMessage":"The DiagnosticsList has be tempered with. Valid Displays for aDiagnosticsList are Grid or None.","messagePattern":"The DiagnosticsList has be tempered with\\. Valid Displays for aDiagnosticsList are Grid or None\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bevy_dev_tools/src/diagnostics_overlay.rs","lineNumber":488,"sourceCode":"\n        let Ok(children) = diagnostics_overlays.get_mut(child_of.get()) else {\n            unreachable!(\"DiagnosticsOverlay has been tempered with. Do not despawn its children.\");\n        };\n        let mut lists_iter = diagnostics_overlay_contents\n            .iter_many_mut(children.collection())\n            .matched();\n\n        let Some(mut node) = lists_iter.fetch_next() else {\n            panic!(\n                \"DiagnosticsOverlay has been tempered with. DiagnosticsOverlay must\\\n            have a child with DiagnosticsList.\"\n            );\n        };\n\n        let next_display_mode = match node.display {\n            Display::Grid => Display::None,\n            Display::None => Display::Grid,\n            _ => panic!(\n                \"The DiagnosticsList has be tempered with. Valid Displays for a\\\n            DiagnosticsList are Grid or None.\"\n            ),\n        };\n        node.display = next_display_mode;\n\n        if lists_iter.fetch_next().is_some() {\n            panic!(\n                \"DiagnosticsOverlay has been tempered with. DiagnosticsOverlay must\\\n            only ever have one single child with DiagnosticsList.\"\n            );\n        }\n    }\n}\n\nfn bring_to_front(\n    mut event: On<PointerPress>,\n    mut commands: Commands,","sourceCodeStart":470,"sourceCodeEnd":506,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_dev_tools/src/diagnostics_overlay.rs#L470-L506","documentation":"Panic in collapse_on_click_to_header: the DiagnosticsList node's Display is neither Grid nor None, so the collapse toggle cannot compute the next display mode. Only possible if user code set an incompatible display value on the internal list node.","triggerScenarios":"Thrown at crates/bevy_dev_tools/src/diagnostics_overlay.rs:488 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only use Display::Grid or Display::None on the diagnostics list","Avoid restyling the overlay's internal DiagnosticsList node"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}