{"record":{"id":"0d14b955961f3719","repo":"BigPizzaV3/CodexPlusPlus","slug":"dream-skin-image-is-not-managed-by-codex","errorCode":null,"errorMessage":"Dream Skin image is not managed by Codex++","messagePattern":"Dream Skin image is not managed by Codex\\+\\+","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"apps/codex-plus-manager/src-tauri/src/commands.rs","lineNumber":2078,"sourceCode":"        runtime: codex_plus_core::dream_skin_runtime::dream_skin_status(debug_port).await,\n        saved_for_next_launch: false,\n    }\n}\n\nfn empty_dream_skin_image_payload() -> DreamSkinImagePayload {\n    DreamSkinImagePayload {\n        path: String::new(),\n        content_type: String::new(),\n        size_bytes: 0,\n    }\n}\n\nfn managed_dream_skin_image_backup(\n    path: &Path,\n    state_dir: &Path,\n) -> anyhow::Result<ManagedDreamSkinImageBackup> {\n    if !codex_plus_core::dream_skin::is_managed_dream_skin_image(path, state_dir) {\n        anyhow::bail!(\"Dream Skin image is not managed by Codex++\");\n    }\n    Ok(ManagedDreamSkinImageBackup {\n        path: path.to_path_buf(),\n        bytes: fs::read(path)?,\n    })\n}\n\nfn restore_managed_dream_skin_image_backup(\n    backup: ManagedDreamSkinImageBackup,\n) -> anyhow::Result<()> {\n    codex_plus_core::settings::atomic_write(&backup.path, &backup.bytes)\n}\n\nfn dream_skin_content_type(path: &Path) -> &'static str {\n    match path\n        .extension()\n        .and_then(|extension| extension.to_str())\n        .map(str::to_ascii_lowercase)","sourceCodeStart":2060,"sourceCodeEnd":2096,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/apps/codex-plus-manager/src-tauri/src/commands.rs#L2060-L2096","documentation":"Guard in managed_dream_skin_image_backup: the given image path is not the Dream Skin image Codex++ manages (fails is_managed_dream_skin_image against the state dir), so Codex++ refuses to back it up or overwrite it — protecting arbitrary user files from being treated as theme images.","triggerScenarios":"Thrown at apps/codex-plus-manager/src-tauri/src/commands.rs:2078 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the operation at the managed image path under the Codex++ state dir","Import the image through the Dream Skin UI instead","Verify state_dir matches the one used at install time"],"exampleFix":null,"handlingStrategy":"validation","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-14T00:17:10.932Z"}