{"record":{"id":"0edd29f7b9680e80","repo":"Hmbown/CodeWhale","slug":"failed-to-update-setting-invalid-focus-texture","errorCode":null,"errorMessage":"Failed to update setting: invalid focus texture '{value}'. Expected: off, scrim, or grain.","messagePattern":"Failed to update setting: invalid focus texture '(.+?)'\\. Expected: off, scrim, or grain\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/settings.rs","lineNumber":1524,"sourceCode":"            \"tool_collapse\" | \"tool_collapse_mode\" | \"collapse\" => {\n                let normalized = normalize_tool_collapse_mode(value);\n                if !matches!(normalized, \"compact\" | \"expanded\" | \"calm\") {\n                    return Err(anyhow::anyhow!(\n                        \"Failed to update setting: invalid tool collapse mode '{value}'. Expected: compact, expanded, or calm.\"\n                    ));\n                }\n                self.tool_collapse_mode = normalized.to_string();\n            }\n            \"low_motion\" | \"motion\" => {\n                self.low_motion = parse_bool(value)?;\n            }\n            \"fancy_animations\" | \"fancy\" | \"animations\" => {\n                self.fancy_animations = parse_bool(value)?;\n            }\n            \"focus_texture\" | \"texture\" => {\n                let normalized = value.trim().to_ascii_lowercase();\n                if !matches!(normalized.as_str(), \"off\" | \"scrim\" | \"grain\") {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid focus texture '{value}'. Expected: off, scrim, or grain.\"\n                    );\n                }\n                self.focus_texture = normalized;\n            }\n            \"work_surface_placement\" | \"work_surface\" | \"work_rail\" => {\n                let normalized = value.trim().to_ascii_lowercase();\n                if !matches!(\n                    normalized.as_str(),\n                    \"top\" | \"bottom\" | \"left\" | \"right\" | \"off\"\n                ) {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid work surface placement '{value}'. Expected: top, bottom, left, right, or off.\"\n                    );\n                }\n                self.work_surface_placement = normalized;\n            }\n            \"rail_panel\" | \"rail\" => {","sourceCodeStart":1506,"sourceCodeEnd":1542,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/settings.rs#L1506-L1542","documentation":"The settings setter rejected the value given for the `focus_texture` setting. Only the exact strings off, scrim, or grain (case-insensitive, trimmed) are accepted. This is a validation guard in Settings::set so an unknown texture never enters persisted config.","triggerScenarios":"Calling the settings update path with key `focus_texture` (alias `texture`) and a value outside {off, scrim, grain}, e.g. `set focus_texture blur`.","commonSituations":"Typing a visual effect name that does not exist; copying a value from a fork or newer/older build with different texture options; trailing whitespace or punctuation from a script.","solutions":["Use one of: off, scrim, or grain (case-insensitive).","Omit the setting entirely to keep the default.","Check the accepted list in crates/tui/src/settings.rs around the focus_texture arm if unsure."],"exampleFix":"// before\nsettings.set(\"texture\", \"frosted\")\n// after\nsettings.set(\"texture\", \"scrim\")","handlingStrategy":"validation","validationCode":"const FOCUS_TEXTURES: [&str; 3] = [\"off\", \"scrim\", \"grain\"];\nfn valid_focus_texture(v: &str) -> bool {\n    FOCUS_TEXTURES.contains(&v.trim().to_ascii_lowercase().as_str())\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = settings.set(\"focus_texture\", value) {\n    eprintln!(\"{e}; use one of: off, scrim, grain\");\n}","preventionTips":["Only use values enumerated in the error message.","Surface the accepted values in any UI/menu that sets this option.","Normalize case/trim before calling set, though the setter already does."],"tags":["config","validation","tui"],"backgroundTag":"invalid-config-value","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}