{"record":{"id":"17cf7400493451c7","repo":"Hmbown/CodeWhale","slug":"failed-to-update-setting-invalid-inline-diff-mode","errorCode":null,"errorMessage":"Failed to update setting: invalid inline diff mode '{value}'. Expected: full, summary, or off.","messagePattern":"Failed to update setting: invalid inline diff mode '(.+?)'\\. Expected: full, summary, or off\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/settings.rs","lineNumber":1621,"sourceCode":"            \"thinking_highlight\" | \"reasoning_highlight\" => {\n                self.thinking_highlight = parse_bool(value)?;\n            }\n            \"help_expand_groups\" | \"help_expanded\" => {\n                self.help_expand_groups = parse_bool(value)?;\n            }\n            \"contextual_tips\" => {\n                self.contextual_tips = parse_bool(value)?;\n            }\n            \"pin_last_prompt\" | \"pin_prompt\" => {\n                self.pin_last_prompt = parse_bool(value)?;\n            }\n            \"show_tool_details\" | \"tool_details\" => {\n                self.show_tool_details = parse_bool(value)?;\n            }\n            \"inline_diffs\" | \"inline_diff\" | \"diffs\" => {\n                let normalized = value.trim().to_ascii_lowercase();\n                if !matches!(normalized.as_str(), \"full\" | \"summary\" | \"off\") {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid inline diff mode '{value}'. Expected: full, summary, or off.\"\n                    );\n                }\n                self.inline_diffs = normalized;\n            }\n            \"locale\" | \"language\" => {\n                let Some(locale) = normalize_configured_locale(value) else {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid locale '{value}'. Expected: {}.\",\n                        codewhale_localization::configured_locale_values(\", \")\n                    );\n                };\n                self.locale = locale.to_string();\n            }\n            \"theme\" | \"ui_theme\" => {\n                self.theme = normalize_theme_setting(value).map_err(anyhow::Error::msg)?;\n            }\n            \"background_color\" | \"background\" | \"bg\" => {","sourceCodeStart":1603,"sourceCodeEnd":1639,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/settings.rs#L1603-L1639","documentation":"The settings setter rejected the value for `inline_diffs`, which controls how inline diffs render. Only full, summary, or off (case-insensitive, trimmed) are accepted. The guard keeps the stored mode aligned with the renderer's supported modes.","triggerScenarios":"Settings update with key `inline_diffs` (aliases `inline_diff`, `diffs`) and a value outside {full, summary, off}, e.g. `set diffs side-by-side`.","commonSituations":"Expecting a side-by-side mode that this TUI does not offer; typos like `sumary`; config copied from another tool's diff setting.","solutions":["Use one of: full, summary, or off.","Use `off` to disable inline diffs rather than an unlisted mode.","Trim whitespace/case issues; normalization already handles case but not unknown words."],"exampleFix":"// before\nsettings.set(\"diffs\", \"side-by-side\")\n// after\nsettings.set(\"diffs\", \"summary\")","handlingStrategy":"validation","validationCode":"const DIFF_MODES: [&str; 3] = [\"full\", \"summary\", \"off\"];\nfn valid_inline_diff_mode(v: &str) -> bool {\n    DIFF_MODES.contains(&v.trim().to_ascii_lowercase().as_str())\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = settings.set(\"inline_diffs\", value) {\n    eprintln!(\"{e}\");\n}","preventionTips":["Stick to full/summary/off; no side-by-side mode exists.","Share one constant for diff modes across tooling to avoid drift.","Default to `full` unless you intentionally disabled diffs."],"tags":["config","validation","diff"],"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"}