{"record":{"id":"bd119358509c3e56","repo":"BigPizzaV3/CodexPlusPlus","slug":"dream-skin-target-theme-should-serialize","errorCode":null,"errorMessage":"dream skin target theme should serialize","messagePattern":"dream skin target theme should serialize","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/assets.rs","lineNumber":117,"sourceCode":"        \"codex-snow\" => (\"snow\", CODEX_SNOW_RENDERER, CODEX_SNOW_CSS),\n        \"glass-vision\" => (\"glass-vision\", GLASS_VISION_RENDERER, GLASS_VISION_CSS),\n        value if uses_cidala_target_engine(value) => {\n            (\"cidala-tiger\", CIDALA_TARGET_RENDERER, CIDALA_TARGET_CSS)\n        }\n        _ => (\"dream-skin\", DREAM_TARGET_RENDERER, DREAM_TARGET_CSS),\n    }\n}\n\nfn dream_skin_target_runtime_script(settings: &BackendSettings, include_art: bool) -> String {\n    if !settings.codex_app_dream_skin_enabled || settings.codex_app_dream_skin_paused {\n        return String::new();\n    }\n\n    let (engine, renderer, base_css) = dream_skin_target_assets(settings);\n    let managed_css = managed_dream_skin_css(settings);\n    let css = format!(\"{base_css}\\n{managed_css}\");\n    let theme = serde_json::to_string(&settings.codex_app_dream_skin_theme_config)\n        .expect(\"dream skin target theme should serialize\");\n    let style_revision = dream_skin_content_signature(css.as_bytes());\n    let payload_revision =\n        dream_skin_target_payload_signature(settings, engine, &style_revision, &theme);\n    let mut payload = renderer\n        .replace(\"__DREAM_CSS_JSON__\", &serde_json::to_string(&css).unwrap())\n        .replace(\"__DREAM_ART_JSON__\", \"window.__CODEX_PLUS_DREAM_SKIN_ART__\")\n        .replace(\n            \"__DREAM_THEME_JSON__\",\n            \"window.__CODEX_PLUS_DREAM_SKIN_THEME__\",\n        )\n        .replace(\n            \"__DREAM_VERSION_JSON__\",\n            &serde_json::to_string(\"2.1.0-snow.1\").unwrap(),\n        )\n        .replace(\n            \"__GLASS_VISION_CSS_JSON__\",\n            &serde_json::to_string(&css).unwrap(),\n        )","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/assets.rs#L99-L135","documentation":"dream_skin_target_assets maps a theme target to its engine tuple and then serializes the theme config with serde_json, treating failure as unreachable via this expect-style error. It fires only if serialization of the theme value fails, which for the internal theme types indicates a broken invariant (e.g. a non-string map key) rather than bad user input.","triggerScenarios":"Thrown at crates/codex-plus-core/src/assets.rs:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the theme config value for non-serializable content","Check for recent changes to the theme data structures","Report as a bug; this path is expected to be infallible"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}