{"record":{"id":"e25c787ffdcdb727","repo":"BigPizzaV3/CodexPlusPlus","slug":"theme-json-art-key","errorCode":null,"errorMessage":"theme.json.art.{key} 无效","messagePattern":"theme\\.json\\.art\\.(.+?) 无效","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_package.rs","lineNumber":1294,"sourceCode":"    rest[1..3].parse::<u32>().is_ok_and(|hour| hour <= 23)\n        && rest[4..6].parse::<u32>().is_ok_and(|minute| minute <= 59)\n}\n\nfn validate_theme_art(value: &Value) -> anyhow::Result<()> {\n    let object = value.as_object().context(\"theme.json.art 必须是对象\")?;\n    if object\n        .keys()\n        .any(|key| !matches!(key.as_str(), \"focusX\" | \"focusY\" | \"safeArea\" | \"taskMode\"))\n    {\n        bail!(\"theme.json.art 包含不支持的字段\");\n    }\n    for key in [\"focusX\", \"focusY\"] {\n        if object.get(key).is_some_and(|value| {\n            value\n                .as_f64()\n                .is_none_or(|number| !number.is_finite() || !(0.0..=1.0).contains(&number))\n        }) {\n            bail!(\"theme.json.art.{key} 无效\");\n        }\n    }\n    if object.get(\"safeArea\").is_some_and(|value| {\n        value\n            .as_str()\n            .is_none_or(|value| !matches!(value, \"left\" | \"right\" | \"none\"))\n    }) || object.get(\"taskMode\").is_some_and(|value| {\n        value\n            .as_str()\n            .is_none_or(|value| !matches!(value, \"ambient\" | \"full\" | \"off\"))\n    }) {\n        bail!(\"theme.json.art 枚举值无效\");\n    }\n    Ok(())\n}\n\nfn valid_theme_color(value: &str) -> bool {\n    if let Some(hex) = value.strip_prefix('#') {","sourceCodeStart":1276,"sourceCodeEnd":1312,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/dream_skin_package.rs#L1276-L1312","documentation":"Thrown by validate_theme_art when optional focusX or focusY is present but is not a finite number in [0.0, 1.0] (the normalized focal-point coordinates the renderer expects). The offending input is theme.json.art's {key} field; omission is allowed, an out-of-range or non-numeric value is not.","triggerScenarios":"Thrown at crates/codex-plus-core/src/dream_skin_package.rs:1294 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["把 focusX/focusY 改为 0.0 到 1.0 之间的有限数"],"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"}