{"record":{"id":"31f592766f7e037e","repo":"Hmbown/CodeWhale","slug":"failed-to-update-setting-invalid-composer-vim-mod","errorCode":null,"errorMessage":"Failed to update setting: invalid composer vim mode '{value}'. Expected: normal, vim.","messagePattern":"Failed to update setting: invalid composer vim mode '(.+?)'\\. Expected: normal, vim\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/settings.rs","lineNumber":1660,"sourceCode":"            \"composer_density\" | \"composer\" => {\n                let normalized = normalize_composer_density(value);\n                if ![\"compact\", \"comfortable\", \"spacious\"].contains(&normalized) {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid composer density '{value}'. Expected: compact, comfortable, spacious.\"\n                    );\n                }\n                self.composer_density = normalized.to_string();\n            }\n            \"composer_border\" | \"border\" => {\n                self.composer_border = parse_bool(value)?;\n            }\n            \"composer_multiline_mode\" | \"multiline_mode\" | \"multiline\" => {\n                self.composer_multiline_mode = parse_bool(value)?;\n            }\n            \"composer_vim_mode\" | \"vim_mode\" | \"vim\" => {\n                let normalized = value.trim().to_ascii_lowercase();\n                if ![\"vim\", \"normal\"].contains(&normalized.as_str()) {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid composer vim mode '{value}'. Expected: normal, vim.\"\n                    );\n                }\n                self.composer_vim_mode = normalized;\n            }\n            \"transcript_spacing\" | \"spacing\" => {\n                let normalized = normalize_transcript_spacing(value);\n                if ![\"compact\", \"comfortable\", \"spacious\"].contains(&normalized) {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid transcript spacing '{value}'. Expected: compact, comfortable, spacious.\"\n                    );\n                }\n                self.transcript_spacing = normalized.to_string();\n            }\n            \"status_indicator\" | \"indicator\" => {\n                let normalized = normalize_status_indicator(value);\n                if ![\"cw\", \"whale\", \"dots\", \"off\"].contains(&normalized) {\n                    anyhow::bail!(","sourceCodeStart":1642,"sourceCodeEnd":1678,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/settings.rs#L1642-L1678","documentation":"The settings setter rejected the value for `composer_vim_mode` (aliases `vim_mode`, `vim`). Only the lowercase strings vim or normal are accepted. The guard ensures the composer editing mode is one the input handlers implement.","triggerScenarios":"Settings update with key `composer_vim_mode`, `vim_mode`, or `vim` and a value outside {vim, normal}, e.g. `set vim emacs`.","commonSituations":"Expecting other editor emulation modes (emacs, nano) that are not supported; uppercase `VIM` is handled by the to_ascii_lowercase, but misspellings are not.","solutions":["Use `vim` to enable vim emulation or `normal` for default editing.","Do not attempt other editor modes; only these two exist.","Note the check compares against lowercase values after normalization, so case is fine but spelling must be exact."],"exampleFix":"// before\nsettings.set(\"vim_mode\", \"emacs\")\n// after\nsettings.set(\"vim_mode\", \"vim\")","handlingStrategy":"validation","validationCode":"fn valid_vim_mode(v: &str) -> bool {\n    matches!(v.trim().to_ascii_lowercase().as_str(), \"vim\" | \"normal\")\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = settings.set(\"composer_vim_mode\", value) {\n    eprintln!(\"{e}\");\n}","preventionTips":["Use `vim` or `normal` only; no other editor emulations exist.","Treat this as a boolean-like toggle in tooling.","Case is handled by normalization; spelling must be exact."],"tags":["config","validation","editor"],"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"}