{"record":{"id":"e2f2a5478a1ccfd4","repo":"zed-industries/zed","slug":"failed-to-list-theme-assets","errorCode":null,"errorMessage":"failed to list theme assets","messagePattern":"failed to list theme assets","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/theme_settings/src/theme_settings.rs","lineNumber":222,"sourceCode":"pub fn reload_theme(cx: &mut App) {\n    let theme = configured_theme(cx);\n    GlobalTheme::update_theme(cx, theme);\n    cx.refresh_windows();\n}\n\n/// Reloads the current icon theme from settings.\npub fn reload_icon_theme(cx: &mut App) {\n    let icon_theme = configured_icon_theme(cx);\n    GlobalTheme::update_icon_theme(cx, icon_theme);\n    cx.refresh_windows();\n}\n\n/// Loads the themes bundled with the Zed binary into the registry.\npub fn load_bundled_themes(registry: &ThemeRegistry) {\n    let theme_paths = registry\n        .assets()\n        .list(\"themes/\")\n        .expect(\"failed to list theme assets\")\n        .into_iter()\n        .filter(|path| path.ends_with(\".json\"));\n\n    for path in theme_paths {\n        let Some(theme) = registry.assets().load(&path).log_err().flatten() else {\n            continue;\n        };\n\n        let Some(theme_family) = serde_json::from_slice(&theme)\n            .with_context(|| format!(\"failed to parse theme at path \\\"{path}\\\"\"))\n            .log_err()\n        else {\n            continue;\n        };\n\n        let refined = refine_theme_family(theme_family);\n        registry.insert_theme_families([refined]);\n    }","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/theme_settings/src/theme_settings.rs#L204-L240","documentation":"load_bundled_themes panics when the asset registry cannot list the bundled 'themes/' assets. Since themes are embedded in the binary, failure means a corrupted build or asset-store initialization problem, not user configuration.","triggerScenarios":"Thrown at crates/theme_settings/src/theme_settings.rs:222 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the asset embed/build packaging includes themes/","Log the underlying asset error and continue with an empty theme set","Verify ThemeRegistry asset store initialization order"],"exampleFix":null,"handlingStrategy":"fallback","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-14T05:17:10.506Z"}